[ENG] Discussion: Write my own engine or use an existing one?

Hello developer community!

During my time in the Indie-Game development the discussion about creating an own engine came often up. Therefore i decided to write an article, a small guideline about whether writing an own engine or not. We’ll have a view on the advantages and disadvantages writing an own game engine. This article will be a structured guide through the whole decision process. In front i can say one thing: it really strongly depends and there is no clear “yes” or “no”. As i stated before, this article is a structured guide about pro and contra of writing an own engine or using an existing solution – there is no cake….. (…the intention in this line is: there is not absolute truth whether writing an own engine or use one which already exists).

*** GUIDE Version 1.01 ***

1. Introduction

The Idea to write an own engine is not as bad as most of the people say. I’ve heard a lot of statements against the implementation of an own engine. The top-reason was the statement, that the time you spend in writing an own engine could be used better in using and developing on an existing engine. I really don’t know why this is even an top argument. The decision to write an own engine is really situational and should not be canceled because it seems to be “alot of work”. By the way, most of those people even didn’t write an own engine or even hadn’t good programming skills to perform such an intensive task. It is intensive, because a game engine is one of the most complex programs you can write. It contains a hell a lot of math, a good understanding about writing memory efficient code. An asset, or even must have, is always structured programming, but this should be a matter of course. So, the excuse that writing an own engine is a heavy task should not be the reason to cancel the idea of writing engine-code, it should me more seen as a (personal) challenge, and last but not least – the fun!
I really want to point out again that a stable knowledge of mathematics, especially vector analysis and vector algebra is a requisite. This makes game development really a bit more easier to understand and you are may faster finding solutions for you very special problem. Of course, other aspects of mathematics are required, too. It can be done hard without any knowlegde of it (possible, but hard).

2. Using Existing Solution.

Before we start to discuss about writing an own engine, i’d like to point out some ideas and point of views to think of using an existing solution. Even the choice of picking a solution should be though about. In this section some general ideas behind using an existing solution will be discussed, as well a small overview about existing solutions. In the end of this chapter I’ll try to explain why using an existing solution is not always as good as the pros about it may implies doing so.

2.1 General idea behind using an existing solution

The general idea behind using an existing game engine is simply time saving. It’s just simple as that. Existing game engine usually come with a bunch of toolsets which let you create a prototype of a game in no-time. This requires of course practical knowledge about using an engine, knowing it’s workflow and last but not least knowing the specific vocabulary defined in the engine – for better research in the documentation or help. There is no standard-vocabulary except for some few exceptions, for example render/rendering, physics and so forth. That’s all about the general idea, i don’t see anything special or more reasonable grounds behind the general idea of using an engine.

2.2 Features of the game engine

The next question in the discussion should be, what does the engine feature innately. Even on this topic, it really is strongly dependent on what you want to do. In order to make this quick: if you are interested in technology itself, then the only feature of the engine should be open source which is closer to write an own engine than using an existing one. Therefore, the pure open source variants won’t be take into account on this. Instead, we will look into authoring features, which should be within the engine. In my opinion there is a wide range which could be in the engine – from rudimentary authoring features up to deluxe all in one tool. There is a set of must-have features and some features which are nice to have and could be discussed even more deeply. So, before i start more and more into detail philosophy, i’ll give a shot at the features i’d like to have in a minimal setup. This means, without these features, the game engine is either incomplete or not “good” enough. So, here comes the minimal features list.

2.2 Documentation

Right. Before we even look into all other possible features, the most important,  non-missing, mandatory feature is the documentation. An engine without a clear and up-to-date documentation is nearly worthless. Before you start to have a look into an engine, make sure the documentation (on- or offline) exists.
Subfeature: Close to the feature documentation is an active community. A wide community is sign that the engine is used widely, even to analyze is the activity of the supplier of the engine. The more active roles there are, then probability a continues work in the engine itself is more likley.
The first reference should always be the documentation of the tool. Before you even think about to ask a question on how to to specific things, try to understand what you want and how you could do it – search the documentation and try to be smart.

