Jump to content
  • Advertisement
Sign in to follow this  
Zoheb Satta

Game Engine, How do I make one

This topic is 2145 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, I'm really interested in making video games and I've been reading a lot of beginner posts on this website and a lot of people ask what game engine they should use to make their games. A lot of people name engines, but a lot of people also say that you should make your own. My question is what really is a game engine and how do you make one? 

Share this post


Link to post
Share on other sites
Advertisement

Creating entirely new engines is only necessary when there's none that fit your needs, what doesn't happen often.

Sometimes it's like you have a free nail gun but ends up creating a hammer (and using the nail gun, o'course).

 

Why do I say that? A game engine is supposed to satisfy the needs of specific game types or the needs of games in general. In other words: To create a game engine you need to understand the needs of a game, whats necessary to bring it to life.

 

So, you need to know how to make a game in order to make a good engine. If you don't know what a game will need it'll be painful to create a good engine; guess, try, repeat until successful.

 

If I were you, I'd use a free engine and when, and only when, you've made a simple game (a Mario clone) you should consider messing with engine creation...

Share this post


Link to post
Share on other sites

Please note unless you think it would be a lot of fun to make an engine... You could easily find yourself spending years making an engine without ever making a game. Or you could make a game with an existing engine in a week or less.  Just make sure you're happy with your priorities.

Share this post


Link to post
Share on other sites

Keeping it simple, a game engine is a software that makes games. It comes with tools and features to help you make your game. 

 

There are bunches of game engines out there, some free others free as long as you don't use it for commercial reasons (to make money). Others still are free and open sourced. If a game engine is free as well as open sourced, that means that not only can you use it however you want (commercially or not), they also let you see the source code (which means they let you see how the engine is built and they let you modify the engine to your liking. 

 

Of course, if the selection of game engines do not meet your requirements, as noted in other posts, then you might want to make your own. But making a game engine is not easy at all, and can take a very very long time to do. This is why people suggest already made engines for beginners. 

 

One downfall I recently saw of someone making a  software free and open sourced is that once they did that, other people took the code and published the same exact software on an app store with a different name and made it NOT free and acted as if they made it themselves. This is so rude and selfish I think. 

 

Usually you want to just see how the code works to get ideas. Perhaps you will make small changes for your own needs. This is why many people are forced to make things for non commercial and charge you royalties if you do use it commercially (never understood it before). 

 

Now, if you were to take a free and open sourced engine and make it so different as to not be able to clearly distinguish major differences between the base engine and your new modified version of the engine, then perhaps it wouldn't seem so leecher-like. 

 

Anyhow, hope this helps. 

Edited by Tutorial Doctor

Share this post


Link to post
Share on other sites

 

Why do I say that? A game engine is supposed to satisfy the needs of specific game types or the needs of games in general. In other words: To create a game engine you need to understand the needs of a game, whats necessary to bring it to life.

 

So, you need to know how to make a game in order to make a good engine. If you don't know what a game will need it'll be painful to create a good engine; guess, try, repeat until successful.

 

 

As I own a good number of questions here concerning game engine creation, i can tell you that the quote above is very accuratehappy.png  . You need to create a game(s) in order to make a game engine. I realized this when reading the game engine architecture pdf. You should read it too if you intend on making yours.

 

 

Creating entirely new engines is only necessary when there's none that fit your needs, what doesn't happen often.

 

Unfortunately for me, that is the case and i like itrolleyes.gif . Got serious 3d game engine ideas but i ain't gonna make anything until i've cloned better versions of the games i know starting from the least complex to the most complex.biggrin.png

Edited by Nathan2222

Share this post


Link to post
Share on other sites

My question is what really is a game engine and how do you make one?

 

A game engine is a system for making games—an application, or more commonly a library, providing services such as audio & video output, controller input, timing, physics, and so on. How do you make one? You don’t. If you want to make a game, you should make a game. You will not accomplish that goal, nor really improve as a software developer, by creating middleware without specific goals and requirements in mind.

 

