Up the power-ups!

This week I have been working on the first ‘power-up’ to be featured in our game.

The creation of the power-up is twofold: Firstly, a base power-up Unity-gameobject had to be created. Secondly, a specific power-up had to be created which somehow changed the dynamics of the game, as according to the MDA framework. The base power-up will work as a template for future power-ups that are going to change the dynamics in different ways. Our group agreed that it would suffice to have this be very simple, so we decided that it should be created from the current ‘Enemy’-gameobject which upon instantiation in a script, will chase the player and eventually collide. The actual power-up that will be used in the game however, needed some extra work to have meaningful functionality. The game already featured a ‘reveal’ mechanism which could be used to create this power-up too. This ‘reveal mechanism’ has the player at the center of a square which uses a ‘knob’-sprite to display the revealed area in the shape of a circle. Upon entry, enemy sprites and power-ups that used to be invisible when outside the area, are shown. Below is an image that displays the reveal area with gameobjects from the game’s primary gamemode.

Picture1.png

The ultimate goal for this power-up would be to have it work like a flare gun, which would require proper lighting to be reflected off all gameobjects in the scene and other fancy features, however this is somewhat outside the scope of this week’s plan, but in order to accomplish a similar, and more importantly an equally functional design, it was decided that simply changing the size of the reveal area would work. For now, it works so that upon collision with the player, the power-up will destroy itself and the player’s collision function will trigger. In it, a new function is called which scales the reveal area and increases the light’s intensity and range. These changes enhance the player’s chances of winning the game by allowing him/her to spot enemies and other power-ups further away. The effect doesn’t last long, however. Each frame, the new reveal area will shrink by a small factor. This makes sure the game maintains balance, but also creates a smooth effect that visually tells the player that the reveal area will eventually be reset to its original size.

Picture1_1

Finally, via the power-up a new mechanic has been introduced which subsequently changes player behavior, i.e. dynamics.

 

– Jeppe Willatzen

About Jeppe Willatzen

2017 Programming