Coder Social home page Coder Social logo

slither's Introduction

slither npm-deps

This is currently under extremely active development, and you probably shouldn't use it unless you like broken software.

This is supposed to be an open source implementation of the slither server built on top of Node.js that emulates the full functionality of the original server.

Install

You can get the latest stable release from the releases page. Once you've downloaded it, you are ready to run the following commands:

$ cd slither
$ npm install

Obviously, if you want to try the latest version, you can clone the master branch but can have bugs because it's a development branch, so don't use it for production.

The server depends on Node.js, npm and other packages that are downloaded and installed during the installation process.

Run

You can start the server by executing $ script/run or $ npm start.

The server will be accesible at localhost:8080 but you will need a client (you can use the original one) to be able to play the game.

Plugins

If you want to install a plugin, add it to packageDependencies in the package.json with the respective version.

{
  ...
  "packageDependencies": {
    "my-plugin": "0.1.0"
  }
}

and run $ script/install.

Contributors

You can contribute to the project by cloning, forking or starring it. If you have any bug, open an issue or if you have an interesting thing you want to implement into the official repository, open a pull request.

License

MIT © Iegor Azuaga

slither's People

Contributors

iiegor avatar iioel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slither's Issues

Can this run on it's own?

I've downloaded this private server and been using it for a while but the snake doesnt seem to move very well. Is there another github repository I need to run this or what?

Implement server command line

Ad command to the console like:

  • mass (give a player some mass by using his ID)
  • kill (Kill a player by using his ID)
  • playerlist (shows the player IDs)
  • takemass (take some mass of a player by using his ID)
  • help (show all the commands)

if you type anything thats not a command the show this message shows up:

  • This is not a Command. Type 'help' for help

Add Patch notes to releases

Can you please add a few patch notes when you release a new version.
E.g: For 0.0.9 you could add something like:
-Improved Snake Movement

Need help

"You can use the original one from slither.io, just go there, open the console, paste: sos = [{ ip: "localhost", po: 8080, ac: 34, ptm: 121 }] and press the play button."

Could you enlighten me some more? I can't figure this out.

I get 'Upgrade required' on the webpage

When I run the bash script it works just fine:
behnam@LinuxNet> bash script/run /tmp/slither
[Application][DEBUG] You are running slither-server 0.0.3
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening on port 8080

But when I open up http://localhost:8080 all I get is:
Upgrade Required

Here is how the screenshot looks like:
screenshot from 2016-04-17 10-54-45

Also:
behnam@LinuxNet> node --version /tmp/slither
v5.10.

behnam@LinuxNet> npm --version /tmp/slither
3.8.6

Any thoughts?

Error

[Server][ERROR] Unhandled message s - null
Snake going to 250
[Server][ERROR] Unhandled message s - null
[Server][ERROR] Unhandled message s - null

Server start but can't connect and no logs

Hey, I've try to run the server but I can't connect to him ( "sos = [{ip: "127.0.0.1", po: 8080, ac: 132, ptm: 12}];" ) and no more logs appear on the console.

me@me-My-Desktop:~/slither-0.0.3$ bin/slither
[Application][DEBUG] You are running slither-server 0.0.3
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening on port 8080

I've also try to start server.js :

me@me-PC-Desktop:~/slither-0.0.3$ node server.js
module.js:341
throw err;
^

Error: Cannot find module './bin/kekocity'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (/home/yoel/slither-0.0.3/server.js:1:63)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Function.Module.runMain (module.js:447:10)
me@me-PC-Desktop:~/slither-0.0.3$

will help others ppl too =)

please can you upload your local client? so i can test when i have no connection to use original client.
thanks in advise.

Cannot Move

iiegor i cannot move in version 0.0.5
(i can join now thanks to version 0.0.5)

Client

Will there eventually be a client made so we don't have to use the slither.io url?

Error

using port 8080
Application][DEBUG] You are running slither-server 0.0.9
[Application][INFO] Starting the server in dev at port 8080...
[Server][INFO] Listening for connections

When trying to connect this happens
SCRIPT12017: WebSocket Error: SECURITY_ERR, Cross zone connection not allowed

Please tell me how to connect ,thanks

npm start fail

[phoenix@PhxMBP slither (master)]$ npm install

> [email protected] install /Users/phoenix/mine/tmp/slither/slither/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node

