GAME: Teleporting Pillars Crashes the game

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

GAME: Teleporting Pillars Crashes the game

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

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

Post by Sophia »

So you're going to disable it?

Too bad, I liked the idea of pillars teleporting around :D
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

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

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

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

Post 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?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

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

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Fixed all of this for V0.35
Post Reply