Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Game design choice: 2D vs 3D

Author
Message
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 10th Jun 2011 13:02
As part of my game I need an interactive world map. I have the boundary data in a shapefile format and I can easily extract the coordinates if needed. Now I have a choice between making the polygons 2D or 3D. Th required functionality of the map is to be able to zoom in and out, load images in the background in google maps style of the terrain, pop-up balloons when you select the country and finally the ability to colour countries in.

2D:
Pros
I can quickly and easily load the coordinates into the game and draw lines between vertices to render the countries.
Easy to implement a google maps style map in the background loading the appropriate images at the appropriate altitude level.

Cons:
I wish to have thematic mapping and this means programming my own fill polygon functions as I currently understand there is no 2d polygon support in DBP.
I would have to program my own collision detection as such to make the polygons clickable.

3D:
Pros:
I can use in built functions to colour polygons and make them clickable easily.

Cons:
I'm not sure how to turn my coordinate data quickly into 3D models. With Islands etc there would probably be 250+ models to be made.

---------

So 3D seems to be the way to go for development time except for one con which seems massive. If anyone can help me with that it would be much appreciated? I'm guessing it would be best to construct algorithmically in the game to save me time, but not sure that is possible.

An additional thoughts is; If I then work in 3D I presume the best way to create the pop-ups is to render an image of the pop including all the text and images and then texture this onto a plane which I then pop-up?

If anyone has any other thoughts they want to share it would be great or if anyone can help with the 3D con that would be brilliant.

Thanks for any help offered.

www.freewarehub.net
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Jun 2011 13:15
What about using a planet model, or a sphere with a normal map?

Kinda mix the 2 methods, so 2D countries pasted onto a sphere map texture. If the planet isn't earth, you could make your own planets from individual country images - like each country could have an image and normal map, paste them onto the planet texture - but because your generating the planet texture, it'd be easy to change colouring, add extra 2D bits etc. One thing I'd be tempted to do is have a selected image, say a red outline of the country - then I'd paste that onto a blank image and have about 8 spheres, each slightly larger - that would give a neat, radiating outline.
It's convenient to avoid the poles when using spheres, because they are always ugly, but that might actually simplify things a bit - concentrate on a sphere that you rotate like a globe, so the countries of interest are on the equator, for maximum effect.

Health, Ammo, and bacon and eggs!
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 10th Jun 2011 13:35
I considered a sphere and ideally it would be the best looking solution, but two things really put me off. One is making the countries clickable. As far as I can see this would be difficult to translate from a 2d mouseclick to country coordinates given the number of parameters (eg zoom, planet rotation etc) unless someone can suggest an easy method.

The second thing that put me off that is loading high res textures on certain part of the sphere only when zooming in. I'm not sure how to even achieve that in DBP.

www.freewarehub.net
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Jun 2011 13:56
For the planet click thing, well you could get the 3D location clicked, relate that to the planet centre, work out the angles from centre, then translate that into a 2D coordinate on your planet texture. Or, you could have a marker object, like a flag say for each country, then use that as an icon, click to select sort of thing.

I don't think there are any easy solutions for this, but then the ideas you have should look pretty good anyway.

Health, Ammo, and bacon and eggs!
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 10th Jun 2011 14:02
Both ideas you mention seem quite feasible actually. I'm warming to the idea, if I can get the texturing down nicely.

www.freewarehub.net
Bulsatar
15
Years of Service
User Offline
Joined: 19th Apr 2011
Location:
Posted: 15th Jun 2011 19:15
I am new and I don't know if dbpro supports them, but you could use mip maps. I believe that nvidia has a plugin for photoshop to import and export mip maps. Then all you have to do is create 1 high rez texture and have the plugin create the low rez mips. If dbpro can handle mip maps, then set the distance for each mip to be active.
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 15th Jun 2011 21:44 Edited at: 15th Jun 2011 21:45
They're automatically generated, I believe. However, anisotropic filtering looks better!


Why does blue text appear every time you are near?

Login to post a reply

Server time is: 2026-07-11 05:38:14
Your offset time is: 2026-07-11 05:38:14