Jump to content
  • Advertisement
Sign in to follow this  
ov3r_dr1v3

OpenGL some 'game world' questions...

This topic is 4121 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey... I'm currently working on a 3D game using opengl and c++. i've done quite a bit of 2D stuff before with opengl, and this is the first real project i've done in 3D. I have to good understanding of most of the theoretical principles involved in 3D, and have mucked around creating random 3D app by ging through tutorials e.t.c Basically, the game i want to create will involve a 'game world', which the user will be able to drive and walk around, and hopefully interact with the environment. Firstly, I think a good place to start would to be to darw the entire 'game world' and maybe jsut have a user controled camera to naviagte through it. The most obvious way to me seemed to just start drawing this 'manually' if u like, simpley using glBegin() and glEnd(), and drawing triangle after triangle to build up the world. I started doing this, I drew a road, surrounded by grass, which eventually came to a tunnel. However...this looked shite! it was very square, even with the use of some textures looked very very bland. I've been working both a 3ds and obj model loader...would it be more sensible to create the world in 3ds max and simply import it...if so, how many polygons would you suggest be sensible to bass this on? How would i go about implementing a sky? with sunshine maybe...i'm not really sure what the method for doing this is called, so am having a hard time searching for information... any help would be really appreciated thanks

Share this post


Link to post
Share on other sites
Advertisement
The polycount you use depends on lots of things like target hardware etc. As for the sky, google "sky domes" and "sky boxes".

Share this post


Link to post
Share on other sites
You'd be surprised at how much shadows and lighting improve otherwise bland scenes, you should look into shadowmaps and lightmaps.

As for using "imported" meshes, well, thats a no brainer, were you actually going to hard code your levels programmatically? that's almost as insane as creating 2D backgrounds by arbitrarily plotting pixel by pixel in code instead of loading an image.

Share this post


Link to post
Share on other sites
For levels, you could load a whole level like you said but... you probably will have more information associated with your objects that just the meshes and textures. There will also be game information such as velocity, health, armor, etc, depending on what kind of game you are trying to make. So you'll end up creating the objects as separate models and then loading them and their associated information by reading an XML file, a script, or your own file format - which could be generated by hand or via a level editor (that you will have to write, unless you can adapt an existing one).

Share this post


Link to post
Share on other sites
Quote:
Original post by ov3r_dr1v3
Hey...

I'm currently working on a 3D game using opengl and c++. i've done quite a bit of 2D stuff before with opengl, and this is the first real project i've done in 3D. I have to good understanding of most of the theoretical principles involved in 3D, and have mucked around creating random 3D app by ging through tutorials e.t.c

Basically, the game i want to create will involve a 'game world', which the user will be able to drive and walk around, and hopefully interact with the environment.

Firstly, I think a good place to start would to be to darw the entire 'game world' and maybe jsut have a user controled camera to naviagte through it.

The most obvious way to me seemed to just start drawing this 'manually' if u like, simpley using glBegin() and glEnd(), and drawing triangle after triangle to build up the world. I started doing this, I drew a road, surrounded by grass, which eventually came to a tunnel. However...this looked shite! it was very square, even with the use of some textures looked very very bland.

I've been working both a 3ds and obj model loader...would it be more sensible to create the world in 3ds max and simply import it...if so, how many polygons would you suggest be sensible to bass this on?

How would i go about implementing a sky? with sunshine maybe...i'm not really sure what the method for doing this is called, so am having a hard time searching for information...

any help would be really appreciated

thanks





You could hand edit a large world to get away from the limits of the regular tile grid heightmap type results, but then performance might become the problem....

Googling '3D chunk terrain' turned up the following:
http://www.vterrain.org/LOD/Implementations/


You could divide up the huge (random mesh) world into a network of chunks (often a regular grid of aquare meshes) which you then pull into memory only the ones near the player.


Texture Splatting is also a good way to make a square tile type terrain look less artificial.

Share this post


Link to post
Share on other sites
thanks very much for your replies so far...

So regarding game objects...would you suggest designing the entire world, all its objetcs like roads, traffic lights, tunnels, buildings e.t.c in one big 3ds max scene??? then load it into the application. The obviously design any thing else separatly e.g cars. and load these objects in separatly??? thats seems most logical to me, am taking the right approach?

I got a bit confused about the XML talk, how would i approach this?

thanks again

Share this post


Link to post
Share on other sites
3ds max is a poor replacement for a dedicated level editor, but I understand that it has been used in this capacity before. XML was just one suggestion for creating a scene file format since XML lends itself well to hierarchical data. The format doesn't really matter - I use a scripting language to add and position objects in the scene, which may seem tedious, but a level editor could generate this code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!