Page 1 of 1

GAME: Teleporting Pillars Crashes the game

Posted: Sun Sep 18, 2005 8:25 am
by Sophia
If you place a teleporter and a FLOORITEM_PILLAR in the same square, make the teleporter OPBY=FLOORITEM_PILLAR, and then turn on the teleporter, it will play the teleport sound, but the game will then crash.

Posted: Sun Sep 18, 2005 9:02 am
by George Gilbert
I'm surprised that the teleporter allows you to use a flooritem as its opby parameter (the compiler should have hit an error there).

Clearly the current behaviour is wrong!

Posted: Sun Sep 18, 2005 6:46 pm
by Sophia
So you're going to disable it?

Too bad, I liked the idea of pillars teleporting around :D

Posted: Sun Sep 18, 2005 7:02 pm
by George Gilbert
Disabling it is the intention. You can already get the appearance of pillars telporting around by having two (one active, and the other inactive); when a given event happens just deactivate the active one and activate the deactivated one...

...could make an interesting maze.

Posted: Sun Sep 18, 2005 9:05 pm
by Sophia
There are two main reasons I wanted to use teleporters:

1. It's not possible to have a sound associated with the pillars appearing and disappearing just toggling them on and off. I guess there could be a sound associated with the trigger that starts the whole thing, but after that, it happens in silence. Teleporters can make noise. :)

2. Also, any movable objects in the same space as the pillar are drawn on top of the pillar, even if they're in the far side quadrants (that is, if you're facing north, facing a pillar, objects in the northeast and northwest are still drawn after the pillar)-- I thought a pair of toggling teleporters would be a handy way to clear out any junk in the square and put the pillar in, and then clear out the pillar and put back anything that was there.

Posted: Sun Sep 18, 2005 10:28 pm
by George Gilbert
2 is a bug! Sadly, it's quite tricky to fix.

For the pillar, the drawing order should be
- back of tile items
- the pillar
- front of tile items

For another flooritem (e.g. a pressure pad), the drawing order should be different
- the pad
- back of tile items
- front of tile items

Currently, the RTC engine doesn't differentiate between the different flooritems - looks like I'll have to do this.

Posted: Tue Sep 20, 2005 12:22 am
by Sophia
Maybe it's not that bad.

I don't know how your rendering engine is organized, but I'll assume that there's some sort of rendering queue that tells it what order to draw everything in.

Doors exhibit the proper behavior for what we want for pillars, so wouldn't it be simpler to drop pillars into the queue with the doors, rather than with the other flooritems?

Posted: Tue Sep 20, 2005 9:44 am
by George Gilbert
True, but doors aren't flooritems, their doors. I think I might have to put pillars into a class of their own.

I'll have a look into it.

Posted: Wed Sep 21, 2005 4:01 am
by Sophia
Well, yes, I know.

However, there's no reason the rendering engine and the game logic have to think of things the same way. It seems like treating pillars as doors for the purposes of rendering the display would be a lot easier than having to implement an entire new class for pillars, but then again, I don't know how RTC does things internally.

Posted: Thu Oct 06, 2005 12:18 pm
by George Gilbert
Fixed all of this for V0.35