Custom levels in Lil Yappy are represented by a JSON string:
{
// Required list of "spawnable chunks"
items: [
{ type: 'chunk', data: {...} },
{ type: 'preset', data: {...} },
...
],
// Optional level settings
opts: { ... }
}
Enter a level’s JSON in the Custom Mode window to play:

Items #
List containing chunk
and preset
items that are spawned in the order that they are defined in the list. After the final item in item N crosses the spawn point, the next item N+1 is spawned immediately after such that consecutive items appear seemless. This allows us to construct long levels without spawning all items at once.
Chunk #
Represents a group of Spawnable Objects. This is used to manually place individual objects (ie coins, bombs, etc) at specific grid points.
A chunk’s data field is a map whose keys are GridX values, and values are arrays of Spawnable Objects. Each entry in the chunk’s data map represents a single column of objects spawned at a particular X coordinate.
Preset #
Creates one of the predefined preset group of objects without having to manually place each object. For example, to spawn a long “coin wave”, we wouldn’t want to manually calculate the appropriate position for each coin – instead, we can use the “coin wave” preset with some configuration to define how tall and wide the wave should be, and the the game will take care of the rest.
Level options #
A map of optional level settings to change things like the game speed, max lives, and more.