• Advertisement
Sign in to follow this  

Prudence of Creating an Engine

This topic is 2347 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

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
... 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'.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.


I never made the choice to build an engine as phantom says you just start collecting code that is useful and re-usable...
It seems to me that this topic lacks at least 2 key concepts of engines, which is present and very apparent in all commercially sound engines I know.
The ability to integrate the various components. They're not just "integrated" as you could "integrate" them by linking through an interface/fuction call/whatever. They're integrated at considerably higher level. Sometimes, there's quite some mangling going on.
The ability to accelerate development. At the bottom of the barrel, it will just be copypaste. At the top, we have complex scripting systems accelerating development much more than simple code reuse.

Putting together those two things results in much, much more use cases to be considered. Everything must be written "for a generic X" (like mathematics). If a specific subset of feature X is required, it must be a conceptually justified limitation. The cut is rarely clear.
I strongly disagree with the idea that "the engine is the code under the hood". It is too limited.

Personally, I think (based on my limited experience) that a good artist direction will pay much more than a good engine. Figure out the features needed and implement them. I wish I did that... The investment is just too massive to make any sense in short and medium term.

Share this post


Link to post
Share on other sites
It is very doubtful that an indie guy will start to release so many games that it would, in the end, be worthwhile to code his own engine and even then, the indie guy will probably not be able to compete with many free engines available that have utilized a lot of brute-force coding to archieve different features.

Creating a game is a lot more then just coding in my option. It starts from the design and ends with publishing. Surely, creating the engine is a fun way to learn game programming but so is actually finishing a game. All the indie guy really needs, in my opinion, would be different libraries and code snippets ready to use and copy whenever there is the need but, in my opinion, there is absolutely no need to create an engine for self-use.

Share this post


Link to post
Share on other sites

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.


It's the money. They only have a budget of $100 million, so they simply cannot do better. And they are stuck with using the 30 third-party libraries that take care of irrelevant details, like tree rendering, sound, physics, kinematics, animation, UI, networking ... Those projects are also way too behind, each of them has only been developed for 10+ years by specialized companies and PhDs, relying on silly stuff like academic research. They really should get their act together.

The weapons may be different, different maps, etc but the idea is still the same.[/quote]

So, in order to make better movies, one must built their own camera?

Share this post


Link to post
Share on other sites
As stated above I think you are better off making games and recognizing what the common components are and than build that into an "Engine". That is what I have done. I write a couple games and realize that some things just need to be a part of every game I am doing (Such as a sprite so I threw my sprite class into my engine). An engine (or framework as I prefer to call it) is definitely not something to just jump into and start writing and than hope one day to have a game use it. An engine requires a lot of planning. Even with mine, once I recognize a common component it is not just a straight copy, I have to put a lot of thought into how to make it very generic, re-usable and extendable so that I will not have to make a major change for a later game and possibly impact an older game if I decide to go back and work on it more. Also where does it belong, how am I going to package different aspects.

All in all, after writing about 8 small games and many proof of concepts I feel I have a quite solid 2D engine and I can pump out a game with relative ease. A main thing to remember though too is that it all depends what you want to do. If you just want to jump in and make games, than use an already made engine such as Unity/UDK etc. For me, I started out using an engine and felt that I really wasn't learning how anything actually worked, just how to use an Engine.

Share this post


Link to post
Share on other sites
Thanks for the replies guys. So there isn't really a concrete definition of a game engine? Some of you have said it's the internal workings of the game. Some have said it's simply reused/reusable code. By that definition my Sprite class is an engine since all my games use sprites.


The weapons may be different, different maps, etc but the idea is still the same.


So, in order to make better movies, one must built their own camera?
[/quote]

I fail to see the correlation between those two.

I'm saying that it's the same game with simply a different skin added. I'm sure the weapon and model stats are probably pretty much the same. The gameplay is the same. I can't speak to the story line because I've only played numbers 1 and 2 but they're probably similar now with so many Modern Warfare titles.

Share this post


Link to post
Share on other sites
To continue the analogy; you are complaining about a big film being the same as all the other big films and are suggesting that in order to make a break through on film story telling the best thing to do is go out and build your own camera to film it on.

Just because a game uses an engine doesn't mean a thing with regards to game play; the reason Modern Warfare 1 and 2 have sold so well (and 3 will sell well) is down to marketing and providing a damned solid experiance.

Going back to your post where you mention Wolfenstien 3D and Doom in the same sentence, yet I'm willing to bet that what with Wolf being made by iD that Doom had a far chunk of it's code in there. Sure the gfx engine was re-written but that was 'a different time' as it were where tech was still moving forward BUT this has very little todo with game play.

The fact is if a game 'sucks' then it sucks because of the design, not because they used an engine or built the game from the ground up... heck, it could be argued that building a game from the ground up sucks so much time away from the game play that the game is more likely to suck.

Share this post


Link to post
Share on other sites

To continue the analogy; you are complaining about a big film being the same as all the other big films and are suggesting that in order to make a break through on film story telling the best thing to do is go out and build your own camera to film it on.

