Has anyone ever "broken" a game by making an excessively long "turn"?

Discussions about BGA (all languages)
Forum rules
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
User avatar
RicardoRix
Posts: 2541
Joined: 29 April 2012, 23:43

Re: Has anyone ever "broken" a game by making an excessively long "turn"?

Post by RicardoRix »

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?
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.

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'] ] );	
	
Arguments to the function:
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.
FrankJones
Posts: 2451
Joined: 30 June 2024, 00:24

Re: Has anyone ever "broken" a game by making an excessively long "turn"?

Post by FrankJones »

Thank you for the information. This occurred while I was experimenting with some unusual things in a hot-seat game, and likely would never happen in a "real" game. I assume the 128k limit is fine in most or all normal circumstances. This is the only time I've ever had that error occur on BGA. If it ever occurs in a standard game, I will definitely alert BGA or the game developer.
Post Reply

Return to “Discussions”