Page 1 of 1

how to do (or not to do) elevation [a query]

Posted: Fri Apr 03, 2009 10:59 pm
by eleazar

I remember a year or two ago you had plan to include elevation in the game, so that you could actually make a bridge that characters could go under and over the same spot. I don't see any of that in the current demo. Did you have to scrap the idea because it was too complicated?

If someone could point me to the posts of wiki pages were this was discussed i would appreciate it. A few searches didn't turn up anything relavant. We're looking at the question of elevation now for PARPG an isometric fallout-like RPG, and it would be nice to take advantage of the effort others have put into this issue.

If i've posted in the wrong place i apologize, feel free to move it, i can find it.

Re: how to do (or not to do) elevation [a query]

Posted: Sat Apr 04, 2009 12:47 am
by Winter Knight
KQLives has a map with elevation in one of the later maps. Much like Allacrost, there are 3 heights that objects can be on, the ground, on top of the ground, and above ground (or sky). The sprite is drawn on top of the first two layers, and underneath the sky layer. And there is an obstacle layer (similar to Allacrost grid). There are several well-placed zone triggers, and each time you step on one of these triggers, the bridge tiles are modified. If you, for example, you start walking up a cliff, then you will step on a "upper layer" zone, which will cause the bridges to be lowered to the ground. It doesn't actually look like the bridges are on the ground, but when you reach the top of the cliff and walk across the bridge, your sprite walks over the bridge. When you come back down the cliff, you will walk over a zone trigger that causes the bridges to rise back to the sky, and you will walk under the bridge. The obstacle layer is modified by each zone trigger as well, to prevent you from instantly reaching the top of the cliff from under the bridge, or from jumping off of the bridge when standing on it.

To give you an idea as to how the zones are placed, I have included an image of each bridge. Zone 2 puts the bridges on the ground (allowing you to walk across), and zone 3 puts them in the sky (allowing you to walk under). The bridge tiles are circled in red. The town is called "town8".

Re: how to do (or not to do) elevation [a query]

Posted: Sat Apr 04, 2009 5:13 pm
by eleazar
Winter knight,

thanks, that example is a rather clever way of implementing bridges with "fake" elevation cliffs.

I see i did a really lousy job of explaining what i was after.

I'm not especially interested in bridges per se, that's just an example of something a robust elevation system could do. IIRC Alacrost originally had grander for elevation, not the 1 layer for characters system with some tricks to make it look like more, that it apparently now has.

Re: how to do (or not to do) elevation [a query]

Posted: Sun Apr 05, 2009 3:48 am
by Roots
WK, I see a flaw in your example. What if you have a NPC sprite walking across the bridge and simultaneously have another sprite walking under it? Your system wouldn't handle this case properly if I'm understanding it correctly. In your system, you can only have one sprite above or under a bridge at a time, otherwise the scene wouldn't look right. ... e#Contexts
eleazar, I think what you are after are something that we call map contexts. Essentially, a map context is a "map inside a map". We only draw one context at a time. When we go from a town square and walk inside a house, we do a context switch where the active map context changes. A map context switch changes which tiles and sprites are visible on the screen. The code continuously updates all contexts (including those that are currently not visible). Let me know if that's not what you're looking for, or if you have questions.