Just because a game uses an engine doesn't mean a thing with regards to game play; the reason Modern Warfare 1 and 2 have sold so well (and 3 will sell well) is down to marketing and providing a damned solid experiance.

Going back to your post where you mention Wolfenstien 3D and Doom in the same sentence, yet I'm willing to bet that what with Wolf being made by iD that Doom had a far chunk of it's code in there. Sure the gfx engine was re-written but that was 'a different time' as it were where tech was still moving forward BUT this has very little todo with game play.

The fact is if a game 'sucks' then it sucks because of the design, not because they used an engine or built the game from the ground up... heck, it could be argued that building a game from the ground up sucks so much time away from the game play that the game is more likely to suck.


I think I get what you're trying to say. I didn't mean for it to sound as if building your own engine was superior to using a prebuilt one or that reusing an engine is bad. I was addressing latent's post saying

....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....


I can understand why Call of Duty games still come out. It's a big title. However, I think that the title is going to fall through. People have made movies and books in ridiculously long series' to continue making profits off them. As one example, I think you can use Harry Potter. I've never read any of them and don't have the desire to but I think the series could have been cut off a while ago. They have had new ones coming out for 10 years. At some point it has to stop. I know that occurs in games too. For example, Final Fantasy. There are what, like 15 of those? I've never played the series but I do think the title has pretty much died. I'm sure they made quite a bit off it but at some point you need to come up with something different.

Share this post


Link to post
Share on other sites
You seem to make a lot of assertions about things you have no experience with...

How about you try to make a game with an engine and see where the pain points are. Compare to making a game without and where that's pain points are.


And really, they could make final fantasy games (or black isle RPGs or disgaea iterations or Gold box games or...) for 20 years and I'll keep playing them as long as they're good (and can forgive 1-2 bad ones). Just like I'll watch any Bond movie that comes out even though there's been 40 years of those.

Share this post


Link to post
Share on other sites

You seem to make a lot of assertions about things you have no experience with...

How about you try to make a game with an engine and see where the pain points are. Compare to making a game without and where that's pain points are.


And really, they could make final fantasy games (or black isle RPGs or disgaea iterations or Gold box games or...) for 20 years and I'll keep playing them as long as they're good (and can forgive 1-2 bad ones). Just like I'll watch any Bond movie that comes out even though there's been 40 years of those.


You're probably right. I may be making too many assumptions but so far they seem to have given me some direction. I'm in the process of creating my first 'real' 2D game right now. Hopefully I can continue making games for a long time and get the experience that I need to understand them more fully.

Have the games really been that good? It's just my opinion but I think they would have been perfectly fine cutting it off. I think they've dragged the series on for too long. As for the Bond movies, I think movies are actually a bit of a different matter. However, I think the old Bond movies are better than the more recent ones. I have the same opinion about most TV shows. I love old shows like Andy Griffith, MASH, and Hogan's Heroes. That's just personal preference though.

Share this post


Link to post
Share on other sites
I think we've strayed off topic a little, I know for a fact if we start discussing the games coming out of the AAA studios I'll end up going off on a mad rant about lack of creativity, and nobody wants that. :)

Last I remember we were discussing the merits of rolling your own engine, and arguing the semantics of what "engine" actually means.

Share this post


Link to post
Share on other sites

Have the games really been that good?
[/quote]

Some have, some haven't. But I know what I'm plopping down $50 for when I get one (more or less).

Share this post


Link to post
Share on other sites
Thanks for the insight. I can obviously see that game development is a long journey and I have a lot to learn.

Share this post


Link to post
Share on other sites

I can understand why Call of Duty games still come out. It's a big title. However, I think that the title is going to fall through.


Well yes and no; the first few milk the WW2 theme a bit, but then Modern Warfare brought things up to date (and brings a nice switch up in things as in MW1 it's the Brits who save the day after the US screaw things up, and in MW2 the American's double cross the 'multi-national force' only to get their arses handed to them by the Brits once more.. so unlike most games where the US are The Heroes this was a nice switch up), and there has been one set in not so recent times too.

In time, yes the series will probably die, it depends on if they can keep things fresh enough to hold intrest or not.


As one example, I think you can use Harry Potter. I've never read any of them and don't have the desire to but I think the series could have been cut off a while ago. They have had new ones coming out for 10 years. At some point it has to stop.
[/quote]

It has stopped; only 7 books were written and there are only 8 films as the last book is split over 2 films. I've only seen the films in passing due to them being on TV but there is enough there to justify the length as required to tell The Story which is going on.


For example, Final Fantasy. There are what, like 15 of those? I've never played the series but I do think the title has pretty much died. I'm sure they made quite a bit off it but at some point you need to come up with something different.
[/quote]

And beyond the theme of 'a bunch of people get thrown together to save the world' the games themselves are significantly different story wise. FF7 is nothing like FF8 which in turn is nothing like FF13, which are the 3 I've played. The games basically have nothing todo with each other, they just follow a theme thus the same name.

Share this post


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

  • Advertisement