# Alundra Physics

This topic is 1958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Well for awhile now I've had a physics/tile engine in mind but only until now I've found an example.
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.

##### Share on other sites
If you look carefully at that game its actually entirely flat. Walls etc are drawn as floor tiles. Falling off the wall is then a case of: "if player moving from above: allow through and push to next tile, else, don't allow", end result, you enter a "wall" tile and the character goes to fall animation and gets moved to the tile below it. Same would work for falling off the building at the beginning. Think the pokemon GBA games, clearly flat and always had that gym with the floor tiles that shot you off in a direction and those dirt ledges you could walk down but not up.

Clever art makes it look like there is height to it but in reality its not.

##### Share on other sites
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.

##### Share on other sites
[quote name='Thekill473' timestamp='1344250084' post='4966630']
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.
[/quote]

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.

##### Share on other sites
@BeerNuts
Yeah that's pretty much what I had except I called it Y-Levels... Up down I dunno the name made sense in my head. XD but I'm glad someone else had the same concept.

##### Share on other sites

This topic is 1958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628730
• Total Posts
2984423

• 25
• 11
• 10
• 16
• 14