Git Product home page Git Product logo

Comments (11)

podiki avatar podiki commented on July 17, 2024

Hmm...can you give me some more information, like what OS, Lisp implementation, version of libtcod, anything else that might be relevant?

EDIT: Also, be sure you are using the version of cl-tcod mentioned in the Readme, not the one in quicklisp.

from cl-tcod-tutorial.

mfiano avatar mfiano commented on July 17, 2024

Arch Linux, SBCL latest, tried both libtcod 1.6.3 and HEAD.

However, I managed to get past that. Running it outside of SLIME specifies the error that it is looking for a bitmap font in the wrong location. However, then it creates a window that doesnt get painted, and I get a return value of #.(SB-SYS:INT-SAP #X00000000).

from cl-tcod-tutorial.

podiki avatar podiki commented on July 17, 2024

Make sure you are starting SLIME or running SBCL with the working directory being cl-tcod-tutorial. See #2. That sounds like the problem since it cannot find the font file (and make sure you've cloned the whole repository).

If that turns out to be the case I should add an error message or do something so that it is clear what is happening here, since this has come up before (in which case, sorry for the poor instructions).

from cl-tcod-tutorial.

mfiano avatar mfiano commented on July 17, 2024

As mentioned, I solved that problem. The new problem is described.

from cl-tcod-tutorial.

podiki avatar podiki commented on July 17, 2024

I can't reproduce this error. I'm also on Arch, 64bit. Can you paste the entire input/output of running it in SLIME or directly with SBCL? Have you tried out the libtcod samples (c/c++/python) to make sure that the library is working for you?

EDIT: I should note, the output of tutorial part 1 is a blank window at first, but using the arrow keys should have an @ appear that moves.

from cl-tcod-tutorial.

podiki avatar podiki commented on July 17, 2024

Ah, I think I may understand what you mean finally. tcod:console-init-root calls a C function which doesn't return anything (void), so getting a return value of a null pointer (or something like that) is expected. If you run the whole file (e.g. sbcl --load tutorial-part01.lisp or C-c C-l tutorial-part01.lisp in Emacs) it should run with some output about the font being loaded and then a blank window. Pressing the arrow keys will show an @ that moves around. Please see the details in the linked libtcod python tutorial.

from cl-tcod-tutorial.

mfiano avatar mfiano commented on July 17, 2024

Here is what happens with a basic test ran in the REPL. Note that the red line mess is from me dragging a box to take the screenshot, since the window is not drawing or repainting anything. Any further code after that strange return value results in nothing happening.

example

from cl-tcod-tutorial.

mfiano avatar mfiano commented on July 17, 2024

Disregard. Thank you for the help. For some reason, everything seems to work all of a sudden. I don't think I'm doing anything differently, but I'm all set. Thank you.

from cl-tcod-tutorial.

podiki avatar podiki commented on July 17, 2024

I'm glad you got it working! I've found things can be a little wonky (don't play perfectly nice with Lisp development with a REPL) when using cffi, SDL, etc., and sometimes it is best to just restart the Lisp. Let me know if anything else comes up.

from cl-tcod-tutorial.

mfiano avatar mfiano commented on July 17, 2024

One thing I can tell you, the GL backend does not work at all. Insta-crashes. I googled and found this issue is common, and recommended to use SDL. Might want to test this and update tutorial accordingly.

from cl-tcod-tutorial.

podiki avatar podiki commented on July 17, 2024

This tutorial code should be used with my version of cl-tcod (see the Readme for link), which makes the default renderer SDL2. (It also fixes other issues so that it works with the current version of libtcod.) However, upstream libtcod has supposedly fixed the other backends now (they were unsupported for quite some time), though I have not tried them.

from cl-tcod-tutorial.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.