OK. I think I know enough to start building a simple game(I mean really simple, like a box running around a map shooting spheres and running through walls ). I have never programmed a game before and do not know the process of making a game, but many of you in this forum are prolly game programmers of some sort. I know how to set up the OpenGL window, created simple solids and wireframes, transforming and rotating objects, texture mapping these simple objects, and lighting all the simple objects. what is the next step? how do I create a map? do I use QUADS all the way to build a room? then texture it QUAD by QUAD? Please share you insights and experiences here.
Well, I started a cool little 3D engine a few days ago. I used a basic derivitave on the old doom idea of building a map out of sectors. the idea being that each sector is a rectangular area, bounded by 1 or more wall. Every sector can have a different floor/ceiling height.
This is pretty cool, because you can check entire sectors at a time for visibility and save tons of culling calculations.
It also loads from a file. All you do is have the file specify the bottom left and top right x,z coord of each sector, floor and celing height for each sector, and 2 x,z coords for each wall. That is the left coord (looking down the normal) and the right coord. It world pretty good, and even with basic code its runs really fast.
yes, may I see it? What video card are you developing on, I am on an ATI all in Wonder and it runs really slow with only 2 textures binded to walls and ceilings, It believe it does everything on the CPU.
I can do simple square rooms and hallways linking the rooms using a text file because I can imagine it in 3d space and plot out coordinates, but what if I want to do something a little more complicated, let’s say a volcano or a hill, how would I go about it? I don’t think opengl has boolean operations like AutoCad such as union and subtract does it? that would make building things much easier.
Actually, I believe you can. Theres a function called glBeginTrim, which you can use to subtract areas by winding the shape to be cut in the opposite direction.
I’ve only ever seen this running with a gluBeginSurface, which was used to define a nurbs surface, although it might be applicable to quads etc.
You could also look up gluIntertior for concave polygons.
I’ll email that prog tonight when im next online. (I’ll try and comment it a bit more).
thanks for your help guys, right now the fastest way for me to learn is by looking through codes and see how they are implemented, I also got an online copy of the Redbook which helps a lot. I have not done much coding in the past few days,(Watching US Open: Go Pete!)