B4J Question Room Server using Websocket

Waldemar Lima

Well-Known Member
Licensed User
Hi everyone, I'm creating a multiplayer "turns" style game, each room has the ability to carry only 4 players, I'm having a lot of trouble creating an effective algorithm in b4j - Jserver.

Can anyone give me a light and a path to follow? I would like to create each room, each room with its own timer to monitor the events made by the players... one way would be to use Thread, but no one has faith in that...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
one way would be to use Thread,
There is no relation with "Thread" and the task that you are trying to solve.

Each connection is manged in its own class instance. You need to collect the instances. It is demonstrated in the chat example.
You can use a background worker that manages the rooms.
 
Upvote 0
Top