SDL : cannot create window

498 Views Asked by At

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()
0

There are 0 best solutions below