(fixed) Crashes

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

(fixed) Crashes

Post 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...
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post 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. :(
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post 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.
Post Reply