Steps and process for creating a game engine

Started by
26 comments, last by nef 17 years, 10 months ago
I did write one, and tried a full rebuild and it doesnt work.
It only gets rid of the linker error when I take the pointer out of the function, but then my function cannot work because the variable I am passing into is a char pointer.
Advertisement
I fixed it.

Here is a small demo of what I have so far.

Link

ONCE THE LAST IMAGE FADES PRESS ESCAPE KEY TO EXIT!

I decided I wanted to add a sort of pre game cinematic. Not really a movie, just text on the screen, and I am going to have a cool voice read it, and have all these image fades and transitions in between slides that I am going to have to program.

But everything so far can be edited through the settings files, well not everything, but everything I am going to want to change usually from project to project. I am planning on making an editor in VC# 2005 to quickly type in the values for the settings files so I can easily make new ones very quickly, and so can anyone else who decideds to use the engine (probably no one, but still a cool feature to have )

[Edited by - Fixxer on June 14, 2006 10:46:59 PM]
Quote:Original post by Fixxer
I decided I wanted to add a sort of pre game cinematic. Not really a movie, just text on the screen, and I am going to have a cool voice read it, and have all these image fades and transitions in between slides that I am going to have to program.


What you could do is make it a powerpoint presentation then capture the output and make some voiceovers then just play it like an avi file. You'd be saving signifficantly on programming effort that way :D
Quote:Original post by lightbringer
Quote:Original post by Fixxer
I decided I wanted to add a sort of pre game cinematic. Not really a movie, just text on the screen, and I am going to have a cool voice read it, and have all these image fades and transitions in between slides that I am going to have to program.


What you could do is make it a powerpoint presentation then capture the output and make some voiceovers then just play it like an avi file. You'd be saving signifficantly on programming effort that way :D


Or any movie editing software. If you dont want to buy a piece of software, windows has movie make which is pretty neat for free. Also you will be able to save it in many formats which can be loaded by your loader.

Good luck.
I could, but with the splash functions I have already made, I can simply just edit the audio, and just add more splash screens to the splash cfg file :)
Quote:Original post by Fixxer
I could, but with the splash functions I have already made, I can simply just edit the audio, and just add more splash screens to the splash cfg file :)


That's another thing I wanted to comment on after watching your demo - are you writing a game or an intro screen scripting system? :D
A game.
The intro screen is just part of it.
I am working on the main menu now.
Here is my take on it:

Step 1:
Think about what systems your game engine is going to need. Here is a general list:

Renderer - To render data and on the screen.
Input - To take in input from the mouse and keyboard each frame
GUI - To keep track of, update and or render the 2d gui part of the game
Entity - A renderable object heirarchy
Math - A library of math functions to use
Object - Game objects, such as barrels, worlds, monsters etc. Interactable entities in the game.
Asset System - A way to keep track of any data that's been loaded into the game, so you don't load things more than once and can clean everything up.

Game - The big game system that updates each subsystem one per frame.

^^
You can add more systems like an AI system, if its going to be complex enough that it would be a good idea to give it it's own system. Maybe even a seperate loading system to go along with the asset manager so you can load individual parts of the game dynamically (IE: levels)

Step 2:
Break some of those into sub systems, and try to think of a way they can all interact. The basic idea would be that the game system is a finate state machine. Is it:
A.) Loading in a new level
b.) Currently playing the level
c.) Currently in the main menu
d.) Game over

So you might start the game, and the game system starts off in state A, loading.

It loads in the main menu data and then jumps into main menu state.

Next the player clicks play game, so it jumps into loading state again, and loads in the next level. When this is done it jumps into playing the level.

You can jump back between menu state and playing game state.

During playing game state, you update the object system, which internally may use the math library for collision and movement in the world. The gui would be drawing the current hud and you render the data. SO each frame may look something like this:

UpdateObjects();
UpdateGUI();
UpdateInput();
RenderScene();

Your game logic is split up. Maybe you have a player object that is part of the object system. Inside it's update it can ask the input manager to see if certain buttons where pressed, if so it can move the player object, which moves the camera object.

-----------

That is a rough breakdown of how i see a simple game engine. You can get even more advanced by looking into a messaging system that allows any system to talk to any other system without getting trapped into dependencies. I would try to think about what your game is going to do and what you want to be able to do and try to fit a design around that.

Even if you just draw boxes on a piece of papper representing individual systems and draw arrows to show how they interact with each other, you will get a really good idea of how you want to approach building your game architecture.

This topic is closed to new replies.

Advertisement