Category Archives: C/C++

Once a Freelancer – Always a Freelancer

Well well well, its my second day continuous to write a post on my lovely blog GamyGuru. I would like to thank you all the readers who supported me and my blog by reading this. Thanks

You probably be thinking about the title of post, its a little confusing i guess. Well, it is. Here is background of title. Before starting my new job, i was at home doing some rest for while. I was at home for 2 months doing nothing and rest. So, a friend of mine, he is an iPhone developer, recommended me to start freelance and earn money at home. I was getting bored of rest, so I created account at and started bidding and getting projects. You can see my Freelancer profile at this link:

So, I always took freelancing as negative step, so i was never interested in it. This time I thought of giving it a try, and boom boom boom, I was liking it and I was getting projects. Then I suddenly got job as game developer and yes! I love games, so i accepted offer and started the job. But, as committed with my early and new clients I had to finish their projects and work, so I started working double shift. One shift at job and other at Freelancer. Man!!! That was tough life,  and i wanted to stop it, so i stopped to bid and apply for projects and hired some non expensive and affordable freelancers and gave projects to them and finished the projects. Phewwww, I took long deep breath and now its time to rest.

Haha, that’s not end of post, that’s the start of post…. well, as title says Once a Freelancer is always a Freelancer.  I stopped applying for projects but projects and clients never left me. They still contact me and provide projects and different offers, which i really don’t want to deny. So, its been 4 months to stop freelancing but still doing it, sometimes intentionally and sometimes unintentionally…  you really can’t quit freelancing so easily, its more tough job than starting freelancing. Let me explain this. One way to stop freelancing is to be unresponsive to all clients you got and sooner or later they will stop to contact you. Well, that will make your negative image in clients mind and the respect, you got by working hard and by providing quality solutions, will be gone within a minute. I would say, there is no worthy thing than respect in this world so I will never do that. The other method is to provide the projects which you get to other clients and manage things in middle. What I learnt through this was that managing projects is much much easier than managing people. Human behavior is toughest part in people, and that’s the skill in a true leader and entrepreneur.

Thanks for reading this, and I will be back tomorrow with my other experience story. I hope You like this post.

Wajahat Karim

From Game Developer to Game Designer

Hello readers!!!
Well, its my life, i think its going in a little different direction now.

What? Am I happy with it?
Umm….. i can’t say anything about it now because its not changed, its still same but I think it is taking turn now. And, my expectations are very high and positive, and let’s just hope and pray that I get good from it.

What was it before?
I first got personal computer when I was 14 years old. After learning some basis, I moved to learn Adobe Flash. At that time, it was known as Macromedia Flash. I was using version 5. I kept learning and getting more and more motivated to this field. I wanted to create an animated movie and for this goal, i kept learning it. Then, i reached in university where i started my graduation. I was doing grad in Communication system engineering but I wasn’t sure about it. I couldn’t get interest in it, I just hated it and avoided it so much and 3 years passed. While this time, I was moved to Android already, and was developing Android apps. Then, in final year at a cafe table with few rough papers and pen inked blue, a hot cup of tea half empty, cricket commentary voice in background,  washing dish and waiter service light noise, with my 2 partners, I decided to develop a game for Android devices. And through tough decision, tough routine in last year, emotional ups down, motivation of positive people, making fun of negative people, mid-night oil burn, sleeping on chair with head on table, I with my team finally created a game. And during this whole phase, I was very motivated to game development. I thought of making my future as Game Developer, and i am right now doing job as Game Developer.
So, I am Game Developer In these good days.

So, what happened then ?
Then? Yeah then, then my one coworker in my office gives me 2 seasons of IGN – The Next Boss. Its a reality show started 2 years ago. The concept of show is to choose best person suitable for game industry and give him /her title of The Next Game Boss along with some cash prize and other benefits like super computers, paid software license like Unity 3D pro version, and Adobe license to use their software for free. It was so much learning and fun in the show that i can’t say in words. Season 1 was on creating a playable game in less than a week, while season 3 was to select best game of different indie game designers working in their homes, garages, office etc to make next big hit in game industry. The show was on Unity 3D. Everything thing shown and developed was on Unity 3D. The judges were well reputed game industry people. For example, in season 2, there was a judge who was Game Designer, Game Producer, of hit games like God of War series, Twisted Metal series and so on. That’s where from I got attracted to being Game designer instead of game Developer.

Oh, you want to be game designer?
Yep, that’s what I am trying to say. I mean look at any game designer. He keeps all developers, musicians, artists, manager, story and script writers on track and motivate them all to get in line and move them on same track. I just loved the role in game industry and thinking of being game designer.

What did you do then?
Well, i started looking for to  understand meaning of Game Designer, so downloaded a book on game designing and still reading it. And, I am learning lots of new things and this time I am applying this knowledge on my Cut on One game and designing its game concept and so on. When i finish my book reading, I will write about it on this blog,  and when i finish cut on one game designing, i will write about how i applied my knowledge to design a game.

okay that sounds great
Well, for a while i am focusing on game designing. Even, I am looking for doing masters in Game designing probably from Full Sail University, North America.

That’s wrap call
I think its a lot for today. Thanks for reading. Looking forward for great feedback and comments and suggestions….. more will me coming soon, keep reading GamyGuru. Thanks

Wajahat Karim

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

%d bloggers like this: