Spherical Map design
Well I am trying to think of a way to map out a world for the MMORPG I am designing. I need to make the map so that it will be accurate on a sphere, but can still be accessed and made into a simple 2d grid. I have thought about just using lots of 2d arrays to represent the world. But I dont think that method would work too well. Does anyone know any methods inwhich data can be stored in a spherecial array shape. I would appreciate any Ideas or direction on this, as this part of my project is quite beffudling. Thanks much
LOVE AND PEACE!!!
It'd never really work, the tiles wouldn't join up properly.
If you imagine at the 'eqautor' of your map, it could be say, 128 tiles wide. So if you were to walk 128 tiles to the left you'd be back where you started.
Now, the row of tiles above that would have less tiles going across, perhaps only 127.
Now, as you walk left along those 128 tiles again, you're going to be missing one on the row above. How do you compensate for it? If you double up one tile, it will just look wrong, especially when you walk up one tile, and everything re-shifts itself to compensate for the new base width of 127, i.e. that extra tile will disappear.
Or, you could make each of the tiles above 1/127th wider. But then nothing will join up.
So in conclusion, there's no real way you can do it using a tile engine.
If you imagine at the 'eqautor' of your map, it could be say, 128 tiles wide. So if you were to walk 128 tiles to the left you'd be back where you started.
Now, the row of tiles above that would have less tiles going across, perhaps only 127.
Now, as you walk left along those 128 tiles again, you're going to be missing one on the row above. How do you compensate for it? If you double up one tile, it will just look wrong, especially when you walk up one tile, and everything re-shifts itself to compensate for the new base width of 127, i.e. that extra tile will disappear.
Or, you could make each of the tiles above 1/127th wider. But then nothing will join up.
So in conclusion, there's no real way you can do it using a tile engine.
What about using an isocohedron (20-sided, equilateral triangles)? You could use triangular or hexagonal tiles, and so long as you kept players away from the 12 vertices, the grids would line up fairly well.
-RCmy website
I am noticing that I wont be able to use square tiles. Though I did some thinking and work on it. And I think I 'may' be getting somewhere. Cause it would be possible for me to use trapeziodal tiles. Those would line up relatively well... Though through all of this design I am actually kinda glad for calculus. Cause it seems to be helping me along quite a bit. And I dont think an isocahedron would work to well, cause I want it to be somewhat layered so that the transition from area to area will work.
Though what I really want to figure is how to make a array that would be completally spherical in nature.... Though that is looking pretty impossible right now. So I think I will prolly just go with trapeziodal tiles, cause those would scale down fairly well. Though this is turning out to be quite an adventure... oh well. I could always just go with a flat or cubic world LOL. That would be quite fun to play with physics with that.
Though what I really want to figure is how to make a array that would be completally spherical in nature.... Though that is looking pretty impossible right now. So I think I will prolly just go with trapeziodal tiles, cause those would scale down fairly well. Though this is turning out to be quite an adventure... oh well. I could always just go with a flat or cubic world LOL. That would be quite fun to play with physics with that.
LOVE AND PEACE!!!
Maybe, instead of changing the map, try changing the sphere and the way it shows the map.
Maybe you can do some sort of zoom like effect(pixels are bigger in the center and smaller in the corners of the sphere). Then maybe antialiasing would be needed so the big pixels don't look bad.
Is my explanation is clear enough?
Also are you going to manipulate the sphere in a 3d enviroment?
Maybe you can do some sort of zoom like effect(pixels are bigger in the center and smaller in the corners of the sphere). Then maybe antialiasing would be needed so the big pixels don't look bad.
Is my explanation is clear enough?
Also are you going to manipulate the sphere in a 3d enviroment?
Why not just represent the players position as latitude and longitude? Latitude will go from -90 to 90 and longitude will go from 0 to 360. Then just take the players position, decide how big the boundaries are (say +/- 10 degrees) and then recreate the part of the sphere the players are at.
Movement is a little tricky, since the characters are moving along a curve and not a flat surface, but the math is doable.
Movement is a little tricky, since the characters are moving along a curve and not a flat surface, but the math is doable.
longitude and lattitude? Make the world a 2D map, and then incoporate into the engine a curve to the visual displays.
www.neoshockmod.net - An HL2 Modification
PinFX, you can't map 1:1 a 2d grid to a sphere...the point that defines the North/South pole would contain the whole first/last row of your 2d grid.
I think latitude/longitude (and radius) is the way to go. As far as movement goes your UP Vector is easy to calculate i.e. center of sphere to character. You align your charcter accordingly and move forward as usual.
D
I think latitude/longitude (and radius) is the way to go. As far as movement goes your UP Vector is easy to calculate i.e. center of sphere to character. You align your charcter accordingly and move forward as usual.
D
Anti-Sig: Do Not Read This Signature
The easiest way would be to use hexagonal tiles as a rough 3D representation can be built using flat hexagons.
As these are commonly used in strategy and war games, you should be able to find plenty of online tutorials detailing how to implement them in most common programming languages.
I think there are even links in the resources section here.
As these are commonly used in strategy and war games, you should be able to find plenty of online tutorials detailing how to implement them in most common programming languages.
I think there are even links in the resources section here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement