Game Made in p5.js


#1

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

http://pizza-penguin.quillbert.tk


#2

Hi Quillbert1,

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


#3

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


#4

Dude it’s so dope! And the audio lol


#5

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)


#6

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.


#7

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


#8

@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.


#9

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


#10

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


#11

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.


#12

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


#13

Not even that, I’m using W10…

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


#14

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?


#15

Nope…

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…


#16

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


#17

@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?

https://editor.p5js.org/Quillbert/sketches/S1HiRDT3m


#18

This is working perfectly!


#19

The controls work when I am holding the shift key.


#20

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: