Blog Archives

Inside The Game – Tile Based Game Architecture

Hey Guys!!! today I am writing the 5th part of Inside The Game series. 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 last part of this series, please click here to read it. I am summarizing the last part here for those who have not read. In the last part, we discussed different types of the games and very little introduction about the architectures behind those games.

Now, this part is very interesting part of the series, and I must say that this is very important part of the series. Many readers are asking me that when would the coding and implementation start or something like that. Then, I would like to answer the question here about it. Well, answer is simple, we will start programming soon. We are going with the flow and concepts are much important when it comes to coding.

Okay…. enough talking…. ūüôā let’s talk about the article now. Today, I will discuss in detail about the architecture behind the games. And, as you can guess it from the title, that will be the Tile Based Game Architecture. It sounds horrible…. ūüėõ I know that…. ūüôā But believe me, its a very simple and interestingly very useful and common architecture found in most games. To learn about tile based architecture, you have to first learn about the tile itself…

Tell em, what is a tile…!!!

Tile…. Tile is a small unit. Word tile comes from the floor. We make a floor on ground in homes, offices etc. The whole floor is made of small squares called tiles. There is nothing to worry about, tile is same thing in the games, and you will know it shortly. Well, you can also call it cell as in Cell Based Games. Well, I will prefer the tile word here. Now, you have known about the tile, so let’s move to tile based architecture.

Oh no…. its Tile Based Game Architecture buddy…!!!

Well, fasten your seat belt… we are here… and please don’t say Oh No… say Oh Yeah… its Tile Based Game Architecture buddy… :). Tile based architecture? what does that mean? Well! its the architecture used in games, and why this is called tile based architecture? Oh yeah! I forgot to mention about that. Well! this architecture works on basis of tiles, so its called as tile based architecture…

I still don’t know what is Tile Based Game Architecture …. ūüė¶

Yeah!!! I know that…. ūüôā Well, you don’t have to worry about that. So, in tile based architecture, what we actually do is: we create an array mostly 2-Dimensional (2D), and we save all the game information in that array. Game information? Does it sound new to you? Game information means the information about the game. This contains the character positions, their status like died, alive etc, their health statistics, scores, levels, and so on. Simply, all the information related to the game is stored in game information. So, that 2D array consisting all the game information is behaved as floor and each element in the array is behaved as tile, so this is why we call it tile based game architecture. You can search more about this on Google. ūüėõ Everyone knows that… ūüėõ

Games on tiles….. ??? Really…. ???¬†

Yeah!!! I am going to explore that now for ya. As we have already discussed about game engines and graphics engines already, so I would like to remind you that game engine basically manages, handles and controls all the game information and graphics engine just renders and displays that game information on the device screen. So, what I mean from architecture or specifically Tile Based Game Architecture is the game engine behind tile based games. Because, you can’t display the data until you haven’t stored it. So, I am not going to discuss about the 3D graphics, or 2D graphics, or anything related to graphics. Rather, I will discuss the architecture and concepts behind the tile bases games. Well, there are thousands of tile based games. Well, the game developer company will not tell you that our game is tile based game, because we are talking about the code here, not the game and gameplay.

Examples… Please…. ūüėõ

So, I am going to give you the examples of the tile based games. Well, the most common example of these games is a chess game. Normally, the board games like monopoly, chess, ludo, checkers etc are developed through tile based games. (Note: I haven’t took the name of cards game here.) That’s it? No!!! That’s not all.

So, the strategy games like Commandos, Age of Empires, Stronghold Crusador, The Legend of Zelda etc. also based on tile architecture. Really? Yeah…!!! That’s awesome then…. ūüôā But hey, I would like to tell you something here. Normally, there are two types of strategy games here. Well! there are no specific names of those types, but let’s give temporary names to read easily. Let’s call the first one as continuous and other one as discrete. What actually happens in discrete is that a tile is a single step of the game. It means, when we move the character one step, then it will directly come to the next tile. Examples include The Legend of Zelda, Chess, etc. However, in continuous the case is ¬†very changed. If we move the character one step, then its not¬†necessary¬†that it will move to next tile. This depends on number of steps in a single tile. For example, there are 5 steps in a single tile, then it means after passing five steps, the tile will be changed. Well, both are same. The difference is only of details. In the discrete, there is not any detail in a tile, while in continuous there is detailed tile map in a tile itself.