Just pick an engine (or less—a basic graphics+audio+input library such as SDL is fine) that’s compatible with your style of thinking and/or your preferred programming language. Use it to make something. If you encounter limitations, take the time to understand and work with them. Working under constraints will help you think more creatively. Keep a diary of these situations and maybe next time try a different engine.

 

You can learn a lot by making an engine—about systems programming, graphics, audio, input, API design, and infrastructure in general—but it’s best to fight on a single front. Want to make a game? Take advantage of the work that others have done. Interested in engine design? Do it as a learning exercise. And anyway, you can learn all of those skills in other ways, incidentally, in the process of creating useful software.

Edited by EvincarOfAutumn

Share this post


Link to post
Share on other sites

For your first game project? Forget it. Just write a game, get familiar with the key concepts, spend time learning the libaries you will need to use regardelessly (DirectX, OpenGL), if you really plan on writing a game engine at some time. If you plan on using some libaries to make things easier for you, like SharpDX for graphics or SFML for input etc... , then start with using them in your first game projects and get familiar with them. I wouldn't totally agree with "Don't write a game engine" in the way that this sentence often is put, but I do have to confirm that writing one for your first projects is just ludacris. The reason being, that your first games code will suck. It will, there is no way around it. Writing an engine means writing code that is somewhat meant to last and reused, and if you don't know what you are doing you'll end up writing an engine that is so convoluted and horribly designed that writing everything from scratch would be easier than using it in future projects.

 

So now that you've written a few games and grown more and more on coding and game programming concepts, if you are still willing to write your own engine, be aware: Its not a task that will make things easier and faster for you. It will always take more time to write your own rendering architecture and graphics facilities than to use an existing solution (like Ogre3D, Irrlicht, etc... I'm not even talking unity or something like that). If you want to really just write games, eigther continue to code them, probably reusing some of your old code, or switch to something like Unity/Unreal/CryEngine and such. I'm not saying that the results of you writing a game engine might not be practical, but you have to see it as an in-depth learning experience, and not something that will save you time on making games. If that is your goal, again, screw the idea of making your own engine. Its never going to pay off. By the time you've probably gotten your engine to a point where its almost finished, even if you'd spend 8 hours a day just coding on it, the technology you used will already be outdated and you'd have to start over.

 

If you still want to make a game engine, because it doesn't make you uncomfortable that you are basically wasting your time doing so, than I can only give you an advice, sort of like you've already been told: Don't just write an engine, write a game to support it. Ideally, I'd divide your work into two layers: The engine layer, and the game layer. Treat the engine layer with care, spend some time thinking about the design, and keep in mind its the code you want to keep using for multiple projects. Dont hesitate to write code in that layer somewhat quickly to get it to work, but always make sure to come back and refactor it. Now that game, whatever you are working on at the same time, you should treat like just that: A one-time throw-away project. This is the only realy advantage I can see from writing your own engine alongside with a game: You can hack the gameplay/game logic as dirty as you want, because you've already put every bit of code that will be reused in the engine. So on the games side, just write code as fast and ugly as you please, once you're finish, only the engine you've written alongside is going to be carried on.

 

Which brings me to my final important point in this approach, always start coding from the games side. Don't just "I think I could use that feature at some time, I'm going to put it in the engine", but instead think about what feature your game is going to need next. Think about whether it is supposed to be reusable. This of course depends what your goal is: Do you want to have a RTS-specific engine, or something more general like Unity? In the former case, there'd be probably more code that goes into the engine, while in the latter one most genre-specific code would probably only last in the game. Keep in mind anyway, you can always use the game to experiment and move code that has prooven to work over in the engine, if you want to.

 

Just some thoughs of top of my head resembling my own experience coding an engine, hopefully some of it helps.

Share this post


Link to post
Share on other sites

Hi,

 

 

Creating a good game engine typically requires a huge team, 10,000s labor hours,  and millions of dollars if it is for commercial purposes.  This is no exaggeration.

 

 

Getting busy on your own 6-12 or so game source codes will be a prerequisite ( One at a time, of course ).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!