Skip to content

Repository files navigation



Multiplayer Game Client for Haxe
View documentation

Running the demo project

First, download and install Haxe.

The example project can be compiled to html5, neko, cpp, ios, etc.

Compiling the demo project to html5

git clone https://github.com/colyseus/colyseus-haxe.git
cd colyseus-haxe/example/openfl
haxelib install openfl
haxelib install lime
haxelib install tink_http
haxelib install tink_await
haxelib install swf
haxelib install colyseus-websocket
haxelib run lime test project.xml html5

Running the server

The demo project uses the SDK Test Server. You can start the server by running the following commands:

git clone https://github.com/colyseus/sdks-test-server
cd sdks-test-server
npm install
npm start

Development

Running the test-suite:

haxe hxml/test.js.hxml

Troubleshooting

Error#500: Chunked encoding is not supported and the content-length header is required.

On native targets (C++, HashLink, Neko), the released tink_http (0.10.0) can't read chunked HTTP responses, and Colyseus sends failed matchmaking requests chunked. So a failed join reports this 500 instead of the server's error code and message. tink_http has fixed this, but the fix isn't on haxelib yet. Until it is, install tink_http from git:

haxelib git tink_http https://github.com/haxetink/tink_http 8b2c13f73564129f406d57c7507bcef4e6743ba4

Your own HTTP routes avoid it by sending a Content-Length header.

Dependencies

colyseus-haxe depends on colyseus-websocket

License

MIT

Releases

Packages

Used by

Contributors

Languages