coordinate/tile based mud's and 3d terrain

Posted by Khandrish on Wed 19 Oct 2011 02:31 AM — 2 posts, 16,048 views.

#0
This is something that has been bugging me for a bit lately and I could use some help in figuring out how to do what I want to do. The game is going to be coordinate based, well more like tiles since every point is really an area of X square feet, and ask is well when you only consider flat terrain.

Things like buildings, gates, windows and so on are fairly easy to handle, the tricky part is things like cliffs, climbing up buildings, mountains and other features where the ”tiles” won't create a nice seamless grid.

One thing that came to me as I was writing this is that it may not be necessary to have a seamless grid. If the movement, line of sight and so on are not calculated based on coordinates--with each tile sitting at one coordinate--but instead calculated by iterating over the tiles then having a 4x4 tile sized area with a hundred or more tiles representing the climbable walls of a tall tower might not be an issue. I will obviously need to think some more on how to implement this and see if it is a viable option.

Does anyone have any other suggestions of how to do this?
#1
If I understand what your trying to do correctly, then I say why not just add a z-level variable and assume that all the tiles of any given z-level above the most bottom one default to empty (open space/air) unless specified on height map for the area.

A 10x10 area, using one unsigned char/byte for each tile would give you 0-255 z-levels but only add 100 bytes to your memory over head for the area. Plus a byte for each player and object.

From there determining that there is say a wall in front of you if you standing at tile 3x, 3y, 0z would just be a matter of checking the height of tile 2x, 3y to see if its higher than 0. Assuming your facing in a direction of negative x.