This article is second part of the series called as Inside The Game. For those, who are not familiar with Inside The Game series, this series will provide the articles and tutorials related to mechanisms and architectures of the game. Also, in this series, you will learn to think like a game developer. Now, if you have not read the first part of this series, please click here to read it. I am summarizing the first part here for those who have not read first part of the series. In the first part, the differences between a game and software were presented. The main difference between game and software is that software works on event-based systems, however game works on loop-based system. That loop is called game loop, and performs some tasks like processing inputs, simulating world, rendering etc directly or indirectly. For explanation of this mechanism, you can read part 1 Inside The Game – Game vs. Software.
Enough talking about first part, we already learnt about the differences about the game and software. You might remember that in last part, there was a very little part of information related to animation, simulation, and the game. Yeah!!! you got it right!!! This article is about the comparison between animation, simulation, and the game.
Well, game is not all about coding. Coding is just a part of the game, which plays an important role of assembling each component to form a game. But, we are here to discuss about the animations and simulations. The architecture behind any animation or simulation is almost same as the architecture of a game. Let’s see this in details here.
Animation/Simulation vs. Game
Animation is like a movie, which shows only the information which is already hard coded in it. For example, the most famous comic Tom & Jerry only shows what is in the story. We cannot change it according to our wish. You can say that its just readable data. Simulation is very close to the animation. The little difference is that you can also interact with simulation unlike in animation. But, there is very little control to the user to access and write the simulation. So, game is virtual word, where game developer provides access to the user to interact with the world and make decisions. The more access you give to the user, the more complex it becomes.
So, it was all general speaking about animations, simulations, the games. If we say from programming perspective, then I will only tell you one thing: Game is a controlled simulation. So, if you create a game, first create a simulation with some hard coded values, and then provide the control to the user. The advantage in this approach is that you can make the game in an easy way not making it more complex though. Following figure shows the concept graphically.
The figure above shows that animations are static and hard coded. When we provide some values to the animation, it becomes close to the simulation. And we provide the full control to the user to interact with the world, then it becomes the game. From coding point of view, the mechanism is same as explained in the last article about the game loop. Each category will have same game loop. The only difference is of Process Inputs. The animation/simulation will take inputs from their hard coded databases, and game will take it from the user. So, in this sense, it can be said that Game is a controlled animation.
Thanks for reading this article. In the next part, you will read about the game composition. In which I will explain that how a game is composed and what are the important components to be implemented to develop a game. To read the next part, please click here.
I hope you are enjoying this series. Please provide your valuable feedback, suggestions, or comments, I would love to hear from your side.
- Inside The Game – Game vs. Software (gamyguru.wordpress.com)
- Simulating a City (tagide.com)
- Hay Day In The Top Ten World Wide, Flirting With Most Popular iOS Simulation Game (arcticstartup.com)