Questions tagged [libtcod]

libtcod (also: The Doryen Library) is a library for advanced console output and API for developing roguelikes.

from the libtcod homepage:

libtcod, a.k.a. “The Doryen Library”, is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.

libtcod offers bindings for a wide range of languages, including C, C++, C#, D, Common Lisp and Python. The source is available at BitBucket.

51 questions
1
vote
1 answer

How do I use libTCOD graphical tiles if `char` cannot fit a number >=256?

I am trying to add graphical tiles to my roguelike using the tcod-rs library. The root console's put_char_ex function (or the C version, TCOD_putwchar) both take only chars. To use tiles, as per the Python tutorial, you must use tile numbers higher…
Alexis Dumas
  • 1,299
  • 11
  • 30
1
vote
0 answers

Accessing data inside of an FFI pointer (libtcod)

I'm using the ruby port of libtcod, which binds to the C functions. In particular, I'm trying to use this function: tcod_function :TCOD_sys_check_for_event, [ :int, :pointer, :pointer ], :int I'm doing so like this: mouse =…
Shane
  • 1,015
  • 2
  • 12
  • 31
1
vote
1 answer

Python Thread keep freezing the entire program?

Before everything, I've to say that I'm not very inside python programming as I am in other languages. I'm quite (too) annoyed for searching other ways of solution, so thank you in advance for your help. I love to make Roguelike games in my free…
1
vote
2 answers

Libtcod access violation error in Python

So, like many I am going through a tutorial on roguelikes using libtcod in python. http://www.roguebasin.com/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod,_part_3 I finally got everything running but I am getting an error on a…
Chris E
  • 31
  • 5
1
vote
1 answer

keyboard command functionality with libtcod c++

I recently switched from SFML to libtcod for my rougelike, because i find libtcod more convinient for those kinds of games. One problem i cant find any solution for is how to store keyboard bound functions. In SFML i could do this for my…
val
  • 729
  • 6
  • 19
1
vote
2 answers

Statically linking libtcod

I'm trying to statically link libtcod to my C++ project without success. I get many linking errors, including: ./tuto: error while loading shared libraries: libtcodxx.so.1: cannot open shared object file: No such file or directory Has anyone had…
vinnylinux
  • 7,050
  • 13
  • 61
  • 127
1
vote
1 answer

(C++) libtcod returns 3?

I'm using a guide here: http://codeumbra.eu/complete-roguelike-tutorial-using-c-and-libtcod-part-1-setting-up The following code opens a console window, and a main window for the game. the game windows closes half a second after opening, then…
user2843584
1
vote
2 answers

I'm Programming a Roguelike in Python and I need a Specific Monster Following Script

I'm using libtcod and python to make a roguelike; the tutorial I'm following the monsters only follow you if you're in their field of view. Obviously this is insufficient; as it means you can turn a corner and they don't follow you around the…
1
vote
1 answer

libtcod root is messing up

Everytime I run this the window closes immediatly, and returns 3 #include "libtcod.hpp" int main() { TCODConsole::initRoot(80,50, "j", false); while ( !TCODConsole::isWindowClosed() ) { …
1
vote
1 answer

Python program not responding when play moves

I am writing a roguelike in python with libtcod. movement worked fine before I switched to object orientation. When I run my python game it pops up but as soon as I try to move the player, it freezes. Here is my code: import libtcodpy as…
Josh King
  • 177
  • 2
  • 2
  • 7
1
vote
1 answer

Python program not responding when I run it

Im making a roguelike in python using Libtcod. When I run the code, the window pops up, drawing the symbol on the screen but the window then freezes. It then says it is not responding. I do not understand whats happening. Here is the…
Josh King
  • 177
  • 2
  • 2
  • 7
0
votes
0 answers

Building a Circular Room in Python (LibTcod Roguelike tutorial)

I'm happy to say I'm still learning and new to making and building quite anything in code so far, but I have been tackling the Tcod Roguelike tutorial to try some things out. I have gotten to the procedural generation of rooms and have gotten it to…
Kol
  • 1
0
votes
0 answers

Python, tcod rendering step by step

in this little piece of code i try to add different layer of rendering step by step, but it seems there s something i missed in the way it works. [.....] with tcod.context.new_terminal( cons_width, cons_height, tileset=tileset,…
0
votes
1 answer

How to properly import libtcod in PyCharm?

I'm trying to set up a roguelike Python project, but I can't seem to be able to import libtcod module into my project. This helloworld crashes, and the IDE keeps telling me that there is no module named libtcodpy. import libtcodpy def main(): …
Sargon1
  • 854
  • 5
  • 17
  • 48
0
votes
1 answer

int() argument must be a string, a bytes-like object or a number, not 'list' Python python-tcod Roguelike

I am making a roguelike game using the python-tocd roguelike engine. My game is based off the python libtcod roguelike tutorial. I'm making a list of constants that I use to generate maps game_map.make_map(constants['max_rooms'],…