Sign in to follow this  

What exactly is a 3D engine?

This topic is 4745 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

Hi all, I'm new to the forums and have a few burning questions to ask. Firstly, I do my programming in Linux using the glX API. I've read on another thread about using SDL and I'm wondering, is it really that much better than the glX API and is it worth my time learning how to properly use the SDL library? I've read through the tutorials up to lesson 21 and decided to come up with a way to simplify lots of the programming present there and ended up rewriting the bulk of the code in classes and ended up with a 'large'ish code with multiple classes handling different aspects of 3D. Is this what most people would call an engine? I'm a self-taught programmer and hence am not down with most of the terminology used. Should I read on more until I've completed the whole tutorial before I write an engine?

Share this post


Link to post
Share on other sites
Hello!

To your last question:

A simple Direct3D wrapper isn't a 3D-engine. A real 3D-engine does much more. First of all the scene management (octrees, BSP-trees, terrains) and lighting is something a real 3d-engine should be able to do. But this also depends on the type of game you're writing (in a simple space simulator for example the scene management isn't that important in comparison to a real first-person-shooter).

Bye, hunta

Share this post


Link to post
Share on other sites
Developers create engines to separate management code from game code. The engine forms the basis of a game, and contains code for things like scene management, resource management and for lighting and rendering, etc. The game code defines the game's behaviour. This is the user interface, the way the user moves, weapons, player stats, all the things that are specific to the game.

Engines are implemented in many different ways. Quake III is my favourite example of a moddable, C engine. It's contained in the Quake III executable, and mods are written in DLLs. Switching between mods is as simple as loading another DLL (well, actually, it's three in Quake III's case, one for the UI, one for the client, and one for the server). The engine in the executable calls functions in the game DLL to let the game know when it's time to run game code, or to render, or to parse user input, etc. The game DLL calls engine functions to load resources like textures or models, or render, etc.

Another example is the OGRE engine. It has a strong object-oriented approach, where the engine is contained in a number of classes in a namespace, which you include in your application. You create a main root class to run the application, then create instances of classes for scene management, for specific resource management, like fragment programs, textures and meshes, for animation control, and for many more things. You can get the OGRE source code under the GNU licence. Search for it on Google if you're interested, but be prepared for a lot of very heavy code. It's probably not the best place for someone who's new to engines to start.

Read some more articles, and perhaps look at modding an existing engine. There'll be a lot of documentation available (particularly for Half-Life, Half-Life 2, Quake III and Unreal Tournament), and you'll be able to see how a professional engine does things. btw, you can get the source code for the Quake III Arena and Quake III Team Arena game DLLs at ftp.idsoftware.com, if you can find some tutorials or articles on how to mod Quake III...

EDIT: Almost forgot: the Enginuity articles, by Richard Fine (aka superpig, GameDev staff/mod) might be just what you're looking for...

[Edited by - iNsAn1tY on December 17, 2004 8:45:06 AM]

Share this post


Link to post
Share on other sites

This topic is 4745 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this