The Browser Game Interpreter (BGI) is a JavaScript implementation of Video Game Description Language (VGDL): a compact notation where a few dozen lines fully specify a playable game -- its sprites, physics, interactions, and termination conditions. The description and map layout above are parsed and executed entirely in the browser.
The interpreter supports live editing. Open the Game Description flap and add
a new collectible sprite (copy an existing wall line, change its name and
color, then add a killSprite interaction so the avatar collects it).
Or open the Level Layout flap and place a second avatar character alongside
the first. Press Enter or click Create New Env to rebuild the
environment from your edits immediately.
Defines every object type in the game. Format: name > Type parameters
Avatar types (player-controlled):
MovingAvatar: can move in four directionsShootAvatar: MovingAvatar that can also fire projectiles (stype=projectile_name) with space barFlakAvatar: can only move sideways, always shoots upwardObject types:
Immovable: static object, cannot movePassive: can be pushed by the avatar (via bounceForward interaction)Resource / ResourcePack: collectible objectsFlicker: appears temporarily, disappears after a set number of steps (total=N)SpawnPoint: periodically creates new objects (stype=what_it_spawns, prob=spawn_chance)Missile: moves in one fixed direction at a set speedBomber: missile + spawner combinedChaser: moves toward the nearest target object (stype=target)RandomNPC: moves in random directionsPortal: teleports objects that touch it to an exit locationThe img=colors/COLORNAME parameter sets the object's visible color. All objects of the same color follow the same rules.
Maps single characters to sprites for level layout. Format: char > sprite1 sprite2 ...
Multiple sprites on one character means they overlap (e.g., w > floor wall places a wall on top of floor).
Defines collision rules. Format: spriteA spriteB > effect parameters
When spriteA and spriteB collide, the effect is applied TO spriteA (the first sprite).
Effects:
killSprite: destroys spriteAstepBack: spriteA is pushed back (blocked)bounceForward: spriteA is pushed in the direction spriteB was movingtransformTo stype=X: spriteA transforms into object type XchangeScore scoreChange=N: awards N points on collisionchangeResource resource=R value=N: modifies avatar's resource RkillIfOtherHasMore resource=R limit=N: kills spriteA only if spriteB has more than N of resource RkillIfHasLess resource=R limit=N: kills spriteA if it has less than N of resource RteleportTo stype=X: teleports spriteA to the location of an X objectturnAround / reverseDirection: reverses missile directionundoAll: reverts spriteA's position to where it was before this tickMultiple effects can apply to the same collision. EOS (End of Screen) interactions handle objects leaving the game boundaries.
Defines win/lose conditions. Format: ConditionType parameters win=True/False
SpriteCounter stype=X limit=0 win=True: game is won when all X objects are goneSpriteCounter stype=X limit=0 win=False: game is lost when all X objects are goneMultiSpriteCounter stype1=X stype2=Y limit=0 win=True: won when all X and Y are goneTimeout limit=N win=False: lost if N steps pass without winningSurvive limit=N win=True: won if avatar survives N steps