Nyancat Server Code

5 Jan 2019, 11:58

Steps to perform Installation Colyseus on Oracle Linux 7.6

wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz
gzip -d node-v0.10.30.tar.gz
tar xvf node-v0.10.30.tar
cd node-v0.10.30/
yum install gcc gcc-c++
./configure
make
make install

npm cache clean -f
npm install -g n
n stable
node -v

curl -L https://npmjs.org/install.sh | sh

Install browserify:
npm install browserify -g

TypeScript:
npm install typescript -g

Git install:
yum install git

Colyseus Examples:

git clone https://github.com/gamestdio/colyseus-examples.git
cd colyseus-examples
npm install
npm run bundle-colyseus-client
npm install
npm start

Go with your browser to http://server:2567

I needed to change he port in index.ts because my firewall permits other port

Now I want to run the servercode for the Nyancat demo: [https://github.com/colyseus/colyseus-hx/tree/master/example/NyanCat](NyanCat Example)
Currently the live demo works with ws://colyseus-examples.herokuapp.com

Is there a location where I can find the Nyancat Server Code to run the example to my own server?!?

6 Jan 2019, 11:34

Hi @mdotedot, welcome!

As stated in the README of colyseus-hx project:

It uses the state_handler room from the colyseus-examples project, which you can find here.

Hope this helps. Cheers

6 Jan 2019, 12:29

Ahh ! Excellent!
Sorry, I'm a bit new to the colyseus stuff and NodeJS/TypeScript.

When I changed the ws:// to my server IP address like : ws://192.168.2.121:2567
it 'magically' works.

So I've now running HTML5 and Windows to the same server. Nice!

I'm going to build Android/iOS and Linux as well to see how it goes.

Thanks!

6 Jan 2019, 18:37

Awesome, feel free to share what you are doing here on the forums or the Discord chat! Not many people are using the Haxe client yet! Good luck with your project!