Which one to choose? Discrete or Continuous?

Well! the answer depends on the game. But I will tell here some advantages and disadvantages of both mechanisms, then you can differentiate both easily. Normally, the discrete games are much easier to implement, but problem is the smoothness of the game. Like if you are changing tile on each step, then the more the tile size, the less the accurate and smooth game will be. So, you will say,¬†“Just decrease the size of tile, GamyGuru…. :)”.¬†Well, I will tell you one thing. A game developer’s most difficult and important task is optimization. So, the more you decrease the size of tile, the more the CPU will process and in case of mobiles or tablets, battery will die quickly. So, a true game developer’s job is to create a game with low CPU processing with high performance graphics…. So, if you want to decrease the size of cell and add smoothness in the game, then I will recommend you to apply the continuous approach. We can say that continuous approach is same like small tiles. Well, there is a difference. The difference is that in small sized tiles, number of tiles increases and in the result CPU processing also increases. However, in the continuous method, we are increasing number of tiles, so CPU performance will not be affected as plus point. Only, the tile we are interested in will be detailed for more processing, and processing one single tile is less CPU expensive than iterating through all the tiles in the game. So, I guess you have understood it.

Is tile based architecture for strategy games ONLY…. ?

Tile based architecture only for strategy games? I didn’t say it… Well, until now, we have seen two types of games; strategy and board games, which can be implemented by tile based game architecture. However, there are also other games, which can be implemented in same way. We are now going to discuss the next game type, platform games. We already discussed about the platform games in last article. So games like Mario, Sonic Hedgehog etc. follows this architecture also. Architecture is same tile based, but the concept for understanding changes a bit. For example, in board and strategy games, you saw that game was a floor covered with tiles containing small information about the game. However, in the platform games, the floor story just disappears. Because, it is a vertical scrolling or horizontal scrolling game, not some top-view game. Following figure shows a snapshot from Mario game and its tiles.


So, now I guess it would be clear in both images that how platform games differ than strategy games in terms of tile based architecture. Also, please note that each tile is of the same size. You can measure it from the bottom line created with brick tile. All bricks are of same size and lines are drawn accordingly.

You will be glad to know that in the next article, we will implement tile based architecture in C++ to understand its working.

So, this is another advantage of the tile based architecture that you can implement platform games also. Until now, I have understood that the 2-Dimensional (2D) games can be easily implemented with tile based architecture.

What about 3D games then…???

Well, you will be happy to know that tile based architecture is not only used in 2D games, but it is also used in 3D games. You might wonder how.. Well, we are not talking about the graphics here, which are 3D, rather we are talking about game engine and storing game information here. So, let’s see an example of 3D game type using tile based architecture.

First Person / ¬†Third Person Shooter Games…

Oh really….!!! Did I hear it right? Did it sound like FPS or TPS? Yeah!!! ūüôā You heard it right…. The next type is First Person or Third Person Shooter games. Well! these are the most famous and played games on personal computers, consoles etc. So, every other game developer wants to develop FPS or TPS games. So, let’s take example of Hitman game, because examples make more clear image of concept.


So, the concept behind FPS/TPS games is that the whole map is 2D, as shown in the figure (left), and this map is tile bases architecture containing all the game information. However, the map is just displayed in 3D form like First Person or Third Person camera. That’s why these games are called 3Dimensional.

In a nutshell, we have learned in this article about a simple and common architecture called as Tile Based Game architecture. This architecture is used in board games, strategy games, platform games, as well as in first person or third person games. In the next article, we will implement this architecture in C/C++ to make a simple game. Thanks for reading this article, and if you have any questions then you can ask it here through comments…

Also, please suggest that in which language do you want to implement Tile Based architecture for a simple game.

Posted By: GamyGuru – Prince of Game World

