Experiment 1 – Tyra & Ola




For our game, we wanted to make the game Snake out of p5.js only. Our final (current) version achieves this, as you move the player with the arrow keys, avoiding touching the walls and yourself, as you collect points in the form of cats. The game was made mostly to challenge ourselves to use this new program and try out things we had not done before.

After making most of the code, we found a snake demo from p5.js, but the coding methods were completely different, so we simply used it to ensure we had the core elements of the game. (https://p5js.org/examples/interaction-snake-game.html)

https://www.google.com/search?q=snake – an example of Snake, via a Google built-in game

https://www.youtube.com/watch?v=XINAniQCh8Y – more examples of Snake

The final cat for the game
The final cat for the game
some inspiration

Aesthetically, we wanted something very cute and soft, so all the edges are rounded, and the colours are very pastel and muted. This was inspired by the Pusheen emotes, seen in applications such                        as FaceBook messenger.

These different emotes also played a role in why we chose cats as the point system.

more inspiration

We used the concepts we learned in this class and previous classes to build the code from nothing. Concepts such as collision detection, movement, sound, and random spawning locations for the cat were from this class. However, we did find a video that helped us stay organized and understand the code as we made the game. (Coding Challenge #3: The Snake Game) In the end, we called upon the CSS code we learned in Intro to Computer Science to tie the browser together aesthetically.

If the enemy spritewe had more time, we would add levels or difficulty, such as adding enemies (in the form of bees) and faster speeds. We also discussed changing the spawn parameters for the cats so they stay entirely on canvas, via a grid system of sorts. Other possible wants would be to add a restart or pause button, as mentioned                                                        during critique.

Leave a Reply