Three Player Game made for HackClub High Seas by Rowan Murphy, play here: https://cascadecoder.github.io/Three%20Player%20Demo/
This is a three player game that uses the WASD, Arrow Keys, and Mouse buttons (yes, a physical mouse) to control the three players. It is made completely in vanilla JS and HTML without any libraries. This was a solo project.
Three Player Game is played on two dimensional mario-style screen.
There are three players, each with a unique set of controls:
- Player 1 uses WASD - W to jump, D and A to go right and left, and S to activate their ability
- Player 2 uses the arrows keys - ^ to jump, > and < to go right and left, and v to activate their ability
- Player 3 uses the mouse - Left click to go left, Right click to go right, scroll up to jump, and scroll down to activate their ability
Note: the third player doesn't use ILKJ because of the limitations of keyboard input with javascript (maximum six keys)
The game itself is simple. After a delay, a random person is selected to be it. Their goal is to tag the other players, and if tagged, they become it. When you become it, you are frozen for a few seconds before being able to move again. This is to keep things fair and not instantly alternate who is tagged. The runners are trying to stay away from the tagger as much as possible.
There are multiple game objects shown on the screen.
- The bounce pad - the yellow rectangles in the image (above) are bounce pads, meaning when you step on one launches you into the air. They are useful for reaching high places in a lesser amount of time than making it there manually.
- The speed boost - the purple/blue pad in the image makes your character go faster for a short amount of time, making you able to catch up/get away quicker.
- The teleporter - the green square is a teleporter, teleporting you to a different random one elsewhere in the map. This adds a bit of risk but can pay off if running from a tagger.
The tagger and runners both have special abilities. If they press down on their controls, it will activate either:
- Mr. Ghosty- tagger only - Becomes a ghost for a few seconds allowing you to pass through walls and target players. They cannot interact with any game objects, and are teleported back to where they initially became a ghost if they tag someone else or the timer runs out.
- Speedy shoes - runner only - Become really fast for a few seconds, allowing you to clear ground between you and the tagger. This deactivates if you get tagged or the timer runs out.
This is the current layout of the game, with only one level and no UI. This will be developed on later after I recieve feedback.
The map is quite big, and also has some smaller more polished features.
Particles when jumping on a bounce pad
Starting position and outline when a ghost
Freeze timer when you get tagged
Fire particles when in speedy shoes mode
I will add more things, including
- A starting UI
- More maps
- Cleaner code (lol)
- More abilities to choose from
- Background art
- Minor bug fixes