Inside The Game – Types of Games

Hey Guys!!! I know you were waiting for the next post on the series. Its been a while I was busy for some days. So, today I am writing about the different types of games as fourth part of Inside The Game series. 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 last part of this series, please click here to read it. I am summarizing the last part here for those who have not read. In the last part, we discussed some basic concepts behind a game development like game engine, graphics engine, and the game itself.

As we have talked lot about the graphics, gameplay, game engines etc, but we have not talked much about the game. In this article, we will talk about the games especially types of the games. One thing ¬†must be noted here is that types of games are not the genres of the games, which are found generally in game industry. Rather, types of the games in this article are from development perspective, means what kind of architectures are used in different types of game at time of coding or programming. However, the most types discussed in this article are related to the game genres as well. So, let’s not talk about the post scripts of the article more :P. Let’s talk about the original stuff of Inside The Game series here. So, types of the games…. umm… that’s quite difficult topic to be explained in just a single page. So, lets’ start from the text-based games.

Text-based Games or Text Adventures

Really!!!! Text based games? That sounds weird… right. I know. But back in 1976, when there was almost no concept of video games, there introduced the most first game, and that game was a text-based game. We are living in 20th century, so I don’t think that anyone might played the text-based game. Let me share you a text-based game here:

Well! I completed the game and won it. Hint is read the instructions on the side of the game, that will guide you through the game. Well! text based games are the games which uses text characters instead of computer games. These games were the very common games in era of 1970 to 1990. However, even today, these types of games are being played on the internet, but in a different form known as Multi-User Dungeon (MUD). So, about the architecture of these games, these games are very easy in development. There are various reasons behind its low level of difficulty. Some of which included are like gameplay, that user can interact with the game only through text so gameplay factor is relying on the text only, no computer graphics or game art to impress the user and so on. All a developer has to do to create a state machine, and then just implement it using if-else blocks and finish it on compare and do basis. Following figures are the examples of text-based game.


Card, Logic, or Board Games

Well! Now I don’t think that anyone wants explanation about these games. You know or might have played in your awesome childhood the logic or board games like Spades, Chess, Ludo, or Monopoly etc.

So, from programming point of view, these games are quite simple. These types of games maintain an array for values, and all the game is stored in these values. And those values are updated on basis of game rules, for example the chess rules. We will come to this maintaining value factor in details later at time of implementation. For now, I will only say that the factor which differs one chess from another chess is graphics or game art. However, the inner coding is same in each board game and the board is stored in array, and then the game development is all about how you manage and display that array.

Arcade Style Games

Ahan….. Umm…. Arcade style? Well! what do you say about arcade style? Umm…..¬†thinking, thinking… Ummmmmm…… still thinking……¬†Oh forget it… I will tell you about arcade style then. The most games we play are counted in arcade games. Well, its a very big category of games. Well, what is the arcade style game. Well, I can’t define arcade game, because there are so much arcade games that you just can’t say whether any game is arcade or not. But, hey! don’t you worry, I got some ¬†examples to show you about arcade game style games.

Space Invaders (left) and Snake Game (right) are two examples of arcade games. From programming perspective, well, I can’t tell you the architecture, because it depends on the game itself. For example, you can store all the data of space invaders in an array and display it and modify the values like on/off to show the alive/dead status of any plan. However, in case of snake game, its just snake and food to maintain and rest is upto display and graphics. Platform / Side Scrolling Games Oh….. Wow… Platform games… I used to play platform games in my childhood a lot. Now, these games are somehow scrolling games, which can be constantly scrolling or controlled by the user. The scrolling can be vertical or horizontal. In case of horizontal scrolling, gravity and clouds factor also becomes functional, however in vertical scrolling, it becomes some sort of space or gravity in down scrolling as something is falling. Examples include Mario, Sonic Hedgehog, Space Invaders, Nokia Bounce, 1945 etc. Please note that Space Invaders is also included in Platform games, however this was already included in Arcade games. So, the games can have multiple categories. Now, from programming perspective, these games can be managed with different architectures depending on the game developer. What I follow and recommend is to treat these games like board games, just with scrolling and long board, and rest is same. I will post a tutorial on platform games later at time of implementation.

