Current limits
Every limit of format 1: package sizes, pieces per scene, script time per frame, interface, sound and saving, each with its key and its value.
DescribesFormato 1, API 1 For those who write code This page is generated from the SDK sources.
On this page
The validator applies these limits to the package and the room applies them while the game runs. A game over a package limit cannot be packaged; one that goes over a room limit while running fails in greengames probar.
Table of limits#
| Limit | Value | Key | Detail |
|---|---|---|---|
.ggx file | 5 MB | paqueteBytes | Maximum size of the .ggx file (compressed), in bytes. |
| Uncompressed package | 20 MB | paqueteDescomprimidoBytes | Maximum size of the uncompressed package (JSON), in bytes. |
| Bundled script | 512 KB | scriptBytes | Maximum size of the bundled script, in bytes. |
| One resource | 2 MB | recursoBytes | Maximum size of one resource, in bytes. |
| Scenes | 16 | escenas | |
| Pieces declared per scene | 2000 | piezasPorEscena | |
| Pieces alive at once | 2500 | piezasVivas | Pieces alive at once (declared plus created by script). |
| Live dynamic pieces | 150 | piezasDinamicas | |
| Zones per scene | 200 | zonasPorEscena | |
| Spawn points per scene | 64 | aparicionesPorEscena | |
| Lights per scene | 8 | lucesPorEscena | |
| Coordinates | from -2000 to 2000 | coordenada | |
| Size of a piece | from 0.05 to 500 | tamanoMinimo, tamanoMaximo | |
| Players | 16 | jugadores | |
| Script time, average per frame | 4 ms (windows of 120 frames; three in a row stop the match) | scriptMsPromedio | Maximum average script milliseconds per frame, measured over windows of 120 frames. |
| Script time in one frame | 100 ms (five times stops the match) | scriptMsCuadro | A single frame cannot spend more than this on scripts, in milliseconds. |
| Unresponsive room | 3 s (the player closes it) | bloqueoMs | With no sign of life from the room for this long, in milliseconds, the player treats it as hung and closes it. |
| Changes emitted in one frame | 600 (after the first frame) | eventosPorCuadro | Replicated changes (pieces, interface, sounds) the room may emit in one frame. |
| Active timers | 500 | temporizadores | |
| HUD items | 16 | hud | HUD items visible per player. |
| Interface text | 240 characters | textoInterfaz | Maximum length of any interface text. |
| Options in a menu | 8 | opcionesMenu | |
| Scoreboard rows | 16 | filasMarcador | |
| Sounds per second | 30 | sonidosPorSegundo | |
| Notes per sequence | 128 | notasPorSecuencia | |
| Saved progress | 64 KB | progresoBytes | Bytes of saved progress per game and player (JSON). |
| Score tables | 8, with 10 entries each | tablasPuntajes, entradasPorTabla | |
| Tags per piece | 16 | etiquetasPorPieza | |
| Bot script steps | 500 | pasosBot | |
| Live actors | 64 | actores | Actors (script characters) alive at once. |
| Labels in the world | 64 | rotulos | Labels and bars in the world, per player. |
| Live zones (declared plus created) | 300 | zonasVivas | |
| Live lights | 8 | lucesVivas | |
| Sprites per game | 128, of up to 64 x 64 pixels and 64 frames | laminas, laminaLado, cuadrosPorLamina | Sprites per package and the maximum size of each one. |
Live pieces with the lamina shape | 400 | piezasLamina | |
| Maps per scene | 8, of up to 8 layers and 512 x 512 cells | mapasPorEscena, capasPorMapa, mapaLado | Tile maps per scene, layers per map and cells per side. |
| Tiles per scene | 200 000 | celdasPorEscena | Occupied (non-empty) cells per scene, adding up every map. |
| Cube terrain: block types, biomes and structures per scene | 200, 24 and 16 | bloquesDeTerreno, biomasDeTerreno, estructurasDeTerreno | |
| Terrain: height of the world and limit on X and Z | 64 blocks; from 64 to 2000 | ||
| Terrain: draw distance | from 2 to 12 chunks of 16 blocks | terrenoDistancia | Maximum draw distance, in chunks. |
| Terrain: changed blocks remembered at a time | 60 000 | terrenoCambios | Blocks changed from the generated world that the room remembers (and saves) at a time. |
Terrain: cells per call to llenar | 4096 | terrenoLlenar | Blocks a single call to terreno.llenar can change. |
| Terrain: saved changes | 320 KB (apart from progress) | terrenoGuardadoBytes | Bytes of the terrain changes saved per game (apart from progresoBytes). |
| Terrain: chunks in memory in the room | 400 | terrenoTrozosSala | Terrain chunks with collision that the room keeps loaded. |
| Hotbar slots | 9 | ranuras | |
Models per game and size of a .glb (1.2) | 64, of 2 MB | modelos, modeloBytes | Models per package and maximum size of a .glb, in bytes. |
| Triangles per model and per scene (adding up every piece with a model) | 20,000 and 150,000 | triangulosPorModelo, triangulosPorEscena | |
| Bones per skeleton, clips per model and length of a clip | 64, 32 and 30 s | huesosPorModelo, clipsPorModelo, clipSegundos | Maximum length of a clip, in seconds. |
| Textures inside a model and maximum side of any image | 8, of 1024 pixels | texturasPorModelo, texturaLado | |
Live pieces with shape modelo | 300 | piezasModelo | |
| Loose textures per game | 64, of 1 MB | texturas, texturaBytes | Loose textures per package and maximum size of each, in bytes. |
| Recorded sounds per game | 32, of 1 MB | sonidos, sonidoBytes | Recorded sounds per package and maximum size of each, in bytes. |
| Models, textures and sounds of a game, in total | 12 MB | binariosBytes | Models, textures and sounds of a package, added up (bytes before encoding). |
| Texts per language | 500 | textosPorIdioma | |
| Skeletons per model | 4 | esqueletosPorModelo | |
| Nodes per model | 256 | nodosPorModelo | |
| Primitives per model | 32 | primitivasPorModelo | |
| Materials per model | 16 | materialesPorModelo | |
| Points of a hull collision | 32 | puntosDeEnvolvente | |
| Minimum side of a model’s box | 0.001 | modeloLadoMinimo | A model’s box cannot measure less than this on its largest side. |
| Credits per game | 200 | creditos |
Seeing them from the CLI#
greengames limites prints each key with its value, in the units of the code: sizes in bytes and times in milliseconds. With --json it writes the whole object.
greengames limites
greengames limites --jsonThe "Key" column is the name of the limit in that output and in LIMITES from @greengames/sdk.
Next#
- The validator and its codes: which error each package limit raises.
- Performance
- API reference