2.2 Consistent/stable GUI

The second feature is a consistent GUI. The GUI is simply spoken the interface between the user and the authoring tool(s). I think that he most users are not aware about the GUI-Topic – still it is one of the important features an engine must have. The GUI is where you create and author your game: You may use built-in import-tools, you want to drag-n-drop one item from a folder to another etc…..As the GUI is not good as the user expect it is, then the tool is again nearly worthless. This doesn’t imply the complexity of the features, rather it is about that the GUI won’t crash after you do some actions. It should be intuitive after a while and keep no surprises in using it.  Again, in short words: the GUI should be easy to use and be very stable – that’s it.Documentation and Consistent/stable GUI are mandatory and features, which every engine must have. But still, those two element are not yet the final premises of an existing solution. Furthermore we have a look at the uses cases of the engine. As there are some good and stable general engine, which can be used for a countless of uses cases, there exists some engines which have limited features. The limited features does not make an engine necessary a poor engine, it’s like a specialized engine which can be even better in some use cases than a general one. Knowing this, the discussion leads now to the use cases of the game engine.

2.3 Use cases of an engine

There are a plenty games engines out there. Each engine has its advantage and disadvantage. Assuming that the Documentation and the GUI are in a moderate way, the third subject should focus on the use case. Before we dive into this topic, the question should be what do we want to create? Do i want to make a prototype, do i plan to prototype and then develop the game in the same work space, or do i just want to start to develop the game-features without getting a prototype done. So analyzing the needs of your game should be done beforehand choosing the game engine. Maybe you are not sure yet and just want to “play” with the engine itself, then the decision differs from having a concrete plan.

2.3.1 Choosing a specialized game engine

Having a concrete game idea makes the choice of the engine a bit more easy. To be more specific and as an example it is assumed that a RPG Game will be done. Either you can use a general engine, which will be discussed in the next chapter, or you use an engine which is especially design for creating RPG Games. In order to do so, i strongly suggest to read a lot of pre-documentation and features the game engine provides – or if there are even assets/plug ins provided by a third party to build your desired game. If we stick on the RPG-Game idea: You may want to create an action RPG rather than round based one. To check the features of an engine, use the official site of the choosen product. If the feature is not listed, try to do some research on your own. As an example, RPG Maker could be the choice. We assume now that RPG Maker has only a round based battle system out of the Box. In the next step, you perform a search on e.g. “RPG Maker action rpg”. Read the articles on it, maybe check the documenation and keep an eye on user reviews – maybe the add-on does not perform well – or the other way round the add-on does not have the features you search for your special needs. Keep in mind that this RPG-Game idea is just an example to point – i am not sure if RPG Maker supports action rpg like gameplay out of the box or not. This can be applied on other special-design engines as well. I am pretty sure that there are a bunch of game engines which specializes on specific game genré. A list won’t be provided, since there exist game engines. Personally i don’t use specific game engines, except the once i wrote myself some time ago…nevertheless choosing such an engine could be a good idea for prototyping your game, or even a full creation of your game. Having a concrete game idea does not imply that you should choose a specialized game engine – it does not exclude automatically using general game engine solutions. Furthermore you should analyze using a specialized engine right before you get a general engine. For example, you want to create a 2D RPG game with round based fighting, then RPG Maker could be the choice.

2.3.2 Choosing a general game engine

Speaking of a general engine in this context, the meaning lays behind the possibilities of creating what-ever you want. On a general engine it should not mind if you want to create a FPS-, a Racing, a strategy- etc. Game. In this kind of engines you should be able to customize and programm the behaviour of all aspects of the game you want. This includes the camera (view) settings of the game, the behavior of the camera. The behavior of the camera mostly implies the type of game you are creating. For example. on an fps game the cameras position differs slightly from a third person shooter. A good example where both types are implemented are the Bethesda RPG Games like Fallout and Skyrim. There you have always the option to choose from a First Person View, as well from a third person view (behind the player).
General game engines could be the well known unreal, unity3d or crytek engine. I think even GameMaker: Studio is nowadays a valid option, although i never worked with it. It seems, that GameMaker: Studio made a competitive game engine for today – there are solid and commercial successful games like Risk of Rain and other on the market. The discussion leads next to the pros and cons of a general engine.

