|
coordinate/tile based mud's and 3d terrain
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Khandrish
(16 posts) bio
|
| Date |
Wed 19 Oct 2011 02:31 AM (UTC) [ quote
] |
| Message |
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? | top |
|
| Posted by |
Zedrackis1
(3 posts) bio
|
| Date |
Reply #1 on Sun 03 Feb 2013 09:53 PM (UTC) [ quote
] |
| Message |
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. | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
751 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )