Building the tiles & collisions detection
We started by implementing the basic gameplay on a single level. As a tile-based 2D game, we used a tilemap and a two-dimensional array to store and draw the formations of each level. This also made collision detection easier, because instead of looping through each platform every time the player moved, we could simply find which tile of the game the player was moving to, and check to see what kind of tile was in the 2D array at that location. If there is a platform tile, the player gets stopped, but if not, the player can continue to move.
Scoring, character & monster interaction
Each covid particle stores its own health points and has a location that is randomly generated. They move on the X-axis based on Perlin Noise, but don't move vertically. If the player comes into contact with a covid particle, they will lose health points. To kill the covid particles, the player can shoot bullets from a magic gun using the 'X' key. Once a covid particle's health points reach 0, they die, and the player gains experience points. Once all the covid particles have been killed, a portal opens up on the right side of the page, which the user can use to go back to the map. If the player's health points drop below 0, then they lose the game.
Multilevel portals
The map features multiple portals to different worlds and a shop. Each portal gets unlocked as soon as the previous level is completed. Once you have finished a level, you can go back to play again to gain more experience points.