Game Engine from Scratch...Why?

Started by
29 comments, last by jbadams 11 years, 11 months ago
To addend to whatever anyone one else has said (I've only skimmed, sorry)...

I'm writing a game engine because the alternatives aren't appropriate for what I'm trying to do. I actually analyzed quite a few game engines, and after much thought had decided that they wouldn't be appropriate for the tasks at hand (too much effort to change them, or the lack of ability to change them). After that, I then analyzed graphics engines, and determined that for what I was doing, they were too heavy-weight - they weren't designed for what I was doing and ended up adding a significant amount of overhead.

It really depends on what you're doing. Once you know what you're trying to do, sit down, and take note of all the alternatives. Pros and Cons. Perhaps Unity, for instance, can do exactly what you want; perhaps UDK can. If it is decided to write an engine, perhaps OGRE can render for you. Perhaps Irrlicht. Perhaps none of the renderers really meet your needs.

As was also said by mhagain above me, someone has to write the engine from scratch. Not all engines are perfect for everything, and counter to common opinion, not everything has a perfect engine for it. Sometimes, doing things yourself is the proper approach.
Advertisement
Just a bit more fuel on the fire: over the years I've written several personalized asset management systems for games (in the face of existing systems and databases) just for the experience of doing it. The reason: I wanted to better understand decisions made by those that made the existing systems.
Why do people build kit cars instead of buying from their local dealership?
Why do people make their own furniture instead of just going to IKEA?
Why do people brew their own wine instead of just picking up a bottle at the store?


Sometimes the answer is simply "because they can".
I started out by creating my own game engine, but for a single person this is not always a realistic decision. One of the problems that I failed to recognize was.... where do you stop? But with that said, I owe a lot to my project because even though it was too large for me to complete, I learnt a LOT from doing it, and it was fun.

I have recently discovered Unity and all I can say is wow. Game development has never been as enjoyable. They have done all of the hard work so that we don't have to. Instead of focusing on the inner workings of a physics engine, I can focus on how to make my game more fun.
Rotorz Limited (http://www.rotorz.com)

Check out our latest game Munchy Bunny!
Editor Tool: Rotorz Tile System (for Unity 3D)

I started out by creating my own game engine, but for a single person this is not always a realistic decision. One of the problems that I failed to recognize was.... where do you stop? But with that said, I owe a lot to my project because even though it was too large for me to complete, I learnt a LOT from doing it, and it was fun.

I have recently discovered Unity and all I can say is wow. Game development has never been as enjoyable. They have done all of the hard work so that we don't have to. Instead of focusing on the inner workings of a physics engine, I can focus on how to make my game more fun.


Well, don't forget; you are discussing things like physics engines... just because you are writing a game engine doesn't mean you have to roll your own everything. You could certainly use PhysX or Bullet or whatnot.
That's kind of what I meant but perhaps poorly explained on my part :-)

If I were to endeavour upon rolling my own engine again then I would definitely use existing graphics, physics, etc. engines where possible so that I can focus on creating the game in question. These days I would only consider creating my own engine if I was unable to achieve my goals using one of the many fantastic engines that are now available. I find it fascinating how many good tools have become available (especially for Indie development) over recent years.

And of course, using open-source libraries would allow the developer to contribute on the parts that interest them the most as well.
Rotorz Limited (http://www.rotorz.com)

Check out our latest game Munchy Bunny!
Editor Tool: Rotorz Tile System (for Unity 3D)
There is a recurrent sarcasm about people who want to create their own engine that goes roughly like this: why don't you create your own computer/CPU/drivers etc but isn't that exactly what i.e. Nintendo,Sega, Sony etc did?
I'm not saying this is what the average teenager on a budget can do but some of these advices sound like when someone who became famous doing some very dangerous stunt on TV belittles you with a disclaimer of the kind "Don't ever try this at home" well duh he did and it made him great and famous...
I think that there is a lot of benefit to having your own game engine. If you are able to develop your own engine and understand it then it should make it much easier to create the game it'self. The only issue is the time and knowledge required.
I think a lot of people are confused about the differences of building a game vs a game engine. The goal has to be clearly defined before you start the project, and unfortunately, you can't do both unless you are armed with 10 full time developers.

When you are building a game engine, your goal is to create your engine as dynamic and extensible as possible. You really have to put a lot of thoughts in the design of your code, the relationships of your classes, the extensibility and customization, and the GUI of your app. It is not a trivial task. You have to know the most efficient ways of solving game development problems, like pathfinding and collision detections. Otherwise, your engine isn't even worth using, and nobody is going to use your engine other than yourself. During the course of the development, you will be making small games to demonstrate and test your game engines. You should be a seasoned game developer to qualify for this task -- only then you can ask yourself "is it worth it to build a new game engine?"

On the other hand, when you are building a game, your focus should be just building a good game. Many people thought that you have to build an engine first before you build game. That's false. Even if you build your game from scratch, like setting up a window, DirectX, and all that, your setup must be just good enough for your game and your game only. Don't worry about adding that high dynamic range effect if your game does not need it. Focus on building a good game.
I like low level programming more than high level, I like to program everything from scratch but I never made or had the idea to make a game engine (and I never wanted to make a "big game"). As said above, games or other programs doesn't need programming an engine before programming the actual application.
I even dropped the tempting idea of "just building a smallish framework on its own with some useful functions", because it's hard to test without an actual application, and most importantly, I realised quite early that the framework would already be there as I program more and more stuff. I can reuse tons of things I already made during programming, maybe some day I will just collect these and give some consistent naming to the functions.

EDIT: the hardest thing in engine programming is putting it together to form a solid, extendible, easy to use by the costumers/game makers, easy to maintain, stable on many systems (not just on my XP, I'm not even talking about cross-platformness ), lightweight, and so on framework/engine.
Making the actual functions, including the most advanced collision/fluid simulation/AI/whatever is just one thing, and since you have to use as many black-box functions anyway, it's not even the more important thing.

You will realize this when you build a middle sized application. I did some of those, and no matter how I tried, it all ended up being messy spaghetti. The functions are easy to modify, since they are black boxes so the application doesn't care how they solve their tasks, but to work with the big picture (I can't express it) quickly becomes damn hard.. And those were just programs for specific things (like games).

So in my opinion, engine making is merely just "making everything from scratch", it's more the architecture of the whole thing, which requires a damn solid experience and education if you ask me.

This topic is closed to new replies.

Advertisement