Prudence of Creating an Engine

Started by
21 comments, last by _the_phantom_ 12 years, 7 months ago
I'm hoping to get some opinions by starting a discussion on creating one's own game engine.

In my mind I can see a lot of benefits but also many downfalls of doing this. On one hand, one can learn a lot about gaming and the creation process by creating an engine. One can get all the specifics behind the physics, rendering, performance, and all the minor details that one usually doesn't pay much attention to. One can also customize that engine to their own specific needs, allowing for a more lightweight and specialized engine. I can see this all being very beneficial, especially for somebody doing all the programming for their game (I don't use the word 'indie' because it's rather vague). This allows the programmer to become intimately familiar with the whole creation process and every aspect of the game.

However, there is also another train of thought that I can understand. Creating an engine, I imagine, takes an enormous amount of effort and one will never be able to create something as effective as large companies can. Thus, creating an engine is largely a waste of time that can be spent actually making a game.

So, in essence, go for it if creating an engine is used for learning purposes, otherwise don't waste the time?
Advertisement

...and one will never be able to create something as effective as large companies can. Thus, creating an engine is largely a waste of time...


the problem is, if we fully ascribed to this sort of logic we wouldn't make a game at all, because it won't be as effective as what the large companies make.

Further, a 'game engine', if you're making a game, is simply the code under the hood. If it's generalised and abstract enough to be applicable to a wide variety of genres, it might also be less efficient at the specific game type you're targeting.

Personally, I think if you're making a game that fits perfectly in an existing genre, then there is probably an engine that does it all for you. If you're making something completely new and unique, then there won't be. And whichever direction you go, you'll learn something along the way.
... One can get all the specifics behind the physics, rendering, performance, and all the minor details that one usually doesn't pay much attention to. One can also customize that engine to their own specific needs, allowing for a more lightweight and specialized engine ... [color="#1C2837"]This allows the programmer to become intimately familiar with the whole creation process and every aspect of the game ...

You can learn all of these things when writing a game. Bonus: your physics, rendering, etc. will be customised to the specific needs of your game and you will be familiar with the whole creation process and every aspect of the game.


So, in essence, go for it if creating an engine is used for learning purposes, otherwise don't waste the time?

Unless you've written games before, you won't know what a useful game engine needs to do. By writing games, you will eventually learn how to write a useful game 'engine'.
Thank you for your thoughts on the subject latent. I suppose I shouldn't have phrased it that way. Something more along the lines of the investment versus return not being worth it.

You may have a point with the new, unique game thought although nowadays games are usually not all that revolutionary. True, the graphics and performance may be but the real breakthroughs were with games like Space Invaders, Asteroids, Warlords, Wolfenstein 3D, Doom, etc. I feel that, now anyway, games are getting extremely repetitive. Look at the Call of Duty series for example. They have been making the same game for years. The weapons may be different, different maps, etc but the idea is still the same.


Thank you teutonicus. Good second point for sure. However, after you've written a few games do you think the process of creating a game engine would be worth it?

Thank you teutonicus. Good second point for sure. However, after you've written a few games do you think the process of creating a game engine would be worth it?

Certainly. And by that time, you'd have the experience to make that decision yourself.

You might be surprised at just how many retail games began as a copy+paste of some previous game's code, rather than from scratch on top of a specially designed engine.

You might be surprised at just how many retail games began as a copy+paste of some previous game's code, rather than from scratch on top of a specially designed engine.

I was a developer on Ghost Recon 2. The game was copy/pasted so much from Rainbow 6 that it still had the Rainbow 6 logo in the corner throughout most of the development period.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

I've recently realised with the project I'm currently working on that a good portion of the 10 months so far has been in creating engine type stuff for the game, and very little has actually been spent on the gameplay itself. So if I'd gotten hold of an existing game framework and used that instead of trying to roll my own, I'd be much further along.

That said, I don't think it was wasted effort, nor do I think I'd change my mind if I could go back and start again.