> [email protected] install /Users/phoenix/mine/tmp/slither/slither/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
[email protected] node_modules/object-keys

  1 module.exports = {
[email protected] node_modules/semver

[email protected] node_modules/coffee-script

[email protected] node_modules/ws
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/chalk
├── [email protected]
├── [email protected]
├── [email protected]
  1 module.exports = {
├── [email protected] ([email protected])
└── [email protected] ([email protected])
[phoenix@PhxMBP slither (master)]$ npm start

> [email protected] start /Users/phoenix/mine/tmp/slither/slither
> node ./bin/slither

[Application][DEBUG] You are running slither-server 0.0.10
[Application][INFO] Starting the server in dev at port 443...
[Server][ERROR] listen EACCES 0.0.0.0:443 -  { [Error: listen EACCES 0.0.0.0:443]
  code: 'EACCES',
  errno: 'EACCES',
  syscall: 'listen',
  address: '0.0.0.0',
  port: 443 }

A Round Map

You can make the Map Round (and with the Red Border of course)

Client/Server Feature|Chat Feature|ECT

This is going to have some great potential! We need to add a chat system and we need to make a client that works with the server, Almost like cigar agario for the popular game agario. Another great feature would be to have a gameserver thing so we can edit like food, start mass ect.

Build error server

I got this error when i am build the server

npm install
\
> [email protected] install /home/pi/Downloads/slither-master/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

make: Entering directory '/home/pi/Downloads/slither-master/node_modules/ws/node_modules/utf-8-validate/build'
  CXX(target) Release/obj.target/validation/src/validation.o
In file included from ../src/validation.cc:15:0:
../node_modules/nan/nan.h:328:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
                                               ^
validation.target.mk:84: recipe for target 'Release/obj.target/validation/src/validation.o' failed
make: *** [Release/obj.target/validation/src/validation.o] Error 1
make: Leaving directory '/home/pi/Downloads/slither-master/node_modules/ws/node_modules/utf-8-validate/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.8-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/Downloads/slither-master/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> [email protected] install /home/pi/Downloads/slither-master/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

make: Entering directory '/home/pi/Downloads/slither-master/node_modules/ws/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:0:
../node_modules/nan/nan.h:328:47: error: ‘REPLACE_INVALID_UTF8’ is not a member of ‘v8::String’
   static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8;
                                               ^
bufferutil.target.mk:84: recipe for target 'Release/obj.target/bufferutil/src/bufferutil.o' failed
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
make: Leaving directory '/home/pi/Downloads/slither-master/node_modules/ws/node_modules/bufferutil/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 4.4.8-v7+
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/Downloads/slither-master/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules/object-keys

[email protected] node_modules/semver

[email protected] node_modules/chalk
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])

[email protected] node_modules/coffee-script

[email protected] node_modules/ws
├── [email protected]
└── [email protected]

i have created a startup script

Start.sh in the slither folder look like this:

#!/bin/sh

sudo bash Desktop/slither/script/Slither

and

Slither executable file in the script folder look like this

#!/bin/sh

    cd "$( dirname "$0" )"
        cd ..

        ./script/run

if have send the files to your mail

watch it in github click here

(i have forked your repository)

Best repo so far

I have been searching for slither private server for a while and i found one, this is it. I love this repo keep up the good work.

Snake wont move

I know some people already reported this, but in the latest release v0.0.10, it still gave me pose like this
Image of Yaktocat
This snake wont move no matter what, even i poke his eye...

And the console still give me this error...
Image of Yaktocat

EDIT:
I'm using Ubuntu 14 vps
and use npm start to start it

[Server][ERROR] Unhandled message - null

http://i.imgur.com/lWhFmI5.jpg

[Server][INFO] Listening for connections
[Server][ERROR] Unhandled message û -  null
[Server][ERROR] Unhandled message Z -  null
[Server][ERROR] Unhandled message Y -  null
[Server][ERROR] Unhandled message \ -  null
[Server][ERROR] Unhandled message ] -  null
[Server][ERROR] Unhandled message _ -  null
[Server][ERROR] Unhandled message O -  null
[Server][ERROR] Unhandled message Ð -  null
[Server][ERROR] Unhandled message Æ -  null
[Server][ERROR] Unhandled message Å -  null
[Server][ERROR] Unhandled message ã -  null
[Server][ERROR] Unhandled message ø -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message
                                   -  null
[Server][ERROR] Unhandled message  -  null
[Server][ERROR] Unhandled message ù -  null
[Server][ERROR] Unhandled message ø -  null
[Server][ERROR] Unhandled message ö -  null
[Server][ERROR] Unhandled message ä -  null
[Server][ERROR] Unhandled message ´ -  null
[Server][ERROR] Unhandled message � -  null
[Server][ERROR] Unhandled message � -  null
[Server][ERROR] Unhandled message � -  null
[Server][ERROR] Unhandled message � -  null
[Server][ERROR] Unhandled message ¯ -  null
[Server][ERROR] Unhandled message Ô -  null
[Server][ERROR] Unhandled message Ù -  null
[Server][ERROR] Unhandled message Þ -  null
[Server][ERROR] Unhandled message Ú -  null
[Server][ERROR] Unhandled message Æ -  null

Snake doesn't move smootly

Whenever I go to play a game my snake doesn't move very well and no food comes up. Don't know if this is just me or something. Here's a screenshot:
screenshot 1
The snake just continues to move like this. If you look in the bottom right as well, you can see that it says I'm off the map.I also get this in the console:
screenshot 2
I have a feeling this may have something to do with pos = math.randomSpawnPoint() in src/snake.coffee

Nothing Open for me

I can not do anything.
I try to install the script * Install , it opens and closes.
Click on * RUN , it opens and closes.

