Colyseus Extension [Public Beta]

mdotedot

  • Posts: 1654
Colyseus Multiplayer Extension

Extension/Documentation/Examples: http://photoquesting.com/repo/html/Colyseus.php

Should work on Stencyl 4.x, but confirmed on 4.0.3 (Build 10561)

Confirmed publication to:
  • HTML5
  • Windows
  • Android
Should work:
  • Mac OSX
  • iOS
  • Linux

Will not work on Flash !


Examples


RAW Room Types:
RawRace

RawMove

Turn Based Types:
TicTacToe

HighCard

SetActive Player
Lock Room type:
Lock
Client As A Server (CaaS):
Pong

Physics

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • Posts: 1654
More examples.


Template for online fighter/shooter


RPG :


The RPG works with the lock-based system. It has consumable inventory objects. And objects that are 'private' to your game session. So the key for example can be taken by everyone, the loot from the chest by just one player.


Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

LIBERADO

  • *
  • Posts: 2720
As always, excellent contribution.

Thank you very much, mdotedot.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

mdotedot

  • Posts: 1654
Thank you LIBERADO for the nice words.

Currently working on Endless Runner where you have to click on obstacles to keep going. You see other players transparent to get a feeling of how well you are doing.


And I'm planning more physics/collision based example games.

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • Posts: 1654
Finished the example on Endless runner:


The demo can be played and downloaded from here: http://photoquesting.com/colyseus
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

catinas

  • Posts: 57
this is awesome i want to host server from my computer... if ill get in truble whould you help me

mdotedot

  • Posts: 1654
Hosting server from your computer can be done.
But you have to be able to adjust your router you got from your service provider to redirect ports to your computer.
This depends on the provider and the brand of the router,  so I'm not able to help you much with that.
You should have enough networking experience to make that adjustment.
If you are able and capable of port forward from your router to your computer, then you should start with this:
http://photoquesting.com/colyseus/Colyseus_Server.pdf
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

rodolfovs

  • *
  • Posts: 183
Very interesting! I will install the extension and start testing! Thanks!

Chris24XD

  • Posts: 48
So it's a <<multiplayer extension>> like. Nice!!!

squeeb

  • Posts: 1617
Wow!  About to get back into stencyl... ... again.  Ill have to try this out!

FMStudioGameDev

  • *
  • Posts: 233
This looks pretty interesting but probably needs to be updated to work for most recent Stencyl builds (4.1.0).
It's throwing the following error:
Code: [Select]
2022-05-30 11:23:46,323 ERROR [StreamGobbler::haxelib] stencyl.sw.util.StreamGobbler: [haxelib] /Users/mcmalela/stencylworks/engine-extensions/Colyseus/io/colyseus/Room.hx:110: lines 110-113 : In method get_state required by property state
2022-05-30 11:23:46,323 ERROR [StreamGobbler::haxelib] stencyl.sw.util.StreamGobbler: [haxelib] /Users/mcmalela/stencylworks/engine-extensions/Colyseus/io/colyseus/Room.hx:110: lines 110-113 : ... error: LobbyState should be io.colyseus.Room.T
2022-05-30 11:23:46,323 ERROR [StreamGobbler::haxelib] stencyl.sw.util.StreamGobbler: [haxelib] /Users/mcmalela/stencylworks/engine-extensions/Colyseus/io/colyseus/Room.hx:110: lines 110-113 : ... have: (...) -> LobbyState
2022-05-30 11:23:46,323 ERROR [StreamGobbler::haxelib] stencyl.sw.util.StreamGobbler: [haxelib] /Users/mcmalela/stencylworks/engine-extensions/Colyseus/io/colyseus/Room.hx:110: lines 110-113 : ... want: (...) -> io.colyseus.Room.T
Any idea on how to fix?

mdotedot

  • Posts: 1654
1. my focus isn't that much on Stencyl lately
2. I don't have a subscription anymore so I can't download latest stencyl.
3. propably the HaXe version has changed that causes errors
4. The errors are coming from the haxe code from Colyseus. Maybe you can copy the 'new' versions over: https://github.com/colyseus/colyseus-haxe/tree/master/src/io/colyseus
But the github hasn't been changed the last 14 months .. so you might need to reach out to the colyseus people.

If the errors are coming from the 'main' directory like  in the files StencylRoom for instance, then it is 'my' code and then I would need the latest version to test and again that will not be possible..

Hope you can find a solution.

Regards
M.E.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

FMStudioGameDev

  • *
  • Posts: 233
Thanks a lot for you reply.
I tried to copy the new files onto the old ones with the only result of getting more errors. Guess it needs a bigger effort.
Sent you a PM