Games built by game studios are made using pre-existing engines. Engines are game frameworks, which contain all the rendering, collision and interaction code, but without the content.
But you could, in theory write a 3D game without such an engine.
Typically a game is a loop in which you
- Poll inputs
- Update the game world (including interactions)
- Draw the game world
The game world is usually stored as some sort of scene graph. Where each node has a visual representation (a model) and a transformation in space.
With one node representing the camera. The transformations are often represented by 4x4 matrixes (which are very convenient for representing orientation and translation)
At this point you can multiply out all the transformations and produce a model matrix for each item in the scene.
An inverse version of the camera matrix provides a view matrix.
And a third matrix is generated which maps coordinates into screen space. (The projection matrix)
Models are rendered one at a time, by sending geometry to the GPU.
The GPU will have a vertex shader that transforms them (using the Model/View/Projection matrices) and projects them into screen space.
A fragment shader will then take care of generating colours for the rasterised polygons.
Dynamic lighting is also possible at this point.
I have written some of this stuff, and one of the hardest parts is getting 3D models into the engine. This often involves parsing a file format (like Collada) into your internal structures.
To make a playable game.
You typically write one or more playable prototypes, in an attempt to find some fun. Game design documents are produced which set goals for the title.
Artwork is produced which also defines an end goal for the look.
Initial production is often focussed on producing a vertical slice. A narrow but deep fragment of the game. So the game will look and play as finished, but will not be the full content.
At each stage, the intention is to reduce risk, and demonstrate value.
The full production stage will often involve the most labour intensive part of production, where content is generated for the entire title.
Marketing materials will also be created in time for publishing...

تعليقات
إرسال تعليق