: How are game engines made and why are they necessary for games and why are there so many of those?

627 views

: How are game engines made and why are they necessary for games and why are there so many of those?

In: Technology

12 Answers

Anonymous 0 Comments

Let’s say you have a game that has objects. Well you generally don’t want your objects passing through each other so you want the game to detect when two objects have “collided” so you can have them do things like explode or bounce off of each other. So you write some code for this “collision detection.”

Well, just about every game in the world has objects for which we need to detect collisions. So rather than every game studio in the world independently coming up with their own collision detection code from scratch, I’m just going to sell them mine. Saves them time and makes me money.

But just doing collusion detection wouldn’t be efficient. So we add in just about all the stuff that’s common to all games, or all games of a certain genre. Like applying gravity to objects, code for rending objects into the images you see on the screen, determining line of sight, etc. etc.

Take all of those common and ubiquitous functions that are applicable to lots of different games and package it up and now you have a game engine.

Now, buying a prepackaged game engine isn’t *necessary* in the sense that you can still build a game without one, but in the end you’d just have to code all that stuff yourself anyway (basically building your own “game engine” piece by piece). Now if you want to build a game and not go insane doing it, and also maybe do it within your life time and to make a profit, then yes, using established game engines is pretty much a necessity.

There are many different game engines for two main reasons:

1. Some game engines are tailored for specific kind of genres. A game engine tailored for racing games will include different kinds of code than a game engine tailored for side scrollers or one tailored for first-person shooters.
2. People have different ideas of what kinds of functions or capabilities should be included in a game engine or how those functions or capabilities should be written in code.

You are viewing 1 out of 12 answers, click here to view all answers.