Newbie Experience ...... Project : 3D Gaming Engine

I have a keen interest in 3d graphics and animation, and have hence taken up “to design a prototype gaming engine using open gl”, as my Final Year project (Bachelors in Comp Sci). Fact is that though my programming may not be great…I intend to improve on that as I learn more about implementing (or trying to get it somewhat completed)this proposed project.

Like any newbie, I have a flare for 3d and have at most used 3d Studio Max, Maya, Autocad, Viz, Mechanical Desktop, etc… But I have never really programmed for either of them.

So coming back, the problem in hand is to design a “modern” game engine, hopefully with improved lighting and rendering techniques.

My system is pIII-550, 384MB SDRAM, 3dlabs Wildcat VP560 w/64 MB DDR, an 70 GB har drive space, am using WIN XP Professional, and Microsoft VIsual C++.

Hopefully I intend to desing the engine using the specs mentioned, if some expert out there feels I need to upgrade/change/buy something new… to get my engine completed, feel free to advice me on that too.

Now… how does one make a gaming engine? where should I start? I have approx 8-9 months to complete this project. And though my project would only be a protytype I am trying to aim towards the following :

My goal would be something like…SPLINTER CELL, in terms of “graphics”

I am only focusing towards graphics aspect of this engine, and I need to be able to :

1)import 3ds models
2)import characters and be able to animate/control them
3)be able to provide various textures my models
4)be able to provide various lighting to light up different areas of a scene
5)cast shadows
6)be able to perform real time high quality rendering, optimised for open-gl

I have no idea how possible/impossible this might be for me, could someone plz boost my morale here and honestly tell me that 8 months would not be a problem at all and I would be able to grasp at all this after a couple of months(5~6)

Lastly advice me on OPEN GL books to buy… i have made a list of following :

Real-Time Rendering
by Tomas Moller, Eric Haines 49.95

3D Game Engine Design: A Practical Approach to Real-Time Computer Graphics
by David H. Eberly 64.95

Game Programming Gems
by Mark DeLoura (Editor) 69.95

Game Programming Gems 2
by Mark DeLoura (Editor) 55.96

Game Programming Gems 3
by Dante Treglia (Editor), Mark Deloura 55.96

3D Games: Real-Time Rendering and Software Technology, Volume 1 (With CD-ROM)
by Alan Watt (Author), Fabio Policarpo (Author) 65.00

3D Games, Vol. 2: Animation and Advanced Real-Time Rendering
by Alan Watt (Author), Fabio Policarpo (Author) 59.00

The OpenGL Extensions Guide
by Eric Lengyel 47.96

Computer Graphics Using Open GL (2nd Edition)
by Francis S. Hill (Author) 78.00

3D Games: Real-Time Rendering and Software Technology, Volume 1 (With CD-ROM)
by Alan Watt (Author), Fabio Policarpo (Author) 65.00

3D Games, Vol. 2: Animation and Advanced Real-Time Rendering
by Alan Watt (Author), Fabio Policarpo (Author) 59.00

Real-Time 3D Terrain Engines Using C++ and DirectX 9 (Game Development Series)
by Gregory Snook, Greg Snook 39.96

OpenGL® Reference Manual: The Official Reference Document to OpenGL, Version 1.2 (3rd Edition)
by Dave Shreiner (Author), Opengl Architecture Review Board 57.99

OpenGL SuperBible, Second Edition (2nd Edition)
by Richard S. Wright Jr. (Author), Michael R. Sweet (Author) 34.99

Thanks very much, I very much hope someone out there can help me along with this project, it means a lot to me.

Much regards,

Raza Khan

If you only focus on graphics, you’ll wind up with an incomplete game engine. Another project you might consider is to start with an existing scenegraph and add a physics engine with things like collision detection and vehicle mechanics.

What 3D games have you run on your computer? Because those specs don’t sound at all sufficient to accomplish graphics on the order of Splinter Cell.

