Game Engine Programming

Started by
36 comments, last by Spartan322 10 years, 5 months ago
I have to disagree with Phantom. If you have written a game before, you should be able to have some form of an idea on how you want the engine to be structured depending on the type of game you want to target. I have done exactly that and it work out pretty well for me. Now if you want the engine to handle all sorts of games then that is totally a different issue on his own, but that does not mean it is not possible.
Advertisement

I have to disagree with Phantom. If you have written a game before, you should be able to have some form of an idea on how you want the engine to be structured depending on the type of game you want to target. I have done exactly that and it work out pretty well for me. Now if you want the engine to handle all sorts of games then that is totally a different issue on his own, but that does not mean it is not possible.


Well yes, if you've already made a decent game you'll be able to distill some components which could function as a basic engine, but the OP has only a minimum amount of C++ experience and is trying to write an engine from scratch, which is generally seen as a big don't.

@OP:

A decent general-purpose engine will take you years to implement, even if you were an experienced programmer. There are a huge amount of aspects to an engine which should be taken care of properly, I'd advise you to search the forum a bit for engine-related threads to get some more info on what it actually takes to build one.
There are 2 valuable "rules" which are quoted a lot around these forums when it comes to engine development:

1. Make games, not engines
2. If you have to ask how to build an engine, you're not ready to build an engine

Also as a general programming tip: Avoid the singleton pattern. I know it sounds like a very simple and good solution to some problems at first, but when your program grows somewhat it will pose a lot of very annoying issues. Right now the singleton pattern could still work out for you if you're not writing anything too complex, but it's best not to teach yourself bad programming habits, trust me smile.png

I gets all your texture budgets!

I already have a game in mind:


Also I have written games before, ( re-written actually ). Our school projects were to rewrite an existing game.
The games written then was by using the Game Engine received from a docent.


Thanks everyone for the comments! I'll start out with designing a tiny engine for the game I have in mind, and try to expand it with making other games.
I disagree with:
"If you have to ask how to build an engine, you're not ready to build an engine" [/quote]
I can write an engine with the experience I have at the moment, but, the framework will be terrible. So I'm asking how to write an efficient engine, a whole other thing than just writing 'an' engine. ( example: the 2 engine's I have received from school laugh.png )
But the comments I've read say I better start out with creating the games first and try to expand the engine from that. smile.png


Is there somewhere I can post my progress on this site? To get feedback & to help others.

Kind regards,
Jonathan

Is there somewhere I can post my progress on this site? To get feedback & to help others.


Start up a journal on here, that'll give a centralised place to track your progress and something you can look back over in the future :)
I will suggest to take open sorce engine and start to make game, after some experience yuo could modificate engine to fit your needs closer...
I suggest you to start your work in following order:

  1. Simple window with initialized DX renderer
  2. Image loader / Material Manager
  3. Timer
  4. Input
  5. Camera
  6. Model loader / Model Manager
  7. Shader Manager (load & compile hlsl shaders and use then im rendering)
  8. Collision detection/physics, i suggest You to use free physics library, Newton Physics is good and free for commercial products
  9. Entity manager to dynamicaly create and delete objects (for example. guns, medkits, enemies etc), this should be running at constant 30fps so it will be easier to update games over network
  10. User Interface (menus, huds...)
  11. Sound engine, OpenAL should be good enough to give it a try
  12. Particles & effects
  13. Post processing
  14. Networking and prediction

This is enough to create a game, rest will depend on what else you need. I'm still creating engine for my game and so far it took me 5 months and im fighting with optimilizations and networking, networking is the worst thing you will have to deal with.
To develop an engine you need at first and only: Motivation
Without a game in mind which will use the game, you will lost your motivation very fast. Or why do you write it?

I myself started to develop an engine when I was 15 or 16... I had a game in mind... a big multiplayer first person shooter which was located in an open world. So I started... but don't find a good starting point... I really lost my motivation very fast. But this was not the end. After that I started to make an animation film... Again, I failed. Then I started a novel and understand that I really don't want to play or make a game.
I only wanted to tell a story. So I started my novel and continued to write it even today. I also continued my engine and it grew and grew... Today it is not finished, but this time my motivation is to make a game for my novel and to design huge software architectures. I really love design and this is the reason why my engine is alife even after 5 or 4 years.