I recently read a comment by one of the developers involved with Diablo 2, and I think its some of the best advice I've ever read re: creating games. I don't have the exact quote to hand, but the gist of it is that you should work to implement the core gameplay as soon as possible. Even if its really rough. Forget creating fancy UI's and highly optimised resource managers and amazing water shaders with caustics and refraction. If your game is about a guy walking around fighting things, make that as early as possible.

I spent 6 months doing all the wrong things and losing enthusiasm for the project since none of that engine crap makes the game "fun". I've since switched to just doing pure gameplay and am making a lot of progress and staying motivated, which is important if you're in a small team or going solo.

To address your question directly, you can't create a game without an engine. The reality is you're unlikely to be able to create an engine that anyone else will want to use, even if you provide it for free. There are much better ones out there written by highly skilled engine developers from big companies. If you're determined to create an engine, don't worry about creating an engine for everyone else, create an engine for your own game.
[size="2"]Currently working on an open world survival RPG - For info check out my Development blog:[size="2"] ByteWrangler

To address your question directly, you can't create a game without an engine.


This depends on your definition of 'engine'.

I say this because you can create a game without what is the generally accepted view of what an engine is; in otherwords a reuseable chunk of code.

If you want to make a game, write a game. Once you are done with that game start the next one, extract code you want to reuse from the first and then get on with it. Do this a couple of times and you'll start to develop a library of code you can reuse, maybe even a basic framework which you can reuse to bolt a new game onto. At this point you have the workings of an engine.

Trying to write an engine from the ground up, with no experiance and nothing to guide the design is going to result in a bunch of code with no practical value beyond the test/demo stuff you'll have put together to make it work. (Heck, here at work an engine has been developed based on previous experiance but without a game to guide it and now we've got a game to guide us we are having to do large chunks of refactoring to make it useful to the game team).

In short; write a game. You'll learn just as much, if not more, about the various systems AND you'll have a 'real world' application of that knowledge to go with it.
Writing an engine in isolation is just going to land you with a large chunk of useless code and a lot of wated years...
I never made the choice to build an engine as phantom says you just start collecting code that is useful and re-usable. This process happened to me so naturally I barely noticed, there was never even an intention of building a game engine.

Eventually you start to pick up on where things can be re-used and program differently. For instance whenever I make a new class now I think about how it could be extended and adapted for re-use later. Instead of just making an ArrayList to store my inventory items, I make a wrapper class for any inventory of any size.

An engine doesn't have to be huge as you describe it, I see it as any tool that helps you develop and re-use your game code in a productive way.

My suggestion is start with the game loop as this is something that is essential for any game. In pseudo it may look something a little like:


while (gameIsRunning = true)
update() // Call to update any game objects
buffer() // Call to buffer any game objects you want to see
render() // Render them to the screen



Here is a short list of things I use on a daily basis that could you research and include:
  • Text File / XML File Reader / Writer
  • Image Loader (Load images into your engine, also consider tilemap loading - taking an image and splitting into separate images)
  • Image Manipulator (Rotate, Flip, etc)
  • Basic Collision Detection
  • Pathing Algorithm (eg. A*)
  • Sound Player
  • Cursor Controller (Different mouse cursors)
  • Colour Loader (Load different pre-set colours from different formats
  • Colour Checker (Load an image, read in each pixel and find out the colours, this can be used to make an in-game map from a bitmap file for example)
  • Inventory / Item system
  • Maths stuff (Random generator, Vector2D class, Timers)
When I think of the term "engine", I don't explicitly think of reuse. So to me an engine is something to get a certain task accomplished, but not necessarily designed to be reusable for future tasks. That's what I meant by "you can't create a game without an engine", in so far as you need something to make everything happen.
[size="2"]Currently working on an open world survival RPG - For info check out my Development blog:[size="2"] ByteWrangler

This topic is closed to new replies.

Advertisement