Members - Reputation: 213
Posted 06 August 2012 - 12:55 AM
So I was wondering how would I accomplish something like this:
so far I've set up a system where the map is made up of Y-Levels much like stories in a building and then each Y-Level has layers to place different tiles on. Would that system work for something like this or has anybody got something better in mind.
Thanks for reading.
Members - Reputation: 1054
Posted 06 August 2012 - 03:54 AM
Clever art makes it look like there is height to it but in reality its not.
Crossbones+ - Reputation: 2116
Posted 06 August 2012 - 11:55 AM
But what would happen if I wanted objects that the player could walk over but also go under. for example a bridge. because one of the cities in my game is going to be pretty vertical.
You would have to have that extra Z-layer (assuming X and Y are used for the actual tile drawings). So, you could have tiles at simultaneous X,Y location, but different Z-levels. What I would do is allow a player to traverse across a Z difference of 1 (going up or down stairs), but, that's it. If you have multiple tiles at the same X,Y, but varying Z, the player would only be able to go go to the tile with the same Z, or within 1.
For example, if a player going up, starts at 1,1,1 and ground tiles are at 1, 2, 1 & 1, 3, 1 and you have bridge tiles at 0, 2, 5 & 1, 2, 5 & 2, 2, 5, the player would be able to move "under" the bridge from 1, 1, 1 to 1, 3, 1 (walking under the bridge at 1, 2, 1).
If a player is at 0, 2, 5 moving right, he would walk across the bridge at 1, 2, 5and end up at 2, 2, 5.
That's how I'd do it atleast, using walkable tiles, wall tiles, and air tiles.
---(Old Blog, still has good info): 2dGameMaking
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)