Game Made in p5.js

A couple years ago I made this game in processing. I recently converted it to p5.js, and I wanted to share it.


Hi Quillbert1,

the controls are not working for me. The arrow keys either have no effect or behave super weirdly…

It should just be the up and down arrow keys. Do those work?

Dude it’s so dope! And the audio lol

1 Like

Well yeah, I tried up and down arrow key and it is not working. To be more precise it works in a random way…

I’m running it on Chrome: Version 70.0.3538.77 (64 bits)

That’s weird. It works fine for me. You can see the code here if that helps, but I can’t think of what would be wrong.

Thanks! I made the audio in earsketch a couple of years ago, and I decided it would be good for a game.

@jb4x I think i found the problem, the canvas was too tall for chrome, so it was scrolling when the arrow keys were used. I made the canvas shorter, so that should no longer be a problem.

I still can’t manage to move the penguin up and down :confused:

This is super cool, lol! But maybe a bit easy? I’m on the phone so can’t control it, but managed to stay alive for quite a while.
But otherwise very fun

1 Like

That is really weird. Are you using a mac? The isKeyDown function might work differently on a mac, that is the only other thing I can think of.

@Eeyorelife The game gets harder the better you do, so if you don’t eat the pizza, the sharks will stay away.

Not even that, I’m using W10…

It seems that I’m the only one having that problem, I’m probably doing something wrong!

huh… If you click the home link at the top, there is a link to brick breaker. Do the left and right arrow keys work on that?


And I’m getting the exact same behavior: the first time I press an arrow key, it goes to that direction. But then I have no control over it anymore. So it feels like it is working only once…

That is really weird. Sorry, but I don’t know what could be wrong.

@jb4x if you press the left arrow on this sketch, does the background turn black? And when you release it, does it go back to white?

This is working perfectly!

The controls work when I am holding the shift key.

Worked fine for me. I only scored 19 but what the heck.

I liked the parallax effect on the water/waves and the music.

My only criticism would be the collision detection it seems a bit ‘coarse’

Good fun :laughing: