Tank Up!

Tank Up! is a side-scroll type of game where you have to shoot the enemies thats coming from right of the screen. My goals with this project was

  • Controller object implementation
  • Scaling between android devices
  • Data–>Visual dynamic change
  • INI files

Controller Object

I was already familiar with this topic because of my earlier projects but i feel like im getting better at it. Basically enemies certain variables like spawn times, enemy count on the screen are linked to this object. Therefore when an enemy object gets created it first looks up in this objects variables such as “EnemySpeed”. With this object its so much easier to set the difficulty for the game. Controller object can also set spawn times too. So it really is a “control freak”.

Scaling between different Android devices

So this one was pretty easy because it got handled by game engine. The tricky part was to set the spawn coordinates. Because not every device is 720×1280 right? So lets say spawner decided that the next enemy will get spawn in x = 680. Well i have a phone with resolution of 620x. So it will just basically spawn outside of my screen. To solve this problem i used 2 solutions.

  1. Get the screen resolution as a variable at the start of the game and use magic of math to solve the rest.
  2. Use the game engine function to get the screen width and height and set spawn coordinates like this : RoomWidth / 3 etc..

I used second one because it was a lot cleaner and smarter. That way any android device can play the game without enemies/objects getting spawned outside of the room.

Data to Visual dynamic change

So this is pretty big topic because it varies a lot. Game engines / programming languages / databases etc.. A good example would be JavaScript – AngularJS. But in my project this dynamic change is between object and game engine function. Object draws a bar into screen, this bars length property is linked to an another objects variable. With this system its easier to debug and control.

INI Files

I used INI files to save players gold and upgrade progress. Its organized and easy to access.

Yorum bırakın