Anyway, as for books, I borrowed this one from a friend once:…=glance&s=books Starts with basic OpenGL stuff and eventually covers a lot of the essentials for game programming: textures, models, collision detection, lighting and other pretties, overall theory, and input and sound using DirectX. I didn’t actually get to any of that cool stuff when reading it, though, because I’m a lazy ass and my friend got tired of waiting and took the book back. The reviews on Amazon would suggest it delivers pretty well on its promises, though. Windowing is done with straight Win32 code, though (I say though too much), which is confusing as all hell for a novice.

Speaking of which, you might want to use glut to handle all the nasty windowing stuff for you, at least while you’re learning OpenGL. Tutorial for setting up and using glut for VC++ can be found here:

[This message has been edited by Radish (edited 10-17-2003).]

If you are really a newbie like you say, I fear that you won’t be able to cut it in just 9 months.
If you can afford to hardcode something, then everything will be easier and everything will be much easier if you are going to use all the stuff you find on the net - doing this or not depends from a variety of factors.

Now my little comment about your targets.
(4) may take several weeks (maybe months is more correct) by itself (unless you already know how to accomplish those effects). For example, if you hardcode for linear attenuation then you’re in a roadway for completeness but if you want to make the same thing in a programmable, data-driven way, then be prepared to allocate a lot of time. When I say a lot I mean weeks just for the data-driving structures and parsers. Those would probably take a lot of time.

(5) is also pretty hard. Casting shadows invoves shadow volumes and depending on your engine complexity this may become a real pain. You need to figure out what framerate you want to hit there. If you just want to make it run then it’ll be easier.

(6) Being able to do that involves much more than an engine. As already pointed out, it takes a whole scene graph. If you are data driven this becomes horribly complex. If you assume everything then you’re fine but your code won’t be an engine (for me an ‘engine’ has some degree of programmability and if you miss out this then you’re not working on an engine).

I state it again:
You say you are a newbie. Well, I fear you won’t be able to cut it in 8/9 months.

By the way, you should focus more your target. If you want to cross-platform (which would be very good) then be prepared to spend some extra time. I programmed on a bunch on linuxes and I must say you’ll have some problems.
Do you want to make it run on your system only? On yours and better systems? Do you require &your_favorite_functionality_here or you want to go for a “lowest-common-denominator” approach?

As for the books, I really have to raccomand Real Time Rendering: it does not matter when you buy it, it is always useful.

Please, can you focus a bit more on what you want to do exactly? It is very important you have a clear “big picture” since the beginning.
Also, I suggest to team up with someone. A good engine requires some man-years of work even for experienced companies (see valve, id, epic) and you may came to a point in which component A requires component B and C but C requires A to work. This would be really annoying if you are alone. It can be much better if you get someone other to code it with you.

[This message has been edited by Obli (edited 10-18-2003).]

welcome to the club, razakhan I am doing exactly the same thing for my diploma. I want to develop a game engine with some nice features. I don’t want to program everything myself from the scratch: I have no desire to reinvent the wheel and afaik employers want us to use other peoples code. I am using SDL as the base for the engine. - it is a cross-platform library and has many pros. Then try - the best opengl tutorials on the net. You may want to find sdl ports of the tutorials. SDL has great libraries for fonts visualisation (, sound and music (sdl_mixer, sdl_sound). I will use ODE open source engine for physics and collision detection and particle system by David Mc Alister for various particle effects. I’ve already implemented fonts, particles and a wrapper for ogl primitives. well, there’s hell a lot of work Good luck!

I work a lot on my engine every day. I was a complete newbie at 3D programming 2 years ago, but i was already very good at C++ and 2D graphics with DirectX, etc.
Now, 2 years later, i am still quite far away from the quality of Splinter Cell (which uses an improved version of the Unreal 2 engine!).

So, don´t even think of doing such stuff, lower your expectations and do something which can be done by a newbie in that time. It will save you a lot of time.

That´s my advice, of course you can do what you like.

Wow, 2 years, you must have made a LOT of work, is it going to be an open source project or is it for a future game?

I really don´t think 2 years is THAT much time. Consider, that i didn´t have ANY experience about 3D programming 2 years ago. It just takes a lot of time to learn how to optimize for 3D applicatians and to learn how to create a 3D engine structure.
I would say, that my current engine is quite good, but i would not dare to say, that there is anything really special about it.

My engine can do per-pixel lighting with bumpmapping and some sort of (not realistic) specular lighting. That´s not really much, but the groundwork took a lot of time. Designing an engine is a very heavy task and you won´t learn it by reading or by thinking about it, but just by trial and error. And THAT takes time.
I think i rewrote my engine 3 or 4 times now. Experience is something you can only make by yourself.

The problem is, that if you stick to a bad design, than you will get into more and more trouble. That´s why i rewrote my basics quite often. At the moment it´s quite easy to add stuff to my engine (for me).

Just look at some (good) commercial engines. Most of them take 3 to 5 years of development. And all those engines are written by people, who already have 10 to 15 years experience in developing 3D stuff + they have code they can reuse easily. Do you think a newbie could compete with that with only 9 months time for development???

razakhan: This is no offense. I don´t want to tell you, you were stupid. I only want to advice you not to have such high goals. I would advice you to aim for a very limited engine. It could still be enough work. And if you are good and fast enough, you can still make it better than you need to do. It is no problem, if your work is better than expected, but it will be a problem, if your work is worse than expected.

And one other advice: Don´t even think of writing your own level-editor! I have written my own one and it is quite good. But i am working on that editor for over 1 year now, so if you only have 9 months, forget it.

I hope i didn´t disappoint you with what i said. So now some encouraging words: I think 9 months should be enough to create an engine which is good enough to impress your teachers and to show them, that you are good at what you are doing.

Good luck,

Thankyou everyone, I really appreciate your advice, some more professional than others. Okay I have had quite a few replies so I’ll go one by one :

  1. Mogumbo - Hi, yea I have now learnt that my preconceived defination of a gaming engine was off by far. When I included those points 6 i believe in my original thread, sort of meant that I want to implement the graphic aspect of the engine. I still DONT know what a complete engine is or what it does, how it works and all. I would be looking at a few shareware engines, to get a bigger picture of it. Thing is I want to get into this field, and I have to make a start irrevelant of how small or ridiculous that that may be, but its a scratch to begin with. I’ll keep in view of ur advice and would refer back to it once I learn more about the engine itself and which part I should work on.

  2. Radish : Hello, well Radish lets just say I managed to run Splinter Cell pretty smooth using that spec. cept that my graphic card then was GeForce2 GTS Pro. I looked at the links you provided, as for the book, I am not too sure if thats the book I would be going for, but I appreciate your recommendation. GLUT - is someting I need to look into, at the moment I really have no clue as to what it is, but I have come across this, in the graphic book, so would look that up too whats it all about Lastly I briefly looked over the link you sent, and I have put it in my favourites to review back to it.

  3. Obli : yes Obli am as newbie as it gets. Am in Pakistan, and frankly the University Level education standard here is quite bad. Our univ. didnt even provide us with any calculus course or courses like image processing/comp graphics… Now that I am in my final yr, they have now come up with a 1 semester course on comp graphics and that too taught by some individual who is not in this field at all, juss a Puter Masters student who recently gradyated!! Neways I shouldn’t critize much

Okay, yea I have had a few replies tellin me that 9 months…uh uh… noway! So that I appreciate, ur tellig me the facts and giving a more realistic advice. Yes, hardcoding is what I just may end up with, I would have liked to learn it by my own, but I guess I’ll cut corners and read the underlying details later or in my own time. I suppose its good to knwo how things are actually done, if u do it urself.

Yea, I believe I’ll stick to some average (decent) type of lighting procedure, to look for completeness of the project. I can always experiment with the other types later after my proj. is done. Could you tell me what “data-driving” means? or perhaps a link on that subject.

So shawdow castin would take in time too huh?! I suppose I would either go for no shadows at all or ??? umm i dunno… I guess I should give up the idea of shadows for now?!

Last you spoke of was on rendering, and i pointed out that ot would take a whole scene graph? Scene graph is something I have come across quite frequently during this last week, could someone shed more light
into it what it is?! Should I look up an example of come freeware engine?! is there a link? I looked up the book that i have 3D Game Engine Design. I didnt talk in detail about it?! what is it and what does it include!? … am sure ur prolly sighing in disbelief at this!! sowwie… am a newbie! Yea, as for calling something not an engine in which there is no degree of my individual methods/programmability, I would agree with you. I guess thats something I can look at when I try to make an engine after this project! atleast I would have some experience then and what to do…

I like your insight about being more specific… I wish I could my darn tutors are no good a help at this! For the moment I would like to develop it for windows platform (Linux… am a linux virgin, so wouldnt even dare of thinking bout that), and yes I would like to make it run on my system at least and better. Do you feel that I should upgrade my system for this?! if so to what!?

Its an affirmative on the book advice. Teaming up would not be acceptable… out teachers are very anal about the fact that projects should be individual effort.

  1. Surgeon : Hi, Hmmm i looked up the website SDL, and it spoke mainly of hows its widely being used by the Telcom sector. I am unsure if I would want to move away from c++ for the sole reason that whenever I hear bout games/graphics, C is somewhere in the bg. Sorry but I am just not so good enuf to learn something new and try my luck at that, hope u understand my position. Thanks for the link of OpenGL tutorials though.

  2. Jan2000 : Hello! Thanks for the realistic approach advice, I read u on lowering my expectations. I guess its the wise thing to do, as I had no idea of what I was getting myself into in the first place. cheers

  3. Jan2000 : Hi again! Okay so I now know that I have to cut corners and rethink about the idea of making a game engine. I believe I would work on perhaps just a small aspect of it or a very “general” sort of engine. You best know what an engine is, so could you please advice me on your defination that I should work on a very limited engine!? Tell me what I it should include or be able to do…No level editors! gotchya. Thanks for the encouragement, and yea I supose I was stupid enuf to say 9 months for an engine, well then again I really didnt knwo what it included, how much it included, and what it was… still dont but I’ll get there someday. Just didnt mean to disrespect anyone by saying 9 months, to those who have put in years to implement an engine and are still continuing at it

Thank you all… I’ll be around this forum now, with a LOT of questions… some more “stupid” than others
Raza Khan

[This message has been edited by razakhan (edited 10-20-2003).]

“You best know what an engine is” - well, i´m honored, but when you read some stuff in the advanced forum, you will see, that there are people with much more knowledge than me.

Anyway, i will try to describe what you could do.

First define what your engine is supposed to be used for.
That means, do you want an indoor or and outdoor engine? I never wrote an outdoor engine, so i can´t tell you more about that.

Usually one needs 3 programs. A level-editor, a level-compiler and the renderer itself. In my definition the level-compiler is a very important part of an “engine”, although it is a seperate program.

You should try to get some good level-editor. Try WorldCraft or so, the way it stores the maps should be well documented and the editor itself is very powerful.
Then write a compiler, which rearranges the level-data into some form you can handle more easily. At first this is all the compiler has to do, but later on the compiler will need to precalculate a lot of optimizations.

Your renderer is the application, which actually displays the level. At first you should only try to get an app running, that displays the level with textures. It´s hard to guess how long all that takes, but if you want to do it properly you will certainly need 1 to 2 weeks for that, depending on how much time you have to work on it each day.

After that you might want to add per-pixel lighting. Adding that is not that hard. Here is some good tutorial:

Get your system to be able to handle more than one lightsource.

After that you can start to think of optimizations. I really think you should do the lighting first, because you will need to optimize some stuff to do the lighting, but when you don´t know about how the lighting works, you won´t know how to optimize for it.

For an indoor-engine you should search for “portal-engines”. That means that you divide your level into sectors, which you connect via “portals”. It´s quite easy to implement that, it is very efficient on current hardware, and it does not take much time to precalculate it.
And here some other advice: Don´t try to create a program which places sectors and portals automatically. That´s very much hard work. You need a way to place your sectors by hand.

Another thing to search for are BSP-trees. You can combine them with a portal-engine - VERY efficient (i do that). BSP-trees have a LOT of very handy properties, but at first they are a bit harder to understand.

When you got an engine, that can do per-pixel lighting and has some optimizations, than you are on the save side. Then you can think of adding shadows (try shadow-maps, that´s certainly easier than stencil-shadows), bumpmapping, specular lighting or some other eye-candy like particle-effects.

And you should really only do a renderer! Don´t try to do collision detection. That´s VERY hard. I never got that working well enough to be satisfied.

And since you certainly need to do a presentation of your engine, you should finally add some sort of camera-paths. This way you can do fast fly-throughs, which is always very impressive.

And if you really decide to use WorldCraft as an editor, you will certainly be able to get some very cool levels. That´s also very important for a presentation.

I hope that helps you.

[This message has been edited by Jan2000 (edited 10-20-2003).]

Could you tell me what “data-driving” means?

I don’t know if there is a specific definition of “data-driving something”. I usually referred to that as “parametrizing everything which makes sense to”. Then by reading something on gamasutra i read of this term.
Simply put, data driving a program means you can change input parameters (and relative output) by just changing a file or a command line or something, all without recompiling.
For personal experience, I can tell you this increases overall productivity a lot, especially if the “input data” is likely to be recycled in successive stages.
It is somewhat incredible how much time you can gain by “data driving” even simple programs.
A program which allows that is usually referred as “data driven”. Some people are so good at making data driven code that they figure out how to make the next step to “programmable” code. Take for example a recent game and download a mod for it. There’s a lot of chances the mod will also change the dinamics of the game (a thing which cannot be done by simply “data-driving”). For example, some games have integrated scripting languages so you can create a creature with a special behaviour or just make a cut-scene or something other.

I guess I should give up the idea of shadows for now?!

Possibly yes. I would put it as a low priority TODO. After all there are still games which far-than-perfect shadows which look good enough anyway.

Scene graph is something I have come across quite frequently during this last week, could someone shed more light
into it what it is?

Well, I am not really sure what it is myself since I learned it by thinking at my ideas but I think a scene graph is something which allows you to say:

There’s a light here. It has this color.
There are also lights here there and there.
Then, there’s an object here which looks to be made of (that material) and has (this shape).
The room has a carpet on the ground which looks like… blah blah blah.

The advantage of that is the scene graph will parse out what you “said” so when you issue a Draw call “it” will figure out the drawing procedure itself (with some limitations of course). So, it will bind the right texture to draw the right object, it will draw the room in the right way, it will cast shadows correctly and possibly other things.

Do you feel that I should upgrade my system for this? if so to what!?

Not strictly necessary (the wildcat is somewhat good to me). Maybe some additional RAM since 64 is very little. My win2000 box eats up 90MB the OS alone so I guess you could work much better with at least 128MB. 64MB is way too little. I think you would get a much better experience from your computer, no matter what you are working or playing on.
I could remember of a PC which ran the same program at 4x speed after doubling the RAM!

there are people with much more knowledge than me

Maybe, but I am sure you can give very useful advices and I am sure you’re doing an impressive job.


EDIT: ubb code strikes me again.

[This message has been edited by Obli (edited 10-20-2003).]

Jan2000, thanks for the posting, that’s exactly what a newbie needs. I’ve been looking for such a clear simple answer for months