GithubHelp home page GithubHelp logo

jzgenius / agar.io-clone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from owenashurst/agar.io-clone

0.0 2.0 0.0 11.21 MB

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

License: MIT License

JavaScript 89.88% CSS 6.39% HTML 3.73%

agar.io-clone's Introduction

Agar.io Clone

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

A simple but powerful Agar.IO clone built with socket.IO and HTML5 canvas on top of NodeJS.

Image

Live Demos

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


How to Play

You can check out how to play on our wiki.

Game Basics

  • Move your mouse around the screen to move your cell.
  • 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 as big as possible and eat other players.

Gameplay Rules

  • Players who haven't eaten yet cannot be eaten as a sort of "grace" period. This invincibility fades once they gain mass.
  • 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 to make the game fairer for all.

Latest Changes

  • Game logic is handled by the server
  • The client side is for rendering of the canvas and it's items only.
  • Mobile optimisation.
  • Implementation of working viruses.
  • Display player name.
  • Now supporting chat.
  • Type-ping in the chatbox to check your ping, as well as other commands!

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 / install this 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 or the respective server installed on. The default port is 3000, however this can be changed in config. Further elaboration is available on our wiki.

Running the Server with Docker

If you have Docker installed, after cloning the repository you can run the following commands to start the server and make it acessible at http://localhost:3000:

docker built -t agarioclone_agar .
docker run -it -p 3000:3000 agarioclone_agar

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 is closed-source, and sometimes, it suffers from massive lag. That's why we want to make an open source version of it: for educational purposes, and to let the community add the features that they want, self-host it on their own servers, have fun with friends and more.

  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 can of course 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?

Of course! 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

TODOs

We have an explicit TODO list for the all the features we aim to develop in the future. Feel free to contribute, we'll be more than grateful.

License

You can check out the full license here.

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

agar.io-clone's People

Contributors

aadilzbhatti avatar abalabahaha avatar bjarneo avatar cschwarz avatar drpotato avatar espressobit avatar francisco-maciel avatar giongto35 avatar huytd avatar iandees avatar igorantun avatar incognitov avatar jniles avatar joemattie avatar jsloyer avatar juhq avatar juslee avatar kbariotis avatar lexoyo avatar madarauchiha avatar owenashurst avatar panpawn avatar peterdavehello avatar sarencurrie avatar saviosg avatar themuddfamily2 avatar thevoxcraft avatar villers avatar vytorcalixto avatar wb9688 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.