Published using Google Docs
Power Up Documentation
Updated automatically every 5 minutes

Making a Powerup

One of the driving motivators in Raccoon Revenge is the introduction of new powerups to changeup gameplay. Adding a powerup requires coding, design, art, and level work. It's a good team project. In this documentation we'll go through each step of making a powerup and explore what goes into it.

Design

Coding

Art

Level Design

Design

As a group, come up with an idea for the powerup.

Currently the game has these three powerups:

Incapacitate (Knocks out all the enemies for 3 seconds)

Knock Over (Knocks over trashcans in a 5-10 tile radius)

Speed (Speeds up the player for 3 seconds)

Here are some other ideas (feel free to steal them):

Invisibility

Beeg Snatcher that can knock down even attacking enemies

Trash Bag - Holds more trash

Slow Down - Slows down time for the enemies

Freeze - Enemies freeze in place.

Use one of those, or something else. The big thing is that there's a specific understanding of how you could apply the design into Unity quickly. Generally powerups that work with the player, the enemies, or the trashcans are applicable. Don't mess with level generation or UI.

Coding

So, how do we implement a powerup. Luckily much of that work is already done. The implementation is based around two base features. PowerupBase is the base prefab for all powerups. (Prefabs -> Powerups). You're going to add a powerup script to the prefab to make it function. PowerUp is the abstract class for all the powerup scripts (Scripts -> Powerups).

I would recommend looking at the other powerups to know how they are implemented. Here's just a general overview of the parameters and methods that are most important.

Parameters

The rest of the parameters are set in the powerups own scripts.

Methods in PowerUp class

Feel free to look through PowerUp to get an idea of how the rest of the code works.

Art

There are two main art assets for a powerup. The sprite for the powerup, and the visual effect when you collect the powerup.

The sprites for a powerup are pretty open in design. Look at the art bible for specific features of the drawing. The big thing is that the sprites should have some rectangular form. This is to visually separate them from the circular trash sprites that will also spawn with powerups.

The visual effect can be anything. The powerups in place right now have three different approaches. From a circle that tweens, a classic particle effect, and a geometric particle effect. Whatever you choose, make sure it despawns properly, and that it communicates what you want. It will spawn on contact with powerup.

Level Design

The final domain to work on powerups is in level design. Currently, every 5 sets of levels is based around a powerup. This means there's going to have to be 5 levels created for every powerup made. Consult the Level Design Documentation for details on how to create levels.

The specific thing to look out for is pacing with the levels and introducing a new mechanics (in this case a powerup). Here's the general format we're following. (Percentages relate to level difficulty)

  1. Introduce a new mechanic - 10-30% (very boring if something wasn't being introduced)
  2. Use that mechanic with a theme - (30-40% - good solid dynamic level, but not too difficult)
  3. Combine the mechanic with something else - (40-50% - contains some trickiness, start to challenge players to think deeper about the mechanic)
  4. Bring back in all mechanics - (50-60% really dynamic and exciting, should be the best level of a set)
  5. Test the player with the mechanic - (60%-70% really tricky, starting to be frustrating, but never passing the boundary. This level is about making sure the player knows what's up before bringing them back down with the next level set.)


So for example:

The incapacitate levels:

The first level introduces the powerup effect. There's a trapped enemy that you see when moving. You pick up the powerup and you can see the effect.

The second level lets you play more with the mechanic. The level influences you to get powerups in a safe place, and use them to move to a more difficult place in safety.

The third level brings in teleporters, and shows that power ups stay in a level forever, allowing for some strategy on when you pick them up.


The next level brings you really close to the enemies, reduce the number of powerups, but makes the use of them very powerful.

The final level brings it all together and explores a wide map using the powerup to avoid confrontation in more narrow areas.

That's kinda what we're going for, although everyone has their own style of level design, so do what you want with it.