Action / Racing Games

Well, like arcade games, action games are also in unlimited numbers. I think except board some board games, you can count every game in action game category. Well we can’t say the architectures of the game, because it depends on the game itself. The examples of action games include Street Fighter, Need For Speed etc. I guess these games are your¬†favorite¬†games. ūüôā

Strategy Games

Strategy games…. They are exactly like as they sound by saying strategy games. So, in these games, user is given an open and independent environment to make a decision, and is required to make strategy to achieve the game goal. Sounds realistic or cool…. ūüôā I know…. I am a big fan of the strategy games, even the game we made on large scale was a also strategy game. Well, I will tell you about the game later. So,¬†Commandos: Behind Enemy Lines, or Stronghold¬†Crusader are examples of the strategy games.

From programming perspective, these type of games can be managed like a board game. Its all about displaying and computer graphics. However, what differs these games from the board games is detail of the game. For example, in chess games you have got details upto 64 (8×8) squares, however in these games the more details you provide, the more access and control you provide the user, the more strategical missions you provide to the user, the better game it will be. But, handling and managing so much details through programming becomes very difficult and time consumptive. And, the very important factor in these games is gameplay. For example, you provide lot of details, and gameplay becomes very difficult due to details, then that game is not useful. However, if you provide the details to the user, you better think about the gameplay first, because it is the core factor behind the game.

First Person Shooter (FPS) / Third Person Shooter (TPS)

Phewwww……. Finally, here comes the most wanted category, First Person / Third Person Shooter games. Well! these type of the games are played very lot especially on Console, XBOX, PlayStation3, and computers as well. Wait a second here before we move forward, I think I am forgetting something here. Umm….. Oh Yeah… ūüôā I remembered it. The difference between First Person and Third Person is of the camera view. In FPS, user is the first person and seeing the game world from first person perspective, however in TPS, user is the third person and seeing the world from third person perspective. For example, Counter Strike is first person. You hold the gun, you shoot the enemies. It means you are the first person. But in Grand Theft Auto: Vice City, player character/hero shoots the enemies, character/hero holds the gun, and you (the user) is watching both parties (enemies and the player), so user here becomes the third person.


From programming perspective, these games work on 2D basis, these are just rendered and displayed in 3D. You can manage the game data like strategy or board games, all you have to change is the method to display the data on the screen.

Role Playing Game (RPG)

Hold on!!!!! I know you probably are thinking that how much types I am going to write in just a single article. Well, you will be glad to know that this type is last in the article. Role Playing Games (RPG), I think few of you have heard this title or word. But, don’t you worry, because words might be new but story is same old. In these games, users are given a role, and they are asked to play the role, and the game will take turns on basis of your role and character in the game. For example, Mafia Wars, even GTA: Vice City are RPG games. Let’s take the example of GTA. You are a street thug, who have to complete missions and contracts given and earn some money for betterment of your life. So, now you (user of game) are not a player anymore, you have got a role and you are now street thug in case of GTA. This is how RPG games work. From programming perspective, it depends on the game. But the most important factor in these games is the gameplay. You have to provide the gameplay in such way that user must feel that he is not user anymore. Well! about graphics, if user feels the role, then it doesn’t matter that you make 3D action graphics (GTA Vice City) or just buttons to shoot or take action in imagination (Mafia Wars).


In a nutshell, we discussed different game types in this article. In the next article, I will explain tile based architecture, which can be used in these types of the games. To read the next part, click here. I hope that you like the series, and I would love to hear from your side. You can give your valuable comments, suggestions, and improvements you would like to see in the blog. Thanks for reading the article…. ūüôā

Inside The Game – Game Engine, Graphics Engine, and The Game

