MultiSnake

New! VERSION 2.2 UPDATE Read the full changelog

Welcome to MultiSnake V2

How to play

WASD or arrow keys to turn your snake. Don't run into the walls or other snakes. Eat the apples

Walls spawn in as more apples are eaten. When snakes have a head on collison, the longer snake wins. If they have the same length, they both die.

Changelog

1.0.0
[First][yay][lets-go-party]
A while ago
Got the first version of multisnake to work. Its nice and ugly, but whatever. The code is all there.
1.2.0
[Update][Huge][stylesheet][fog_of_war][small_map]
9.29.21
Huge new update!

Chat now works! chat https://multisnake.45.33.54.245:3000 now redirects to https://mulitsnake.xyz without problem. redirecting to multisnake.xyz The two highly talked about mods have finally been released!
FOG OF WAR fog of war Fog is generated as the game goes. You cannot see other people in it. Have fun!
SMALL MAP
A tiny little map.
Note: No obstacles spawn on mods.
New Update also includes: new stylesheet (don't worry, you still type in your username) SOON TO COME:
Bots - I will be making a website where you can make your own and submit them. That way, there will always be people to play against. You will know that they are a bot because their username will be [BOT].bot name. (Made by .username.), where people who submit a bot choose the name.
MORE THAT CAME OUT IN THE UPDATE:
an API!!!
This can be used to make a variety of projects. It is currently used in the site to tell how many people are online Currently its only endpoint it https://multisnake.xyz/api/v1/rooms that gives you a nice list of rooms, their names, the people in them, the quantity of snakes in them, the type of room, the last time it was visited, and more!
1.2.1
[Update][Not-that-incredible][bugfix]
9.30.21
- new styling for game page.
- online counter from 1.2.0 now works.
Images of styling:
1.2.2
[Update][new][Not-that-incredible][bugfix]
10.1.21
- fixed online counter on fog and small maps
1.2.3
[Update][new][accessibility]
10.1.21
- the snake colors are now more contrasting for the color blind.
1.3.3
[UPDATE][new][MOD][STYLESHEET]
10.21.21
Hey everyone! Huge new update here! This one includes:
  • Push to cloudflare (more secure and faster for you)
  • New loading screen + tips
  • New homepage with fancy bouncing arrow animation not from codepen
  • Tips and tricks if ya click that down arrow!
  • [mod] A new mod! TAG mode! Eat apples to become "it" and tag other players to kill them!w Get to ten to win! Wow!!
  • Put a boot onto the repl- even faster now!
Cool photos and videos of the update below.
1.3.4
[BUGFIX][new][wierd replit bug thingy]
10.27.21
- the game runs now. Files got corrupted when committing to github through replit.
1.4.5
[UPDATE][new][mod][REDLIGHT_GREENLIGHT][code_readability]
11.02.21
Hiya everyone!
Just released another mod, super excited for that!! This one was suggested by @rickysong, and it is a lot of fun! It is the same concept as classic snake, but you have to freeze when the light turns red otherwise you'll die! Don't worry though- the light will turn yellow first so you know to smash the spacebar down and hold it there until it goes back to green. It's a lot of fun, go try it out.
Also, the readablity of the code has been greatly increased, and I have explained in comments throughout what each line does, so you can go and understand it.
The next update will be huge. I am rewriting all of multisnakes code to make it faster and more efficient, but it will take time, so be patient.
1.4.6
[UPDATE][new][changelog]
11.14.21
- Added a changelog and updated the text. This took so long.
1.4.7
[UPDATE][new][bots][AI][REDLIGHT_GREENLIGHT][CLASSIC][SMALL][FOG]
3.2.22
Bots now play with you with an incredible AI, they're hard to beat!
Want to sumbit your own AI? View our docs.
2.0
[UPDATE][new][MAJOR]
5.12.23

This is wild

Story by @sojs

Rejuvinating a dead project. Breathing life into what once was

Thousands of views a day on multisnake. I hop on to the servers at any time of day and hang out with 7 other snakes, have massive battles in fog of war, play some tag

A month later, I get blocked by all major internet safety providers, such as lightspeed user agent. No one can play this at school anymore, my views plummet. The project falls into disrepair. A year later, I decided this would have to change. Here is what I did.

I completely revamped the game interace

Made the code intuitive to read, with a fully class-based structure for incredible scalability.

Added full documentation to every class, descriptions of functions, parameters, etc. Commments on most of the files.

Switched from HTML table to HTML canvas. You can now get 60 FPS + a little bit of jitter based on your internet connection

Added a dev mode (put your username as "dev" to get it) for a more in depth view of how the game works under the hood

Updated the bots! If I do say so myself, they are almost impossible to detect from the players (except when they all move in sync)

Added intelligent spawning. This one is crazy. I generate a gradient map of all the danger spots on the map, then use this to determine the least dangerous spawn zone and the least dangerous spawn direction.

Have fun!

2.1.0
[UPDATE][signup][mods][nginx]
5.31.23

Updated to V2.1.0

Changes

Added classic map

  • No walls spawn, get 10 apples to win

Added Small Map

  • This was easy as I just had to change the "size" parameter
  • Added some query strings so that you could change room type
  • Updated to way the board was drawn to display different map sizes

Added Login/Signup system

  • connect to AWS dynamoDB to create account
  • Some express session to manage them
  • added the ability to click on logged in users from the leader board to view their stats
  • emails are private dont worry (I just need to validate them for chat- this is powerd by amazon SES)

Added fun API Token generation

  • This is to prevent bots from connecting and impersonating other player
  • Here how it works
    1. A user connect, server sends request to reCaptcha
    2. If the user is judged to not be a bot, an API key is generated and sent back to the client
    3. The client then sends the API key along with their JOIN_REQUEST
    4. The server checks to see if the key is valid, then assigns it their snakes UID
    5. Whenever they change direction, they also send their API key, which is checked against their UID

More on bots

Support for custom bots will be rolling out soon, once I write some tutorials on how to connect and make them, as well come up with a protocol for them to get API keys that dont expire (this is already in the code, I just have to figure out how to assign them to people on request)

2.2.0
[UPDATE][bots]
6.29.23

Updated to V2.2.0

Changes

Official support for bots is here! Go to the developers page to grab your own API keys to start creating!

Documentation is here go check it out!

2.3.0
[Changed some stuff][Real nice]
12.19.23
Finished setting up multisnake tournaments and got the integration with Multisnake-V2 to work. Added smooth snake movement as well, new battle royale mod, fixed some links and styles.
Directional queue now actually works, and you can hit down and up at the same time without killing yourself.