Learn how to make Slither.io with JavaScript and Phaser! This game clones all the core features of Slither.io, including mouse-following controls, snake collisions, food, snake growth, eyes, and more. Progress through each part of the source code with our Slither.io tutorial series.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 48c3df8 Feb 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
part-2 fixed part 2 Jul 5, 2017
part-3 first commit Jul 3, 2017
part-4 first commit Jul 3, 2017
part-5 first commit Jul 3, 2017
part-6 first commit Jul 3, 2017
slither-io first commit Jul 3, 2017
.gitignore first commit Jul 3, 2017
README.md Update README.md Feb 17, 2018

README.md

See the final demo of this series: https://loonride.com/examples/slither-io/slither-io/

Part 1 of the tutorial series: https://loonride.com/learn/phaser/slither-io-part-1

Video - Coding Slither.io in One Week with JavaScript: https://youtu.be/Nlo8LyO8HAQ

alt text

About this Clone

This clone of the game Slither.io was created to teach game design concepts with JavaScript and the Phaser game framework. It showcases physics collisions and organization concepts of the game without implementing the multiplayer server aspect.

Cloned Features:

  • Player and bot snakes
  • Mouse and arrow-key controls
  • Speeding up with spacebar
  • Death from head-on collisions
  • Random food placed at start
  • Snake growth from eating
  • Food dropped on death
  • Shadows and interactive eyes

Contributing

Because this source code has a tutorial series built around it, I will only be accepting minor changes. If there is great interest in furthering this clone, I will create a new repository to take contributions. Show your interest by emailing me at contact@loonride.com

Tutorial Links

How to make Slither.io with JavaScript: Part 1 - Introduction

How to make Slither.io with JavaScript: Part 2 - Snake

How to make Slither.io with JavaScript: Part 3 - Players & Bots

How to make Slither.io with JavaScript: Part 4 - Collisions

How to make Slither.io with JavaScript: Part 5 - Snake Eyes

How to make Slither.io with JavaScript: Part 6 - Snake Shadows

How to make Slither.io with JavaScript: Part 7 - Food & Conclusion

Demo Links

Part 2 Demo

Part 3 Demo

Part 4 Demo

Part 5 Demo

Part 6 Demo

Final Demo