Power ups

7 December 2010

You might be wondering why we haven’t posted in a while. We’ve been busy adding a lot of new features. Here’s one of the new features: Power ups!
The new power ups
When picking up the power up blocks you will get that power up. These are the available power ups:

  • Flying power – Allows you to fly for a certain period of time.
  • Speed boost – Allows you to move faster for a certain period of time.
  • Mech speedup – Allows you to shoot faster for a certain period of time.
  • Mine – Allows you to place mines.
  • Armor – Allows you to be more damage resistant.
  • Powerup – Allows you to do more damage.
  • Kamikaze – When used you blow yourself up, causing damage to everyone around you.


  • Hassan Selim says:

    From an object oriented point of view, I’ve always wondered, how can you implement Power-ups in a game such that the power-ups can do almost anything to the gameplay without having to expose to much properties, and also at the same time, get the ability to add more power-ups in a later update without having to change too much code.

    Because, the more you add to the power-up base class, you’re restricting what a future power-up can do, so you’re forced to write a very basic base class, and expose a lot of properties in the scene and player classes so that the power-up can mess with them as much as it wants, and from what I know, exposing a lot of properties (or variables) for a certain object is a bad practice.

    So I wanted to know how you managed to implement power-ups in a smart object oriented way :)
    and keep up the good work, can’t wait to see the final result :)

    • Marco says:

      The unit class in our game has a number of modifier variables contained in it. The powerups have 2 virtual method which get overridden by each specific powerup class. Each of these classes change the modifier they are tied to accordingly. Two exceptions are the mine and the kamikaze powerups. These do affect the world as they are used(one of them spawns a new object, the other creates an explosion). This is also done using the virtual methods, but the one which resets a modifier isn’t used.

Previous Post