Power-ups! – Dylan

What is the best part of a game to you? The sweet end music? The awesome rewards? Well, for me, it was always power-ups, there is nothing more staple in video games than a power up. I mean, who doesn’t know what a Mario mushroom looks like by 2018? That’s what I have been working on lately, making simple power-ups that make a game feel more alive.

In short, power-ups are simple in concept, but quite demanding in knowledge of code. A simple speed up zone involves layers of code and work, just to move a player character faster. For example, the “zone” for that power up, must know when it collides with the player character, but also it needs to let the player object pass through. Then, once the player starts moving through the speed up, what happens? That’s where “CollisionPersists” functions show up.

A “CollisionPersists” function simple says, “Hey, while the play is still in contact or passing through me, make this change!” and then that change is, make the player go faster. 

So now, they have sped up, but what happens when they leave the zone? That is where “CollisionPersists” becomes handy. A “CollisionPersists” function only “turns on” while the two objects touch, once they stop touching, it turns itself off, setting the player speed back to normal!

It sounds simple, and logically it is, but the code is difficult to write, but a lot of fun when it works. I have really been enjoying making my simple test game feel more like a real game, and I think this is a big first step towards something fun to play.

-Dylan

Image – https://giphy.com/gifs/car-cars-top-gear-S7rcze8TrXof6

 

One thought on “Power-ups! – Dylan

  1. sabrina.schoenborn

    Hey, Dylan! This is a really interesting blog post! I actually just read something that you may want to check out! It talks about how Game Theory has changed economics in the modern 21st century and I think it would be really interesting for you to look at! Additionally, I loved how you explained this complex coding in terms that are simple and easy to understand, and I encourage that you keep doing that in your blog posts. Keep up the great work!

    https://www.weforum.org/agenda/2015/06/how-has-game-theory-changed-economics/

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.