Skip to content

Agar.io clone written with Socket.IO and HTML5 canvas

License

Notifications You must be signed in to change notification settings

faith20/agar.io-clone

 
 

Repository files navigation

Agar.io Clone

GitHub Stars GitHub Issues GitHub Wiki Build Status Live Demo " Gitter

A simple Agar.io clone built with socket.io and HTML5 Canvas on top of NodeJS.

Image

Live Demos

An updated list of live demos can be found on the Live Demos wiki page


How to Play

You can check out a more elaborated how to play on our wiki

Game Basics

  • Move your mouse on the screen to move your character
  • Eat food and other players in order to grow your character (food respawns every time a player eats it)
  • A player's mass is the number of food particles eaten
  • Objective: Try to get fat and eat other players

Gameplay Rules

  • Players who haven't eaten yet cannot be eaten
  • Everytime a player joins the game, 3 food particles will spawn
  • Everytime a food particle is eaten by a player, 1 new food particle will respawn
  • The more food you eat, the slower you move

Latest Changes

  • Game logic handled by server
  • Client side is for rendering only
  • Display player name
  • Now supporting chat
  • Type-ping in the chatbox to check your ping

Installation

You can simply click one of the buttons below to easily deploy this repo to Bluemix or Heroku:

Deploy to Bluemix Deploy to Heroku

-or-

You can check out a more detailed setup tutorial on our wiki

Requirements

To run the game, you'll need:

  • NodeJS with NPM installed
  • socket.io
  • Express

Downloading the Dependencies

After cloning the source code from Github, you need to run the following command to download all the dependencies (socket.io, express, etc.).

npm install

Running the Server

After downloading all the dependencies, you can run the server with the following command:

npm start

The game will then be accessible at http://localhost:3000.

FAQ

  1. What is this game?

This is a clone of the game Agar.IO. Someone said that Agar.IO is a clone of an iPad game called Osmos, but we haven't tried it yet. (Cloneception? :P)

  1. Why would you make a clone of this game?

Well, while the original game is still online, it's closed source, and sometimes, it suffers from massive lag. That's why we want to make an open source version of it: for learning purposes, and to let the community add some awesome features that they want, self-host on their own servers to have fun with some friends.

  1. Any plans on adding an online server to compete with Agar.IO or making money out of it?

No. This game belongs to the open-source community, and we have no plans on making money out of it nor competing with anything. But you surely can create your own public server, let us know if you do so and we can add it to our Live Demos list.

  1. Can I deploy this game to my own server?

Sure you can! That's what it's made for ;)

  1. I don't like HTML5 Canvas. Can I write my own game client with this server?

Sure. As long as your client supports WebSockets, you can write your game client in any language/technology, even with Unity3D if you want (there is an open source library for Unity to communicate with WebSockets).

  1. Can I use some code of this project on my own?

Yes you can.

For Developers

License

You can check out the full license here

This project is licensed under the terms of the MIT license.

About

Agar.io clone written with Socket.IO and HTML5 canvas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.2%
  • CSS 6.3%
  • HTML 3.5%