---
title: Onwards to Powerups!
author: nek0
tags:
- "devlog: pituicat"
- english
description: "New update on the progress of 'pituicat': Powerups"
---

Hi again!

after the last update I wanted to try implementing something I was a bit
anxious about: Powerups. They were quite a wildcard until then, sonce i didn't
know how to implement neither the interaction with them nor how effects would
be communicated or even passed on to the player.

Turns out my worries have been ungrounded. Implementing everything was quite a
breeze. Picking them up uses the collision detection system already present, I
only needed to alter the collision reaction. Powerups are their own type using
an enum to define the stored effect. very straightforward. Upon collision with
the player the effect is passed unto the player with a given amount of time how
long the effect lasts. Finally even the powerups present on the map have a time
to live and despawn when their time runs out.

I also started to make some minor tweaks, like the player character looking
in the direction they move. but see for yourself:

<video controls="true">
  <source src="/vids/2021-05-02.webm" type="video/webm" />
</video>

The first smaller pituicat is a powerup granting more speed for 5 seconds. The
other one is just a test with collision objects which are not part of the map
definition. I am quite pleased with these results, but I see, that I now need
to work more on visuals to make things on screen more understandable.

At this point I want to stress, how powerful [ffmpeg][ffmpeg] is. The above
video was generated from an OpenGL API trace. If I had known this before, it
would have saved me tons of worries trying setting up a finicky recording
system, which was the cause for the lack of a nice showcase video in the last
update.

All the progress on the code is, as always, for you to see in the
[gitea repository][gitea]

With all that said, I wish you all happy hacking!

Keep calm and wash hands.

[ffmpeg]: https://ffmpeg.org
[gitea]: https://gitea.nek0.eu/nek0/pituicat