Hey Guys!!! First of all, I would like to thank you for providing me such wonderful views and interest in my blog, and I am really happy for you and my blog readers. Ooooops… Enough talking… Let’s get back to our wonderful and very interesting series¬†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 last part of this series, please¬†click here¬†to read it. I am summarizing the last part here for those who have not read. In the last part, we discussed the general structure of any game. Any game involves a lot of disciplines, which are not included in software development normally. Some of those¬†disciplines are Artificial Intelligence, Computer Graphics, and so on.

This part, called as¬†Inside The Game – Game Engine, Graphics Engine, and The Game, is sort of extension of the last part. In this part, we will compare most important components from developer perspective. So, let’s start the article now without delaying any more.

I don’t know, what I am going to read now?

As heading suggests, I really don’t know what I am going to read now. So let’s answer the question. We are going to know first about some basic concepts in a bit details used in any type of game development.

Graphics Engine

Graphics of the game is the first impression of any game. When any user gets any game, the most first thing he/she observes in the game is graphics. So, if the graphics are not much satisfactory then users stop playing the game. And after that it doesn’t matter to the user how good story is or how good musics are. So, in short, a game developer just loses everything he/she has made or thought just because of the graphics. Now, I am not saying here that you should only implement High Definition (HD) or 3-Dimensional (3D) graphics with advanced lighting effects, rather that I am trying to say here is that you should implement the graphics, which match your game theme, gameplay, and should be liked by the user mostly time. Hey hey hey!!!! I guess I have said a keyword here, Ummm…… Yeah! I remember!!! Gameplay… isn’t the word, we already know? No!!!! okaaay…. no problem. By the way, if you are wondering what is the image showing, well the image is showing the Open Graphics Library shortly OpenGL, which is a graphics engine.


If you don’t know what the gameplay is, then I will tell you little about it. Gameplay is the mode, when the game is running. So, at time of game running, what a game player sees, what he does, how he survives, how he completes levels and so on. These all things include in the gameplay. Many game developers make mistake of gameplay in terms of computer graphics. I didn’t understand, right? I know…. Game developers shift their focus on the graphics and effects, and they just forget about the gameplay. And in the result, what they get is ‘A very high definition 3D graphical game with low speed and low performance with very difficult gameplay’. If user can’t play the game, he is not going to see the graphics like a movie.

Have you got the point from both concepts? Let me summarize it a bit. If computer graphics are not good, then user is not going to buy or install the game, and if the gameplay is not good then user is not going to  play the game. So, developers not only focus on any one of them, rather developers should focus on both equally to make a balanced game.

Game Engine

Well! developer have to keep graphics and gameplay equal while coding, how is he going to achieve this? Answer is sort of simple as well sort of complex. Answer is the game engine. Game Engine, you can say, is a new concept we are learning here. Game engine¬†is a system designed for the creation and development of¬†video games. The leading game engines provide a¬†software framework¬†that developers use to create games for¬†video game consoles¬†and¬†personal computers. The core functionality typically provided by a game engine includes a¬†rendering engine¬†(‚Äúrenderer‚ÄĚ) for¬†2D¬†or¬†3D¬†graphics, a¬†physics engine¬†or¬†collision detection¬†(and collision response),¬†sound,¬†scripting,¬†animation,¬†artificial intelligence,¬†networking, streaming, memory management, threading,localization¬†support, and a¬†scene graph. The process of¬†game development¬†is often economized, in large part, by reusing/adapting the same game engine to create different games,¬†or to make it easier to “port” games to multiple platforms. I know I said very complex language of game engine above. So, let’s come to the point here. Game engine is the core functionality behind any game, whose¬†responsibility¬†is to manage and control every aspect of the game. So, game engine will manage the equality of the gameplay and graphics engine. If you are confused, then I will clear to you that game engine is a very big part behind any game and graphics engine is just a single part called as renderer.

Why are we talking about graphics engine, game engine, and gameplay here? Where is the game?

The Game

Well, what I say about the game. Game is the root, for which you are doing everything. For now you are reading this blog for that single word, The Game. Game is not game engine, rather game is result created ¬†by game engine plus the some specific things like game story, gameplay design, interaction, and so on. Remember, game engine doesn’t provide you the gameplay. Gameplay is dependent on the game itself, and game engine is the general component to be reused for different games.

