Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Help! Elevation Design Problem


azkanan
 Share

Recommended Posts

Howdy folks. This is a game design issue that has been driving me crazy and I could really do with some help. I'll start in the beginning.

What is Elevation?
Elevation in our game, **The Ancients** _(Previously known as Project Terra)_, affects two things: Dynamic water flow and missiles.

When water flows, it must reach a whole number (1) of a tile before flooding to the next elevation up (1.1 and over). If there is an elevation of equal or less elevational height, it'll flow to or down to that, if it has less water than its current tile.

in short, basic water physics.

The second, Missiles, are things such as bows and arrows. When a bow is fired uphill, it loses range/distance because the archer has to compensate for Z-axis height/gravity. Likewise when firing downhill, or from a cliff, it gains range/distance.

The problem

The Ancients is your classic top-down game. Everything works fine when the game is seen to, except when it comes to 3D Illusions, such as cliffs and buildings. The problem is that we are, in-fact, working on a 2D plane and must compensate for tiles that are underneath and behind the cliff edges/buildings.

![](http://puu.sh/flhC)

![](http://puu.sh/flhO)

* * *

**Idea A**

Use two elevation layers.

Basically, where the 4s are in the above image, we use a "redirection" elevation attribute. This then tells any water physics or missiles to go to the fringe layer for information of that tile, and how to react with it.
This allows for ground-level elevation and overlapping elevation to be used on the same tile.

If water was flooding toward the foot of a cliff, it would read the second elevation layer and find that it can not flood over it. Furthermore if the flooding was high enough, it could eventually spill over the edge and onwards.

If water was flooding over the edge of a cliff from the second layer, it would strike the redirection elevation attribute that tells it to look to the ground elevation layer for further information.

If a player was firing toward the foot of the cliff, the missile would be redirected for information, as water flowing.

If a player was firing from the top of a cliff, the missile would be redirected for information, as water flowing.

Note: Anything going down or up a cliff would need to be redirected by X amount of tiles, to compensate for cliff height.

This means that we would need to increase each tile information by a new layer, which means that as a whole, we're picking up another 95MB of information for each map (5000x5000 tiles (maps are cut into segments of 50x50).

It could get messy for multiple-increasing elevation that has many fringes on top of each other (ie, mountain ranges).

:Diagram:

This is our Scene, a cliff.
![](http://puu.sh/flrt)

This is the elevation map for the lower layer.
![](http://puu.sh/flrM)

This is the elevation map for the upper layer.
![](http://puu.sh/fls0)

* * *

**Idea B**

Elevation mapping is Flat.

Imagine that the below is a house.

![](http://puu.sh/ffqk)![](http://puu.sh/ffqC)

Dusty Yellow = Low Hill, Lowest
Dark Yellow = Hill
Yellow = High Hill
Light Orange = Roof Edges
Orange = Roof
Red = Peak of Roof, Highest

Water can easily work out the directional flow by this elevation map.

Not messy at all, supports multiple layerings of elevation (mountain ranges)

A new attribute would be required to tell any graphics to be drawn, that they need to appear X tiles by and offset (ie, for roofing and cliffs).

This is not compatible with the Archer system, because the player's location will be X amount above the elevation map, in the case of cliffs and roofing. This means that any missiles will not take into account the elevation map, as it will believe it is firing from the elevation that is X amount above the elevation map.

:Diagram:

![](http://puu.sh/ffCq)

![](http://puu.sh/ffCG)
Blue Marker is player position according to the game
Ghost-black drawing is the cliff, in-game.

![](http://puu.sh/ffD0)
Blue Marker is player position according to the game

* * *

**Idea C**

We don't have one. Do you? D:
Link to comment
Share on other sites

-> New tile attribute, "Ledge". This works as a dynamic directional block tile, rendering order handler (decides whether the player is above or below the ledge) and calculates the upper bound elevation, depending on the tile directly 'underneath' it. (x is the same, y + 1) As the ledge will always be a fringe tile, this tile check will always retrieve the correct upper bound elevation.

This solves the problem, and will support the range and water systems.

Why you asked me to post this here, Azk, I don't know. ;]
Link to comment
Share on other sites

I don't know if any of you played Tibia, but how they did elevation was have each "level" be on seperate maps, but given line-of sight you could still watch PCs and NPCs move on those other levels. Also if elevation and height will be important for your game, I'm not sure if straight-grid top-down view would be the best way to go about it; straight-grid isometric (as I like to call it), like in Tibia and Ultima Online, would be a better way to go graphically in that regard.

A year or two ago I proposed a portal tile attribute, which could be placed on the map and it would be a blank tile that would draw the corresponding tile of another map (as a way to fake elevation). This was to roughly simulate the same elevation style that Tibia draws its maps.
Link to comment
Share on other sites

@Anna:

> I don't know if any of you played Tibia, but how they did elevation was have each "level" be on seperate maps, but given line-of sight you could still watch PCs and NPCs move on those other levels.

If you can't transfer to isometric, this is your best bet.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...