Question

Which port runs the game?
I tried 443 but does not work

Error !!!

[Application][INFO] Starting the server in dev at port 888...
[Server][INFO] Listening on port 888
[Server][DEBUG] A new snake called was connected!
[Server][ERROR] Unhandled message û - null
[Server][ERROR] Unhandled message T - null
[Server][ERROR] Unhandled message g - null
[Server][ERROR] Unhandled message � - null
[Server][ERROR] Unhandled message | - null
[Server][ERROR] Unhandled message U - null
[Server][ERROR] Unhandled message X - null
[Server][ERROR] Unhandled message V - null
[Server][ERROR] Unhandled message X - null
[Server][ERROR] Unhandled message _ - null
[Server][ERROR] Unhandled message b - null
[Server][ERROR] Unhandled message a - null
[Server][ERROR] Unhandled message ` - null
[Server][ERROR] Unhandled message c - null
[Server][ERROR] Unhandled message j - null
[Server][ERROR] Unhandled message n - null
[Server][ERROR] Unhandled message j - null
[Server][ERROR] Unhandled message i - null
[Server][ERROR] Unhandled message d - null
[Server][ERROR] Unhandled message a - null
[Server][ERROR] Unhandled message j - null
[Server][ERROR] Unhandled message o - null
On connect by Plither help me please

connect?

How do I connect to my server?

Upgrade required [Error]

if i go to localhost:8080 (8080 is the port of the server) the stays Upgrade Required

So how to fix that (or join it)

0.0.11 - Bug with movement

Something must have been done to the movement because now the snake is moving very fast. Think you should change this back to it's original and it should be fine

Address

The Sever Cannot find my IP so the server doesn't launch. Is there A Way to Type In A IP So It Doesn't Have To Do It For You?

Wiki

Slither Wiki

Install:

You have need to download Nodejs Download it Here.

You can get the latest stable release from the releases page. Once you've downloaded it, you are ready to do the following steps:

OS X / Linux:

1. Open a terminal and type cd drag your Slither folder into the Terminal
2. Type npm install in the Terminal

Windows:

1. Open a terminal and type cd drag your Slither folder into the Commnd Prompt
2. Type npm install in Command Prompt

Obviously, if you want to try the latest version, you can clone the master branch but can have bugs because it's a development branch, so don't use it for production.

The server depends on Node.js, npm and other packages that are downloaded and installed during the installation process.

Run:

Execute this command to start the server.

  • cd (slither folder)

  • npm start
    _
    If you want to install a plugin, add it to packageDependencies in the package.json with the respective version.

    Example:

{
"packageDependencies": {
"my-plugin": "0.1.0"
}
}
and run script/install.

Join:

Once you've the Slither loading, you are ready to do the following steps:

1. Open Google Chrome (if you doesn't have Chrome than you install it)
2. Go to slither.io
3. Hit cmd+shift+j
4. Type in the Console this: sos = [{ ip: "localhost", po: 443, ac: 34, ptm: 121 }]
5. Close the Console and Click on Play

Or

1. Open Google Chrome (if you doesn't have Chrome than you install it)
2. Install TamperMonket from Here and click on add to chrome
3. Go to Here and click on Download New Mod
4. Then TamperMonkey shows up and click on install
5. Go to Slither.io and you type your IP and Port in the text box and click on the Little Play button

Now you are ready to press the Play button and if you followed correctly this steps, should appear some logs in your sever window.

Contributors:

You can contribute to the project by cloning, forking or starring it. If you have any bug, open an issue or if you have an interesting thing you want to implement into the official repository, open a pull request.

License:

MIT © Iegor Azuaga

Cannot connect

Ran:

npm install
npm start

Output:

[Application][DEBUG] You are running slither-server 0.0.9
[Application][INFO] Starting the server in dev at port 443...
[Server][INFO] Listening for connections


https://127.0.0.1
or
127.0.0.1:443

Message:

Upgrade Required

Installation fail

[phoenix@PhxMBP slither (master)]$ npm install
\
> [email protected] install /Users/phoenix/mine/tmp/slither/slither/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node

> [email protected] install /Users/phoenix/mine/tmp/slither/slither/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
[email protected] node_modules/object-keys

[email protected] node_modules/semver

[email protected] node_modules/coffee-script

[email protected] node_modules/chalk
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
└── [email protected] ([email protected])

[email protected] node_modules/ws
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

Help with console connection

Just a quick question, what does sos = [{ ip: "localhost", po: 8080, ac: 34, ptm: 121 }] mean? I know the first 2 parts are up and port but what do the last 2 mean?

will yo

1- will you share web files
2- will you add chatbox
3- is it working but without really realesed version

Increase vector Snake direction code

var incX = ((float)Math.Cos((Math.PI / 180) * this.Snake.CurrentAngle));
var incY = ((float)Math.Sin((Math.PI / 180) * this.Snake.CurrentAngle));

That for calculate the good increase vector for snake direction
(You need to convert you angle to radian like this)

From nightwolf93

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.