Page 1 of 1
Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 05:25
by Idsky
Can games that *require* realtime play with multiple active players be implemented on BGA?
A designer just asked me about implementing a game where all players play simultaneously, whoever finishes placing their tiles first stops the game, and then scores are tallied (first finisher doesn't always get the highest score).
Turnbased just would not work. One player would easily win while the others were offline. So is a game like this not allowable, or is it allowable with a big "Don't play this turn-based!" warning? I'm sure there are lots of games like this, I can think of a few. Perhaps BGA don't want games like this with fast realtime clicking? The wait for the server to process each tile placement may be too painful.
Even for realtime play I suspect the BGA server latency may vary a bit round the world and a player with laggy internet could unfairly be delayed and miss out on placing tile(s) before another player ends the game.
Is there an official answer on this? I haven't come across any docs about it.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 05:32
by JonChambers
Moving past allowable, it's literally impossible.
Every example you can think of with a video game achieving this is actually fake.
So you can shoot someone in real time? Fake. You shot them on your computer and a message was sent to their computer a few seconds later that told them they had been shot. This is why you can still get hit just after ducking for cover.
Wormate.io gets past this by only having your body, not your head, kill people. This is because on their computer, your body is in the same place, but your head is further back, so there's no disconnect due to time differences.
But there is no "first player to..." on the internet, because it is literally impossible. It's always fake.
Edit: On reading again, you already mentioned the laggy thing. So you probably knew this already. Still, it took me a while to write, so I'm leaving it up.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 05:53
by Idsky
JonChambers wrote: ↑11 July 2021, 05:32
But there is no "first player to..." on the internet, because it is literally impossible. It's always fake.
I don't know what the worldwide BGA server infrastructure is like (not as good as most MMORPGs) but I know that even if it was the best imaginable, latency is a problem if you're playing realtime with players at opposite ends of the earth.
Faking it is easier for this kind of board game that for FPS video games. I think BGA may kinda work okay, just with a slight disadvantage for players on a laggy connection (perhaps far away from BGA server).
At end-of-game in an ideal world the server might listen for any late tile-placements for a second or two and check time-synchronisation to see if they in fact were clicked before the game-ending action and therefore allow them to be placed. But this end-of-game issue is probably more minor than the response wait time for each placement making a limit to how fast a player can play the game, which may differ significantly between players.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 07:37
by Tisaac
Real time only game are perefectly fine on BGA.
Real time are also possible, but I think I saw it only on coop game so far (concept, magic maze).
If players were not cheaters, you could indeed resync movr by sending the time between reveiving the args and sending an action but since that's js, that's not safe.
I guess there might be some discrepancy but that could be ok, since the first one to finish does not necessarily win, so allowing couple extra seconds could be enough.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 10:41
by Idsky
Tisaac wrote: ↑11 July 2021, 07:37
Real time only game are perefectly fine on BGA.
So what is the recommended way to stop or at least strongly discourage people from playing it turn-based?
Tisaac wrote: ↑11 July 2021, 07:37
I guess there might be some discrepancy but that could be ok, since the first one to finish does not necessarily win, so allowing couple extra seconds could be enough.
How could that 2s extra time be implemented / triggered? AFAIK there's no way to schedule a server event in 2s time. Have javascript on all clients ping the server 2s after the 'end of game' notification? It may be okay to not worry about the latency issue.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 11 July 2021, 20:11
by Tisaac
Idsky wrote: ↑11 July 2021, 10:41
Tisaac wrote: ↑11 July 2021, 07:37
Real time only game are perefectly fine on BGA.
So what is the recommended way to stop or at least strongly discourage people from playing it turn-based?
You can ask admins to disable TB mode for your game.
I would send a first notification to the player that is done that would then trigger another action 2s later to say to the server "stop now".
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 12 July 2021, 02:07
by Idsky
Tisaac wrote: ↑11 July 2021, 20:11
You can ask admins to disable TB mode for your game.
Ah, I didn't know that, thanks. I was looking for a setting for this!
The in-game latency delay causing slow play problem can be eliminated. I am used to having
lock: true on the ajax call to wait for server confirmation of every action, but without locking, the client can check the move and send multiple moves before the acknowledgements from the server come back. Of course the server would check the move as well and it would be messy to clean up the situation in javascript if you lost server connection or the server refused a move for some reason but I think it'd work well most of the time.
Tisaac wrote: ↑11 July 2021, 20:11
I would send a first notification to the player that is done that would then trigger another action 2s later to say to the server "stop now".
Could do, but then a cheater could send that "stop now" message early, that's why I suggested all clients doing it (server could ignore all but the first one that fired at the correct time).
But then a cheat might put their system clock back two seconds (with automated code, not manually) during the game to give themselves more play time if the server was using relative timestamps to check that tiles were placed before the end of game (it would just look like their last tile placement took a while to reach the server). Is there any way to prevent that? I'm curious from a technical point of view. If a hacker put in the effort they could write a bot to play the game very fast -- even if it wasn't super skilled it would win if the other players were only able to play a couple tiles before game end.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 12 July 2021, 08:17
by Tisaac
Honestly if a player want to hack, he can just write a script that will play all the tiles automatically instead of juste trying to cheat this 2s delay. At some point you have to stop taking that too much into account.
Sending a message to everyone could be the enough of protection already.
Re: Are games that require realtime multipleactiveplayer allowed?
Posted: 13 July 2021, 10:07
by JonChambers
Idsky wrote: ↑12 July 2021, 02:07
But then a cheat might put their system clock back two seconds (with automated code, not manually) during the game to give themselves more play time if the server was using relative timestamps to check that tiles were placed before the end of game (it would just look like their last tile placement took a while to reach the server). Is there any way to prevent that? I'm curious from a technical point of view. If a hacker put in the effort they could write a bot to play the game very fast -- even if it wasn't super skilled it would win if the other players were only able to play a couple tiles before game end.
Never ask the client for cheatable information, ever.
It doesn't matter when it was sent. Whoever's message was received first wins. Yes, it disadvantages people with a laggy connection, but that's life.
It may seem like video games have a better solution than this, but they don't. The trick is they are built from the ground up to hide the fact that the problem exists.
So, don't show any timers. Don't show any time.
If I were developing this game, I'd animate a bell, but give it a long wind up action. One that seems typical of server response times, give or take.
So if you hit the bell, it will wind up and then ring. But if you receive notification that someone else has completed, their bell would ring instantly.
There will be a few edge cases when the order the bells ring and the order the players finish are different, but if all the bells sound identical, no one will notice.
One trick is to err on the side of making the wind up too long rather than too short. If I hit the bell, there's a long wind up, someone else's bell rings first, but I still win, I won't complain.
Or, even better:
The wind up animates but doesn't strike until the server has confirmed that I have won. If someone else submits before me, play the wind up animation in reverse to show the bell sort of deflate. Only the winner gets a ding.