• Create Account

Game world structure ideas

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

#1bennettbugs  Members   -  Reputation: 493

Like
0Likes
Like

Posted 13 August 2012 - 09:45 PM

So I am re-writing the structure of part of my game - the map. I will start with the background principals of it:
• Each world is saved as a folder with a unique name,
• Each world is polymorphic, as in it has a basic structure, but allows add-ons.
• The world terrain is divided into chunks.
• The way to navigate through worlds are highways since it is set on a continent.
• The terrain pieces are 3D quads, XYZ and WHL.
Since I just had some wisdom teeth removed, I forgot why I made this topic. But I remember that I would like to get some ideas on what other things I should consider before writing the new map code.

EDIT: Now I remember. Since the maps are really big (whole cities), and I'm using floats for positions, how would i make a scrolling map without losing precision? And if there are other things (ie wayponts) that are off in the distance, how would scrolling affect them?

EDIT 2: How to save/load chunks? Just general tips or ideas.

Edited by bennettbugs, 13 August 2012 - 11:13 PM.

#2nox_pp  Members   -  Reputation: 487

Like
0Likes
Like

Posted 14 August 2012 - 08:33 AM

Now I remember. Since the maps are really big (whole cities), and I'm using floats for positions, how would i make a scrolling map without losing precision?

I'm not sure I understand exactly what you mean by "scrolling map," but does the map itself need to move? Movement is always relative to something, and it's impossible to tell whether the observer or the observed is the thing undergoing motion. So, even if the extents of your map are far enough out in floating point land to make precision an actual issue, you probably don't need to be moving them (by modifying their world coordinates.) Just move the camera, or the character, or whatever. Same goes for waypoints, consider whether you actually need to move them.

Between Scylla and Charybdis: First Look <-- The game I'm working on

Object-Oriented Programming Sucks <-- The kind of thing I say

#3bennettbugs  Members   -  Reputation: 493

Like
0Likes
Like

Posted 14 August 2012 - 09:10 AM

Well since maps are big and you need a lot of precision, I was thinking of the player moving around in 1 chunk, but as he/she crosses chunks, the map moves and their position moves back.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS