The past days I've worked on the Colyseus v0.10 framework and the Haxe externs from Serjek. As well as creating a docker that will run the server and will be supplied to the Stencyl Users so they can run the server on their own.
Since Endel has provided a haxe-ws fork ( https://github.com/colyseus/haxe-ws ) the system is really stable.
I've started with the core room-types:
Lobby is where all players are signed in automatically. The playernames are stored and can be used in other rooms.
Raw Room is for games that don't need server logic. Think of games that are split screen and don't interact with eachother.
Turn Room is for turnbased games.
Lock system is where the server has a lock on coordinates/areas/objects and you request a lock to alter the data. Think of RPGs, puzzle games
In the future I want to have a Box2D Server collision interaction, but that will propably take a long time to figure out.
Currently a proof-of-concept has been made for the raw-room type. For the others I need to create more Stencyl blocks like request/release lock and turn (seat/next turn)
Here is the current Stencyl palette layout:
I've used client.getAvailableRooms
for (room in rooms) {
if(room.metadata.ApplicationID == ""+colyseus.ApplicationID){
roomIDs.push(""+room.roomId);
roomNames.set(""+room.roomId,""+room.metadata.RoomName);
}
}
I wonder if there can be a filter for things like this so that I don't get all the rooms and filter the applicationID out 'manually'
At least it works, but I don't know if it slows down when there are a lot of games running on the server?
Then again, I don't think that many stencyl-developers will run a server with different type of games.