Haxe Client and Server on v0.10
Using the externs by Serjek I was able to create a very Simple Colyseus Server with a StateHandler Room that handles string data. The data is send to the clients and everything works as it supposed to.
But only for HTML5 !!!
I again have lots of problems to get it to work on anything else than HTML5.
Here are the (non-stencyl) HaxeToolkit steps that I made:
set HAXE_PATH=c:\HaxeToolkit\haxe
set NEKOPATH=c:\HaxeToolkit\neko
set PATH=%HAXE_PATH%;%NEKOPATH%;%PATH%
haxelib setup c:\HaxeToolkit\haxe\lib
haxelib --global update haxelib
haxelib is up to date
haxelib install openfl
8.9.1
haxelib run openfl setup
7.5.0
haxelib run lime setup
Up to Date
Get GIT from :
https://git-scm.com/download/win
git clone https://github.com/colyseus/colyseus-hx.git
cd \HaxeToolkit\colyseus-hx\example\openfl\Source
notepad Main.hx
Edit: the ws connection so that it points to the docker server
Also Edit the this.client.join line on number 55:
//this.room = this.client.join("state_handler", [], State);
this.room = this.client.join("state_handler", new Map<String,Dynamic>(), State);
Build the project:
cd \HaxeToolkit\colyseus-hx\example\openfl
haxelib install haxe-ws
haxelib set hxcpp 3.2.94
(installing)
lime build project.xml html5
lime test html5
It works like a charm with the Serjek externs in the Colyseus Docker .
But Android and Windows give again connection problems:
cd \HaxeToolkit\colyseus-hx\example\openfl
haxelib set hxcpp 4.0.8
lime build windows
lime test windows
The connection is attempted but not made:
- src/lime/utils/AssetCache.cpp [haxe,release]
Link: ApplicationMain.exe
Creating library ApplicationMain.lib and object ApplicationMain.exp
Main.hx:48: CLIENT CLOSE
Connection.hx:66: WebSocket connection has been closed, stopping the thread!
Main.hx:29: ERROR! timeout
(I've tried the alterations on the haxe-ws library that I made for the 0.9 but they didn't solved it now)
I am very curious if anyone got a different target to run with haxe other than HTML5 ??!??