What does that have to do with engine development?
Very much. Motivation is the most important basis you can have. But don't let it fly away. Fix it to something. I wrote myself a novel. What have you done?

Also buy books... many books... ten is not enough biggrin.png
Like Game Engine Architecture. Read all of them. Love them and of course understand them.

When you really only want to make a simple game you should use other available engines. Like Ogre, Irrlicht or maybe Unreal, Unity and if you really love high end, the CryEngine.
You have to invest a lot of time before you get something useful which you can call an engine. You will rewrite it many times. And everytime it will be easier. You will understand more and it will make you more fun. Of course there are also times where the motivation is down. Don't make you mad, you don't need pressure of time. I failed many times and I'm failing even today, but don't lost your motivation.

Maybe I've told a lot, but someday you will understand.

So at the end my suggestion to you:
Do it! Start your game engine development adventure!

Happy coding!

Ömercan
Reading, Reading, Reading... why do you read not more?
I have a blog: omercan1993.wordpress.com look there for more content
And I also do some art: omercan1993.deviantart.com
And whats about the Pear3DEngine? Never heard of it? Go and look!
Yeah, and currently I do this: SimuWorld

PS: Please look at this poll on my blog about scripting languages: A opinion poll about scripting language
Thanks guys for the help & motivation !! happy.png

2. Image loader / Material Manager[/quote]
What do you mean? Is it like projecting an image on a Polygon?
And Materials, as in materials in 3DsMax?

Very much. Motivation is the most important basis you can have. But don't let it fly away. Fix it to something. I wrote myself a novel. What have you done?[/quote]
I have tons of game ideas so my motivation will keep going for quite a while. smile.png Also I am active on concept artist websites which give me motivation to paint, which gives me even more motivation to program and use those own painted textures/sprites/models.
The only disadvantage I have is that I want too much at a time.

I have tons of game ideas so my motivation will keep going for quite a while. smile.png Also I am active on concept artist websites which give me motivation to paint, which gives me even more motivation to program and use those own painted textures/sprites/models.
The only disadvantage I have is that I want too much at a time.


To paint is great! I also do that... but my paintings are... hmm.. "okey"... But I can draw very well :D
To have too much idea is normal :D
Reading, Reading, Reading... why do you read not more?
I have a blog: omercan1993.wordpress.com look there for more content
And I also do some art: omercan1993.deviantart.com
And whats about the Pear3DEngine? Never heard of it? Go and look!
Yeah, and currently I do this: SimuWorld

PS: Please look at this poll on my blog about scripting languages: A opinion poll about scripting language

I suggest you to start your work in following order:

  1. Simple window with initialized DX renderer
  2. Image loader / Material Manager
  3. Timer
  4. Input
  5. Camera
  6. Model loader / Model Manager
  7. Shader Manager (load & compile hlsl shaders and use then im rendering)
  8. Collision detection/physics, i suggest You to use free physics library, Newton Physics is good and free for commercial products
  9. Entity manager to dynamicaly create and delete objects (for example. guns, medkits, enemies etc), this should be running at constant 30fps so it will be easier to update games over network
  10. User Interface (menus, huds...)
  11. Sound engine, OpenAL should be good enough to give it a try
  12. Particles & effects
  13. Post processing
  14. Networking and prediction



This probably does not affect the plans of the OP but still: Networking and prediction last? Yikes!

I'd say work your way through the list but leave all sorts of networking out of your first engine. Then, when you fell like you would like to add networking, start over again (probably using the parts of the first engine that you feel are working well) but plan the engine with networking in mind from day one.

I implemented things like NAT punch through, lobby servers and matchmaking before my engine could even create a window, and it has really payed off. I feel this is the only good way to create a networked game engine. This might be why you feel that "networking is the worst thing you will have to deal with".

That said, you can probably create a fully functional renderer and use it in a networked game engine just fine, as long as the renderer is separeted from the game logic, but only start create the GAME engine systems when you have your network layer figured out.

Just my two cents...

This topic is closed to new replies.

Advertisement