Archived

This topic is now archived and is closed to further replies.

engine analysis of a famous game

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

Well, you can download the source code to Quake 1 (possibly 2 by now?) as well as Doom I beleive (doom1 and possibly 2 as well). What do you want to know about how they work? There is nothing special about them, except they were finished and relatively efficient.

Share this post


Link to post
Share on other sites
That''s what I am wondering about too. Right now there are several tutorials, eg. Enginuity which describe the design of an engine from 0.
But with the quake/quake 2 source available I expected to be able to find some descriptions on how it works internally. Instead all I find are infantile ''tutorials'' that explain how to add a ban list so you can ban certain ip''s or playernames by modifying one of the C files.
So if you find anything, please let us know.

Share this post


Link to post
Share on other sites
the source for quake and quake2 can be found on idsoftware.com. I've found the source for the doom engine kicking around the internet but not at their site.

You absolutely will not ever find a tutorial on how those engines work because most people don't fully understand how they work

and just the tutorials for 'simple' things like collision detection are generally like 10 pages long...a tutorial on how the entire engine works could be over 1,000.

Oh, and the half life engine IS the quake engine (the original quake, although there's supposedly some quake2 code in there, but mostly only bug fixes)


[edited by - Shadow12345 on November 29, 2003 6:12:58 PM]

[edited by - Shadow12345 on November 29, 2003 6:13:57 PM]

Share this post


Link to post
Share on other sites
well, HL is a modified Quake engine but thats not the point of this

Games i''ve seen code for and personaly have are quake, quake2, Freespace2, Homeworld and Civ2: Call To Power

Most of them can be found here : http://www.gamedev.net/reference/list.asp?categoryid=45#202
with some others, and the CTP source release was on the front page not that long ago (well, couple of months maybe)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You might want to try downloading the student game "Critical Care". They provide all their source code to the game, as well as (more importantly) their game design AND technical design documents. The size and scope of the game is small. While I wouldn''t do everything the same way they''ve done it, their docs make for an excellent read and add more value than just having the source code to look at.

I can''t remember exactly where I got it from, but all you need is the main download - there were separate links for the docs which were broken, but the docs and source were included as part of the main download anyway.

Share this post


Link to post
Share on other sites
game: hey engine, go do this
engine: ok
game: wait, how are you going to do it?
engine: why do you care? it gets done, doesn''t it?

You can see how the game talks to the engine but you don''t know what it is really doing

Share this post


Link to post
Share on other sites
ah okay. thanks. jeez if the game code by itself is 112,000 lines, I wonder how many lines the engine is.

Raloth: haha yes, I know what an engine is. I'd hope I would know, since I'm making one. Now that I look at that SDK code more closely, I can find multiple points where it calls the engine, such as trap_R_RenderScene

[edited by - circlesoft on November 29, 2003 11:35:52 PM]

Share this post


Link to post
Share on other sites
as far as i''ve heard carmack doesnt exactly care about writing clean or readable code so i definitely wouldnt expect him to spend time on writing docs for stuff nobody cares about anymore (except those hoping to learn from it).

Share this post


Link to post
Share on other sites
Use the quake1/2 engine source for implementation details not for how to design an engine. Does anyone know where vec3_t is defined in quake1? I couldn''t find it. Anyways, anyone else also wonders how in the heck the coders were able to keep sanity with the class viewer? My god that thing is looooooong.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://critical-care.sourceforge.net

Yep, that''s the one. The main download is ~100MB I think. Again, it''s a small game but well worth looking at.

You might also want to check out NeoEngine:

http://neoengine.sourceforge.net

It''s an LGPL 3D game engine with some nice features.

Share this post


Link to post
Share on other sites
quote:
Original post by Raloth
game: hey engine, go do this
engine: ok
game: wait, how are you going to do it?
engine: why do you care? it gets done, doesn''t it?

You can see how the game talks to the engine but you don''t know what it is really doing


why does this make me confuse engine with API functions?

Share this post


Link to post
Share on other sites
API functions do specific things only, like graphics (OpenGL), sound (fmod), and so on.

Game engines do everything that games using that engine might need or share in common, like reading a config file, loading a level, displaying a 3D model, playing background music, and so on. Some game engine are extremely different because they are made for different types of games in mind (RTS, FPS, MMORPG, etc.).

Got it?

---
shurcooL`

Share this post


Link to post
Share on other sites
quote:
Original post by shurcool
API functions do specific things only, like graphics (OpenGL), sound (fmod), and so on.

Game engines do everything that games using that engine might need or share in common, like reading a config file, loading a level, displaying a 3D model, playing background music, and so on. Some game engine are extremely different because they are made for different types of games in mind (RTS, FPS, MMORPG, etc.).

Got it?

---
shurcooL`


API stands for "Application Program Interface" (At least according to hyperdictionary, http://www.hyperdictionary.com/dictionary/API). All that mean is that it is a standard set of functions shown to the outside world by whatever is implementing the API.

Basically everything that interfaces with other components implements an API, except for the final bit. All libraries have an API, for example, listing what functions they provide, what they return, and so on.

More specific examples would be the DirectX, d3d API, or the OpenGL API, both of which show a standard set of functions to the outside world.

Another example is the Quake3 Graphic Engine, which has an API used by the "Game Engine". Graphic Engine being the actual "quake3.exe" and Game Engine being cgamex86.dll or whatever the dll is called. The quake3.exe exports a specific set of functions that the game dll can use to render graphics, make network connections and so on.

[edited by - _BUU_ on December 25, 2003 3:59:08 PM]

Share this post


Link to post
Share on other sites