2

I'm trying to create simple roguelike with python and libtcod. The problem is that when I m trying to execute this code, console shows:

"24 bits font.
key color 0 0 0
24bits greyscalefont. converting to 32bits
libtcod 1.6.2
SDL : cannot create window"

code:

import libtcodpy as lib


s_width = 100  #screen width
s_heigth = 60  #screen heigth
fps_lim = 20  #limit fps


lib.console_set_custom_font('arial10x10.png', lib.FONT_TYPE_GRAYSCALE | lib.FONT_LAYOUT_TCOD)
lib.console_init_root(s_width, s_heigth, 'game', False)
lib.sys_set_fps(fps_lim)

while not lib.console_is_window_closed():
    lib.console_set_default_foreground(0, lib.white)
    lib.console_put_char(0, 1, 1, "@", lib.BKGND_NONE)
    lib.console_flush()
furas
  • 134,197
  • 12
  • 106
  • 148
Jakub Kosior
  • 186
  • 1
  • 2
  • 12
  • it seems `libtcodpy` uses `SDL` library (probably version 1.2) which may need to install separatelly (it is created in C). See: http://libsdl.org/ – furas Jan 04 '17 at 02:45
  • it seems it needs `SDL 2.x` - see: https://bitbucket.org/libtcod/libtcod – furas Jan 04 '17 at 02:48

0 Answers0