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

A discussion area for general design issues that staff would like detailed feedback on.

Moderator: Staff

User avatar
eleazar
Senior Member
Posts: 110
Joined: Mon Sep 18, 2006 7:56 pm
Location: USA

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

Postby eleazar » Fri Apr 03, 2009 10:59 pm

Hi.

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.
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

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

Postby Winter Knight » Sat Apr 04, 2009 12:47 am

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".
Attachments
kqlives-bridge2.png
kqlives-bridge2.png (51.26 KiB) Viewed 3449 times
kqlives-bridge1.png
kqlives-bridge1.png (46.16 KiB) Viewed 3448 times
User avatar
eleazar
Senior Member
Posts: 110
Joined: Mon Sep 18, 2006 7:56 pm
Location: USA

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

Postby eleazar » Sat Apr 04, 2009 5:13 pm

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.
User avatar
Roots
Dictator
Posts: 8662
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

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

Postby Roots » Sun Apr 05, 2009 3:48 am

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.


http://allacrost.sourceforge.net/wiki/i ... 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.
Image

Return to “Design”

Who is online

Users browsing this forum: No registered users and 2 guests