2.5 Pro:

To start of with, let’s have a look at the pro arguments.

    • With a general game engine you have first of all the full flexibility in your game design process. The only restriction a general game engine should have are either your imagination or some license-type issues – like using a non-free/non-open file format, whatever it is.  The characteristics  of a good general game engine….- with a good documentation (mandatory) and a active community (very nice to have) you have nearly endless possibilities to create a game. If it is possible and applicable for your project you should always keep an eye on the internal markets, e.g. asset store in unity. There you can find free or paid resources in order to dive directly into game development.
    • techniques: a general game engine usually comes with all the core features you need in gamedevelopment. These are rendering, in- and output handlers for sounds and userinput and physics. Most, maybe all offer a scripting feature, so that you can implement your very specific gameplay-features. As far as i know you should be able to write you own shaders for gfx-enhancment in the most engines, too. In this point I didn’t any research if there’s a game engine which does not support shaders – but that’s just not the point right now.

Those points could be called basic engine features. Don’t be fooled on the word “basic”. In this context the engine took alot away from you. If you implement the basics, without any super-special nice thingy, i’d estimate a developing period from 2 up to 6 years, depending on what you engine is capable to do. All other nice features are also developed in years and are always subject for improvement – in nearly every engine. Based on the assumption, that the physics works flawless, you always have updates on the rendering core. The render component should never be seen as final. Reasons are for example more capacity on the GPUs and CPUs, even new technologies to render on. If your name is not John Carmack, then i think you shouldn’t be able as easy as him to program an engine which is able to render near realtime – i think his problem is the capacity of the computer. Just sayin’…..So, all this hard work on code is simply said not your problem if you choose an ready-to-build engine. For the selection of an ready-to-use engine a guide may will follow.

2.6 Cons:

The cons of using an engine are fairly short, but should not be underestimated.

  • the basic training period can take between half a year up to two years.
    •  depending on your study time and comprehension this times may vary
    • on the premisse that you are working once to twice a week for 4-8 hours per session
    • these still provides a stable learning curve if you can remember things well
    • Note: in this time you could have written some good, own core in your engine (2 years is a realistic time for programming a simple and stable engine – reminder: not full featured and high end, of course!)
  • These are only estimated values: depending on your pre-knowlegde and understanding on using the engine and time you take for learning new techniques, it really strongly varies.
  • License Fees can occur
  • you encounter bugs in the core of the engine, which you can’t fix or fix with a well though workaround (which may slows the performance of your game, in think those should be rare nowadays)
  • no fun in using their “system” – it is not that big issue, but it can be… 😉
  • …more cons may to come.

2.7 Conclusion:

Before you start using an ready engine, make sure you evaluate all the features the engine provides. In the next step you should make sure to read enough user-experience, because every company will post the features, but never the flaws on the engine. Maybe an engine has tons of good looking features, but the usability and the functionality is buggy as hell.
Despite the pros and cons, i think using a (good) game engine nowadays is no problem at all, there a some really good out of the market which comes with affordable license policies.
After all, the discussion is not yet completed. Furthermore we continue to think about writing an own engine. Doing so and what does it take to write an engine will be discussed in the next chapter of this guide.

You can look into a good comparison chart, which compares Unity3d vs Unreal Engine vs Cry Engine. It is not made by me, but sure useful for a quick overview.

3. Writing an own engine

In order to shorten things up, I try not to repeat any of the information stated in the previous chapters. I want to try to keep this part as short as possible and deliver as much as information needed for your consideration – sometimes less is just more!

3.1 What do you need in order to write an engine – Basic requirments

