Page 1 of 1

Sandbox : Error with too many game components :(

Posted: 30 May 2018, 23:53
by JesterX
It seems that the sandbox doesn't like having a full deck of card.

Unexpected error: Propagating error from GS 1 (method: createGame): Fatal error during jesterxsandboxtest setup: Error: generated notifications are larger than 128k (416932)

Re: Sandbox : Error with too many game components :(

Posted: 31 May 2018, 22:40
by Victoria_La
Are you sending full deck over single notification?

Re: Sandbox : Error with too many game components :(

Posted: 01 June 2018, 02:10
by JesterX
Can you control the notification content in Sandbox?

Re: Sandbox : Error with too many game components :(

Posted: 03 June 2018, 09:42
by Een
JesterX wrote:Can you control the notification content in Sandbox?
No, I'll need to look into that error. It shouldn't happen: there is way more cards in the example game and it causes no problem...

Re: Sandbox : Error with too many game components :(

Posted: 03 June 2018, 15:54
by JesterX
It might be related with the size/compression rating of my card component. I'll try with smaller component.

By the way, is SVG supported?

Re: Sandbox : Error with too many game components :(

Posted: 03 June 2018, 21:02
by Een
Checked it out, it was actually a problem with your script, you had:

Code: Select all

for (var i=0; i < allCardsId.length; i++) {
        bga.moveTo( allCardsId, deckId );
    }
instead of:

Code: Select all

for (var i=0; i < allCardsId.length; i++) {
        bga.moveTo( allCardsId[i], deckId );
    }
And by the way, this case of shuffling/dealing at start can be managed through classical sandbox objects without scripting by putting the cards in a zone, having 'shuffle on start' property for the zone set to true, then having 'deal on start' set to the appropriate number and 'where to deal' set with the tag of the zone to deal to. Easier :)

Re: Sandbox : Error with too many game components :(

Posted: 03 June 2018, 21:04
by Een
JesterX wrote:By the way, is SVG supported?
SVG is currently not supported.

About images, it would also be best to have all images arranged in a grid pattern in only one image, then uploaded as a collection (CSS sprite technique for better performance).

Re: Sandbox : Error with too many game components :(

Posted: 04 June 2018, 22:12
by JesterX
Een wrote:Checked it out, it was actually a problem with your script, you had:

Code: Select all

for (var i=0; i < allCardsId.length; i++) {
        bga.moveTo( allCardsId, deckId );
    }
instead of:

Code: Select all

for (var i=0; i < allCardsId.length; i++) {
        bga.moveTo( allCardsId[i], deckId );
    }
And by the way, this case of shuffling/dealing at start can be managed through classical sandbox objects without scripting by putting the cards in a zone, having 'shuffle on start' property for the zone set to true, then having 'deal on start' set to the appropriate number and 'where to deal' set with the tag of the zone to deal to. Easier :)
Thanks a lot for your help. Indeed, I see my problem now.

Wow, the zone component does a lot of nice stuff!!!! Thanks for the tip.