Thanks for reading this post, I really hope that you like the article. I am open to any suggestion, feedback, comments, or any response. Don’t go anywhere please, because the more interesting posts on the game development are on the way to be posted soon.

Inside The Game – General Game Structure

This article is third 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 last part of this series, please click here to read it. I am summarizing the last part here for those who have not read. In the last part, it was discussed about animations, simulations, and games. In simple words, game is a controlled animation, which takes the input from user unlike animation and simulate the world like interaction. This part is more technical than last two parts but it is also sort of general as compared to the implementation or programming in any computer language. But, this article will be very important to know when it comes to game development.

Okay!!! Let’s start our article today. Today, we will discuss about the general structure of any game. You might know that there are many different types of the games such as platform games, First Person Shooter (FPS) or Third Person Shooter (TPS) games, strategy games, board games, and so on. So, it is very important to know about the structure of these games. The structure keyword means how the game is designed and what components together make a game. I am not explaining here about any specific type like how platform games are developed, Today, I am explaining about how any type of game is structured. Software include lot of coding, and sort of graphics as well for User Interface. But, normally, all software contain same Operating System’s User Interface Components like Buttons, Combo Boxes, Radio Buttons etc. So, it doesn’t become a problem to focus on User Interface more than the functionality of the software. However, in games, story takes turn to other side. Games includes many disciplines and field other than just coding. Following figure shows some of the disciplines involved in any game. It is not¬†necessary¬†that all the disciplines can be used in the game, but it is also possible that some of the disciplines are used in the game.

As in the figure, it is clearly shown that game contains very different disciplines to work on at the same time. For example, let’s take graphics here. Graphics is a very important part in any game, because it is the first impression of the game. The most first thing user observes in any game is the graphics. So, the more good are graphics, the more users are likely to play the game. But, let’s say that your game has got amazing graphics, but the game is slow and not good in interaction and gameplay, then users will not play the game. Because, they already observed the graphics, and they liked it so they gave a chance to your game, but when they played it, they didn’t find it enjoyable and interactive, so they just left your game.¬†Interestingly, you can see Game Effects & Gameplay in above figure as part of the game. These all parts play almost equal role in making of any game. Let’s take Artificial Intelligence shortly AI here. You can say AI like it is the brain of the game. How computer will react and respond to the user input is the AI of the game. The enemies in the game, called as game bots or game agents, use AI to make decision. We will come to AI in details soon. Another important part of the game is Game Logic & Game Flow. Now, this is completely coding work, and in this part, all other disciplines like graphics, resources like images, sounds from Game Music part, databases, networking, etc. are assembled. You can say it the most important part of any game, but this part becomes zero, if no other part is available to you. So, all the components are tightly dependent on each other.

Well! I hope that you have known about different disciplines of the game, so let’s talk about the structure now. Behind each game, there is an engine running called as Game Engine. In the business world of games, game engine is like gold mine. You can make many games with game engine. Game engine’s objective is to manage all the data involved in any game. Following figure shows the role of the game engine.

As you are seeing the figure, game engine is managing and controlling other sub-engines like Graphics engine, AI engine, Physics engine, Sound engine, and so on. Game Engine manages all the game data and makes any game come to life. The way of game engine is to keep connected all the engines through one medium, and that medium is game engine itself. It basically takes game data, sends it to the AI for decision making, then sends it to Sound for playing, then sends it to Physics for real-life interaction, and finally sends it to the Graphics for rendering and displaying on the screen. This process keep to be repeated as long as the game is running. This is how a game engine gives birth to a game. On completing this article, I would like to ask you a simple question here:

Thanks for reading this article and series. I hope you liked it. Any suggestions, comments, or feedback is open. Thanks…. In the next part, I will discuss about some basic concepts used in game development like Graphics Engine, Game Engine, and so on. To read the next part,¬†Inside The Game – Graphics Engine, Game Engine, and The Game, please click here.

Inside The Game – Animation, Simulation, and Game

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.

Why compare games and animations/simulations?

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.

%d bloggers like this: