Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUDs ➜ MUD Design Concepts ➜ coordinate/tile based mud's and 3d terrain

coordinate/tile based mud's and 3d terrain

Posting of new messages is disabled at present.

Refresh page


Posted by Khandrish   (16 posts)  Bio
Date Wed 19 Oct 2011 02:31 AM (UTC)
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)
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.


12,485 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.