Starting Game Development – What is a Game Engine? Basic Concepts

 

Unity 5 Scene

As someone who has been playing video games since early childhood and will probably keep playing till the day I die, the desire to explore how to make a game has always been with me.

After becoming somehow proficient at coding, my first tentative attempts to produce a game was done using C++.

Why? Because when you ask the question “which language is the best for making games” to the almighty google, 9/10 times the answer is C++.

Now that I look back, I wish I had started my game dev journey with a premade game engine instead of messing with C++.

Why? Let me explain. Say, you want to make a custom cabinet for your kitchen. Would you start the process by learning how to grow hardwood, how to operate a lathe and router and attending woodworking and technical drawing courses, or would you just buy some wood and nails and open up a tutorial video on the Youtube and “hope for the best”?

Unless you are planning to make a career out of carpentry, you’d just go with the later. Developing a game with C++ is a bit like the first option.

See, what they mean by “If you want to make a game you should use C++” is actually “If you want to make a game engine you should use C++”

 

So what is a game engine?

 

The “fount of all knowledge” a.k.a Wikipedia says:

A game engine is a software framework designed for the creation and development of video games

In a more technical jargon; a game engine is a middleware solution that is used as an abstraction and unification platform.

Say, you are developing a game for Teensy 3.2 and you want to draw a triangle on the screen for the player to interact with. The code needed would be something like this:

 

Kinda mouthful isn’t it? 3D objects you see on games are made out of sometimes millions of triangles. Those triangles come together and form polygons and lots of polygons come together to form 3D objects we see on screen.

Drawing these polygons is just a tiny part of the job of the game engine. It has to calculate collusion, occlusion, physics, scattering and thousands of other things. These are just parts of Graphics Engine which is a part of the Game Engine. A fully fledged game engine controls things like, file system I/O, audio, user input, network interfaces, AI etc…

It’s not realistic to expect to say, a 3D artist to know all the math that goes into rendering a simple 3D cuboid.

 

This is where the game engine’s abstraction property comes into play

 

As said before a game engine is an abstraction framework. It takes care of all the low level stuff and turns the process of game development from a PhD thesis on math to a creative process.

If every game studio had to develop their own engine from ground up, gaming industry would be 80% mathematicians, physicists and engineers and 20% creative professionals. As things stand now, most game studious that use pre-made engines don’t employ a single scientist and only a handful of coders. Rest of the staff is artists.

Using the code above if you want to create a trash can, you’d need thousands of lines of code. If you want that trash can to do anything interesting, like ability to tip down when an object is thrown at it, that’s thousands of additional lines of code in addition to some truly monstrous mathematical formulas.

But if you were to use a game engine like, Unity, Unreal Engine or CryEngine, you could have your fully interactive trashcan without writing a single line of code.  Not only that, but it’d be able to iinteract with light realistically, would have collision and other physical properties without any effort on the developer’s part.

This is called Abstraction, a concept anyone interested in coding is probably quite familiar with.

But this is not the only thing a game engine does. It also unifies lots of different functionality under one easy to work with umbrella.

Lets take a look at Unification

 

Imagine you are making a 3D MMORPG(massively multiplayer online role playing game). What do you need? Graphic engine is obvious. What else? Definitely a sound engine, it 2016. No one wants a silent game. Since we are making a multiplayer game(a massive one at that) a robust and reliable network interface is also essential. What about those pesky cheaters? We definitely need an anti cheat system in place. Oh we also need an account management system. Since we don’t want our games pirated, we might consider a DRM system too…. List goes on and on, and on….

If we are a studio with hundreds of coders lie EA, Ubisoft, Bethesda etc. we could create all those systems from ground up(although, even they use 3rd party systems most times, more on that later) , but personally I don’t own a multi million dollar gaming studio. Do you?

If the answer is no, we need those systems pre-made. Lucky for us all three Game Engines, I’ve mentioned so far, has most of those systems built in. Instead of creating an Audio Engine from ground up, we could use Unity’s audio engine with minimal(if any) modifications. Same goes for network interface, physics engine, lighting etc.

What’s cool about using a Game Engine’s own subsystems is most of the time  they “just work” with the rest of the game. No modifications needed. On the other hand, a system independently made from the game engine will require modification for it to be compatible with the rest of the system.

In short, a game engine is lots of systems that goes into making a game unified under a simple umbrella.

 

So, we don’t need any coding knowledge?

 

Well, yes and no. While there are some game engines like gamua, that’ll allow you to make games without any coding, such tools are usually severely limited in their capabilities.

If you want to truly  unleash your creativity, you’ll need at least a basic understanding of coding. Language doesn’t matter. If you learn one high level language it usually translates well to others.

That being said, if you plan on using a specific game engine, each one usually has it’s own scripting language.

For example:

  • Unity uses C# and JavaScript. If you are just starting with Unity, definitely pick C#.
  • Unreal Engine uses C++ and it’s propriety Blueprint languages. 
  • CryEngine uses C++ and Lua. There is also talk of adding support for Mono .Net

As you can see, C++ is a very popular choice in the game dev industry. Which is, in my opinion a shame. While I’m proficient at C/C++, I wouldn’t say they are “newbie friendly”.  C# or Python are far easier to learn and generally easier to work with. But since most game engine developers have mastered C++ years ago, they don’t want to change their ways. Which is understandable.

If you are just getting into game development, with no prior coding experience, my advice would be to start with Unity5 and C#. Unity 5 is free(far as we are concerned anyway) and C# is a .NET language and useful beyond the scope of game development.

 

Conclusion

Unreal Engine 4-Hard to believe it’s not real isn’t it?

Game development is a sub discipline of software development with a truly massive scope. In this article we’ve talked mostly about the purely technical aspect of the game development process. But there is an artistic side of things.

Some people say, game development is an art for in on itself. I wouldn’t say they are wrong.

As someone with rather “limited” talent for visual arts, I’ve accepted the fact that, I’ll be mostly limited to coding side of things. But even that is tremendously funny.

In later posts, I’ll talk about the tools I’ve used in my projects and some game development techniques. Stay tuned.


illusive
illusive

Leave a Reply

Your email address will not be published. Required fields are marked *

Prove you are not robot(and know elementary level math) *