Creating a game server with matchmaking

73 views
Skip to first unread message

Sulp Sulpc

unread,
Mar 22, 2020, 3:01:13 PM3/22/20
to kryonet-users
Hello people,

im trying to program an online game. Each game consists of a "gamelobby" with up to 4 players.
While playing the players need to update their positions and receive the position of the other players.

My concern now is that its not performant to update the positions each frame via the "received" method
because the same method is used for other incoming players to login (for matchmaking).

Is there an appropriate way to do this? 

Joachim Durchholz

unread,
Mar 22, 2020, 3:19:16 PM3/22/20
to kryone...@googlegroups.com
Am 22.03.20 um 20:01 schrieb Sulp Sulpc:
If you are concerned about performance, just don't update positions when
a lobby message arrives.

However, you should probably also think about splitting your code into
three modules: lobby, running game, and common code (the latter would
include one or two Kryonet channels).

Now that's going awfully off topic of this list, which is about Kryonet
itself, not about software design. Kryonet is just a part of the
foundation, you're asking whether one should have one or two front
gates... it is just the wrong audience.
There's plenty of advice about networked game programming to be found
via any search engine.
Good luck.

Regards,
JO

Sulp Sulpc

unread,
Mar 22, 2020, 5:38:42 PM3/22/20
to kryonet-users
"If you are concerned about performance, just don't update positions when
a lobby message arrives."

Yes but that would be fatal for an online game. Imagine the server needs to pause the game just because
someone wants to log in. 
I just need to know how i can run many connections concurrently.

Joachim Durchholz

unread,
Mar 23, 2020, 8:06:40 AM3/23/20
to kryone...@googlegroups.com
Again: This is not the right forum for topics of game server organisation.

Am 22.03.20 um 22:38 schrieb Sulp Sulpc:
> --
> You received this message because you are subscribed to the
> "kryonet-users" group.
> http://groups.google.com/group/kryonet-users
> ---
> You received this message because you are subscribed to the Google
> Groups "kryonet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to kryonet-user...@googlegroups.com
> <mailto:kryonet-user...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kryonet-users/e4cd084f-eacd-458c-a35b-5bd76c39ecc2%40googlegroups.com
> <https://groups.google.com/d/msgid/kryonet-users/e4cd084f-eacd-458c-a35b-5bd76c39ecc2%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages