Re: Has anyone ever "broken" a game by making an excessively long "turn"?
Posted: 24 April 2026, 09:28
Yes 'Notifications' is the term used by BGA when the server sends data to the client after each move. Any client request should end with a notification back from the server.FrankJones wrote: ↑24 April 2026, 01:19 Unexpected error: Error: generated notifications are larger than 128k (137234) (reference: GS1 24/04 02:10:06)
Any idea what that means?
Here is an example of one (server side makes the notif):
Code: Select all
// selecting region COLOUR to start with..
$this->game->notifyAllPlayers('playerColour', clienttranslate('${player_name} selects starting continent ${continent_colour}'), [
'continent_colour' => $colour,
'player_id' => $player_id,
'player_name' => $this->game->getPlayerNameById($player_id),
'i18n' => ['continent_colour'] ] );
1.
the 1st argument is the notification 'name', an associated client function will automatically be called, here the client can respond accordingly to the data being sent.
2.
the log message is the 2nd argument. wrapped in a clienttranslate function, for translation.
3.
The data is the 3rd argument which is an associated array of potentially any size. [HERE is where the oversize is causing the error]
So the fault sits somewhere between BGA framework and the game dev. Strictly speaking it's not the game devs fault, I don't think this is documented anywhere.
I would suggest, if possible the game dev breaks down the notification into several smaller notifications. Probably using a loop.
That might be harder than it sounds, but hopefully it should be ok.
I think it's unlikely BGA framework will budge from their fixed 128k position, although they might. Ideally making a free size limit rather than fixed size.