Before you even think of writing your own engine, you should consider following points:

  • good understanding of any logical context,
  • good and stable knowledge of your desired programming language
    • can be C/C++, C++, C++, or any other language, e.g. C#, Java, Fortran…..
      • C/C++ is just awesome if programmed well (i’d rarely choose another language for writing my own engine…XNA with C# is just on exception)
      • Sidenote: when i started writing my own engine, i had many aspects from the C++ language to learn (i had very stable advanced knowledge, but still i wanted a perfection in my code)
  • good understanding in algorithms and data structures
  • know how to use some “tricks” (or the idea of using some tricks) coding close to hardware (for example using bitshift-operators where they fit, using pointer-arithmetic are just a few examples).
  • a lot of endurance
  • good knowledge in at least following fields:
    • algebra
    • vector analysis
    • geometry
    • trigonometry
    • (couldn’t think in more fields, i’m sure there are even more…)
  • the idea, how to put anything of the stated fields above in a consistent, working and logical way
  • cleverness and creative ideas for implementing functions and algorithms
  • know how to use google, just in case….
  • A good book which I used myself to verify my architecture ideas for a 3D Engine was the Book Game Engine Architecture – either you lend it from a library or you buy it from Amazon
    • this book gives a very good look into a game engine design and got some got C++ Examples in it.

If only just a few points apply, DON’T give up! If your will is there and you keep this will up, I am pretty sure you may be able to write an engine and learn all the stuff from above yourself. As i said, there are many smart people who can do this without any studies or else. For myself, I needed an university-study (computer science with the elective subject computer graphics) in order to collect knowledge and understand the basic concepts of all points of what is needed to write an engine – so good luck whatever for a path you choose to become a game-engine programmer! Last but not least I really want to point out that all the knowledge stated above is also useful when choosing an existing engine – it just makes the live more easy!

But let’s have a look in a detailed discussion of writing an own engine.

3.2 Considerations on writing an own engine

Chapter 3.1 didn’t stop you from reading? Fine! You are brave and this is why we dive into the next chapter. I want to present you different scenarios and ideas why you should write your own engine. The following topics will be only from the viewpoint as an individual or a small team. Considerations in a well established and big company differs strongly compared to the considerations of being an individual or a small team. Don’t forget do take time and money into the account as a general discussion. I think the following chapters will be short, since we won’t have a deep look inside of how to write an engine. This is just a big topic which can’t be discussed in a single topic. Therefore I’ll write just some ideas and opinion. Note: Maybe a base engine design will be follow up.

3.2.1 Demand of having a special engine

In this Chapter we’ll have a look on some demands may occur. As i wrote above, we’ll keep this a short, since i only want to point out some general ideas. One Time Engine

One of the considerations is to write a small engine just with the parts you need. I’d like to call this the “sniping” method. You code a smooth, small engine with the needs of your desire. It doesn’t have to implement all the full flexible and generic engine features. Personally this can be good and fast, but on the other hand if you don’t write the code good enough, you will have a one-time code with out re-usability. The approach to write a “one-time” engine can be seen as the quickest way to achieve your goal when writing a your own game code. Reusable Engine

Another option could be a to write a reusable engine for one special genre. Maybe you even want to create a flexible engine, but limited engine. This could be a Jump’n’Run Engine, a RPG Engine (like a smaller Version of RPG Maker) and so forth. You could write of course a Full-featured 2D Engine but this is more complex to write.  If you write a Jump’n’Run Engine only, then you could write a less general code, for example the behavior of camera movement is limited, examples are:

  • smooth scrolling,
  • Level-parts Scrolling – you see on one screen the a whole level part, and when you change the scene, the camera scrolls just to the next one (rarely used, i think it’s ugly though)
  • a mix of both

You can image that just for a Jump’n’Run Engine you have some more features which differs slightly. There are even more examples, just try to image some – as a hint I’d say Player-to-Enemy behavior. Of course, you could write a limited engine with a smooth set of features and produce a couple of games with it, without changing the gameplay logic itself, or some slight modified features from Version to Version. Even new features are possible, depending on the engine’s architecture. Here again, think of Super Mario Bros 3 compared to Super Mario 3D World. I doubt that these two games share the same engine. Super Mario Bros 1 and Super Mario Bros 2 share the same engine with different, added or modified features. They use the same engine, added a bit salt (more logic) into to the recipe (base engine), bake it (compile) and voilá – you just created complete new feeling of a game with an altered engine. Of course, creating one of those types takes more time than a one-time engine. Just have a look at Wikipedia. Read the Super Mario Bros2 JP section and you get the idea. Summary of the demand of having a special engine

I hope you got my point here – if not please write a comment and I may answer your questions. The point in this two sub chapters is, that you either write a one-time code with a limited general features for usability or you put a bit more effort in writing a more general engine for a sub genre.

Engine examples for a general sub genre:

  • MUGEN – for 2D Fighting Games, mostly Street Fighter like
  • Beats of Rage -for 2D Fighting Games, mostly Streets of Rage 2 like

Example for one time engines:

  • Terraria
    • nice Game and stable engine, but most features are hard coded and are not generalized. Turning this game with its sources into something else takes a lot of coding-effort, instead of “customization”.
  • can’t think of other games, since i didn’t have access to their sources. Maybe DEFCON and Uplink are possible one-time engines.

3.2.2 Writing an engine: collecting experience at so many points

The other reason to write an engine is the tons of experience you will gain. Writing an own engine does take even more then the basic requirements. Your code needs to read as fast as possible files from the hardisc, needs to play some audio in order to make the engine/game more complete, maybe you stream the files and so on. There are a so many aspects in writing a game engine that I really think if you successfully wrote yourself an engine, you are maybe one of the best and most valuable programmers out there – there are only a small count of other programming tasks which requires that much of skill. Other projects, at least in my experience, looked really simple and sometimes even boring. My hint is, you should never try to compare the different projects, otherwise you will be bored very quickly on each other project after you wrote yourself an engine, take this just as a note.

4. Summary

The discussion is about whether writing an own engine or use an existing solution. Instead of giving you a straight forward answer, i tried to point out some ideas what case suites best for you. I think there is no easy black-and-white answer in this topic. In fact there are many points you should think about before making your decision. This guide should give you an overview of some possible approaches on the topic.  Some base questions are:

  • do you need a general engine which requires a lot of customization in scripting? (like Unity – Game Engine, Unreal Engine etc…)
  • do you need a special engine for one use case, which contains less customization so that you can concentrate more at the content?  (like RPG Maker, Visionaire Studio etc…)
  • do you want to write a one-time engine for one game?
  • do you want to write a more general engine for a special genre?

All of these questions have been discussed and gave a view on what is possible. Now, for my personal opinion. I think if time is no object, then you should write a game engine. It is more fun and you gain good coding experience as well you learn many aspects in programming. Creating a game/engine yourself is really satisfactory. Now, if you want to have as soon as possible results and go for a rapid development, then an existing engine should be the first choice. Often you don’t need to mind in the basic aspects, but more in the gameplay logic itself. Choose wisely!

5. Comment

One big point i didn’t took into the account was the content creation for your game. You need graphics, Models, Animation for your models, Sounds and so on. There are some good resources if you want to start straight forward. You have already an idea, but you can’t create the content? With some basic resources you can at least build your basic game mechanics from your idea, even it is only for a preview, alpha/beta version of your game. I think often you don’t need a full featured content for implementing your desired game logic. For resources take a look at OpenGameArt.


6. Document Version

Version Comments Released
1.0 Initial Release 20.02.2016
1.01 Added comparison hyperlink in chapter 2.7 25.02.2016

Please feel free to leave comments, greetings
wolfomat for gamesground.net

Ersten Kommentar schreiben


Deine E-Mail-Adresse wird nicht veröffentlicht.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.