Skip to content

Clone of agar.io client with friendly variable names and support for in-game chat, custom skins and mobile device control.

Notifications You must be signed in to change notification settings

RowanHarley/agario

 
 

Repository files navigation

agar-clone

Contents

Introduction

This is a clone of agar.io. In this project we aim to acheive the following.

  • Hack main_out.js and make the variables and function names readable. Now most of the variable and function name should make sense.
  • Add uploading custom skins features (Done)
  • Add in-game chat feature. (Done)
  • Add mobile device support (Done)
  • Support multi-server feature (Done in Cigar)

##Setup

Copy all files to a server with PHP support (e.g. LEMP/LAMP). To check whether your server supports PHP, please read this tutorial. Once everything is set up, open index.html in your browser. If everything is working well, go to the next section to use your own Ogar server.

Support Your Server

Replace the CONNECTION_URL with your own ip and port in main_out.js

Upload Custom Skins

The upload module does two things. The first is to upload a skin onto skins folder. The second is that the client request the server to run checkdir.php every 15 seconds to check what skins are uploaded and add them into knownNameDict. Then the skins can be loaded.

To make this feature work, you need to give upload.php priviliage to read skins folder.

chmod 777 skins 

will make it work.

Test and Known Issues

This client has been tested on LEMP stack on OS X 10.10 and Ubuntu 14.04 with server side Ogar.

It is known that some of the variables and function names still make no sense, we are working on that.

FAQ

Can agar-clone connect to the official server?

No, agar-clone is not intended to be used with the official server. You will have to use it with Ogar or Cigar.

How can I use the chat feature?

Currently, only Cigar supports the chat protocol. If you know of another server supporting the extended protocol, feel free to let us know.

Protocol extensions

As the server has to tell whether the client supports protocol extensions, the values of package 254 and 255 have been adjusted. Package 255 now contains "Ogar" in ASCII (1332175218) while package 254 contains the version number. When modifying the protocol, only new features can be implemented. Also, the client must remain compatible with older versions of the server.

Original protocol can be found here. Changes to the protocol have to be documented.

Contributions

Pull Request are welcome.

Disclaimer

Note that the aim of this repo is to study agar.io client, understand the mechanism and find potential improvements. It is worth pointing out that hosting a third-party agar client is against the Terms of Agario and not recommended by the owner of this repo. Please think twice before hosting the client and do it at your own risk. :)

About

Clone of agar.io client with friendly variable names and support for in-game chat, custom skins and mobile device control.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 61.9%
  • PHP 25.9%
  • HTML 12.2%