Page 1 of 1

(fixed) Crashes

Posted: Sun Mar 04, 2007 10:20 pm
by Parallax
I'm trying to make a custom dungeon and so far I have managed to make the code segfault. I was using a bad color scheme for the map.pcx file and walked off the edge of the world.
Since it took me some time to figure this out, I can attest that a screwed-up color assignment in the pcx file can wreak havoc on a dungeon.
Also, DSB crashes when a wall item is placed on a floor tile and then clicked on, I assume because the engine thinks the player is trying to pick up the object.
I'm doing better now, but still having trouble with spawning color-coded pits, possibly because I read the levels from top to bottom, so when a pit color is encountered the lower level where the pit on the ceiling should be placed does not exist yet? More on that later...

Posted: Sun Mar 04, 2007 11:01 pm
by Sophia
Parallax wrote:I'm trying to make a custom dungeon and so far I have managed to make the code segfault. I was using a bad color scheme for the map.pcx file and walked off the edge of the world.
Since it took me some time to figure this out, I can attest that a screwed-up color assignment in the pcx file can wreak havoc on a dungeon.
Also, DSB crashes when a wall item is placed on a floor tile and then clicked on, I assume because the engine thinks the player is trying to pick up the object.
Could you send me the crash logs for these two events?
Parallax wrote:I'm doing better now, but still having trouble with spawning color-coded pits, possibly because I read the levels from top to bottom, so when a pit color is encountered the lower level where the pit on the ceiling should be placed does not exist yet? More on that later...
Yes, that would be a problem.
In util.lua I provide a function, "spawn_pit," to automatically create a floor pit, a ceiling pit, and link the two of them together. Color coded pits are a nice idea but there are some problems, as you've found. :(

Posted: Mon Mar 05, 2007 2:49 am
by Parallax
Pit problem solved. All you have to do is build towers from bottom to top, which makes sense anyways, and the problem only occured when using a color for pits, so if one is declaring pits explicitely (with spawn_pit() or two dsb_spawn()) it makes no difference. As an aside, since DSB did not flinch when I declared level 1 before level 0, I'm inclined to think that it would accept it if there even WASN'T a level 0, so long as no item tried to get placed out of range of course, so in principle, one could potentially create a DM dungeon with no level 0 and the prison mislabeled as level 1. :P

Logs are on their way.