Closed XavilPergis closed 8 years ago
No clue why this happens. It's most likely a problem with libtcod on your system. Libtcod needs libsdl1.2debian to run, this may be related to your issue. I'll look into it further
Does this help you? Why don't you try running script how he suggests? He states that it works on Ubuntu (which is very true of this game) but not on other distributions unless ran as root.
Sudo does not help, nor does running it as root. I also tried setting all permissions to rwx on libtcod.py and libtcod.pyc, but that did not help either.
Note: python3.5 does not seem to be segfaulting, but instead throwing a TypeError around line 711 in edgequest.py
That's because the library was intended to be used with Python 2. There is no backwards compatibility with Python 3 at the moment. I'll continue looking into solutions.
It seems that c_char_p in python3.5 now takes bytes instead of a string.
Simply changing c_char_p(
That's interesting. If you make the necessary changes to libtcodpy and if it runs can you attach the file so I can implement it?
A little progress update: I have gotten the window not to crash immediately, but it displays mangled text, so I cannot figure out how to navigate the GUIs
Oops, that was my fault; I removed some formatting arguments from tcod init
Post screenshots of any problems if you can.
I have gotten it to run, but I had to convert x/y coords to ints, which is likely what causes this:
Interesting. X/y coords should already be integers. Are you talking about things like (player.x, player.y)? Those are tuples and don't need to be casted to integers. I may be making the wrong assumption, but can you show what values are changed?
One instance of it seems to be right here, while printing "Edgequest": (line 1951)
libtcod.console_print_ex(0, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 - 4, libtcod.BKGND_NONE, libtcod.CENTER, 'Edgequest')
You are passing something that is being divided, so it cannot be an int.
Also, somewhere in the level rendering code, we run into the same issue after moving to certain areas.
Okay that makes sense. Python 2 has integer division so no extra casting is needed. Make sure to use math.floor() then in Python 3.
that did not seem to fix the problem.
You finally installed Ubuntu I hear
There seems to be a problem with libtcod.
Why.
Pls fix m9.