GAMINODE Docs
Docs / Reference

Parts reference

Gaminode AI never writes a game freehand. It picks a game type and fills a few blanks, and the engine builds the game from tested parts. Every thing in your game (the player, an enemy, a coin) is an entity with a list of parts: jump makes it jump, health gives it hit points, shoot makes it fire.

Open any entity in game/entities/ and select it: its parts are child nodes, and every setting below is in the Inspector. Change a number, press F5 and see the result. Your hand edits are kept when you change the game in chat.

This page is made from the code. When a part gets a new setting, the page is rebuilt from the same files the engine runs, so it never falls behind.

Moving

Parts that move a thing: by your keys or touch, by itself, or after a target.

input_move

Player control. mode: topdown (8 dirs), side (left/right, use with gravity+jump), x (only left/right, e.g. shooter/catcher), y (only up/down), lanes (3 lanes), drag (follow finger), none.

SettingDefaultWhat it does
modetopdownone of: topdown, side, x, y, lanes, drag, none.
speed220.0 
accel14.0 

gravity

Pulls the entity down. g = -1 uses the world gravity.

SettingDefaultWhat it does
g-1.0 
max_fall1200.0 

jump

Jump / flap. air = extra jumps in the air, -1 = unlimited (flappy). Players jump on input; others jump when a timer part says "jump".

SettingDefaultWhat it does
force560.0 
air0 
variabletruerelease early = smaller jump

auto_move

Keeps moving one way. dir: right left up down random (or diagonals like down_left).

SettingDefaultWhat it does
dirright 
speed150.0 

chase

Runs after the nearest target. target: player (default) or an entity name. range (reach) > 0: only chases when the target is that close.

SettingDefaultWhat it does
targetplayer 
speed110.0 
reach0.0 

patrol

Walks back and forth around its start. Turns at walls and (with gravity) at ledge edges.

SettingDefaultWhat it does
speed80.0 
dist160.0 
axisxone of: x, y.

zigzag

Adds a side-to-side wobble on top of whatever else moves the entity.

SettingDefaultWhat it does
amp80.0 
freq1.5 

bounce

Flies at a steady speed and bounces off walls and the world edges.

SettingDefaultWhat it does
speed220.0 
floor_bouncetruefalse = falls out of the bottom (breakout ball)

orbit

Circles around a named entity, or around its own start point.

SettingDefaultWhat it does
around 
radius80.0 
speed2.0 

follow_path

Walks along the world path (layout "path"). At the end it escapes (counts for the "escaped" lose rule) and disappears.

SettingDefaultWhat it does
speed100.0 

Health and damage

Hit points, hurting, getting hurt and stomping.

shoot

Fires projectiles. dir: up down left right facing aim auto. auto = at the nearest enemy (or player, for enemies). fire: auto (by itself) or key (X / J).

SettingDefaultWhat it does
dirautoone of: up, down, left, right, facing, aim, auto.
rate0.4 
speed520.0 
dmg1.0 
fireautoone of: auto, key.
spread1 
reach650.0 
coloryellow 

health

Hit points. points = score the player gets for the kill. bar = show a bar above it.

SettingDefaultWhat it does
hp1.0 
points1 
iframes-1.0-1 = auto (player 0.8 s, others 0.05 s)
barfalse 

damage_on_touch

Hurts what it touches. hurts: opposite (other team) player enemy any.

SettingDefaultWhat it does
n1.0 
hurtsoppositeone of: opposite, player, enemy, any.

knockback

Gets pushed away when hit.

SettingDefaultWhat it does
force320.0 

invincible_after_hit

After a hit: safe for a while and blinking.

SettingDefaultWhat it does
time1.2 

stomp

Jump on top of it to defeat it (and bounce up).

SettingDefaultWhat it does
bounce420.0 

Touching things

What happens when two things touch.

collect

Picked up by the player. gives: score heal key life speed shield.

SettingDefaultWhat it does
givesscoreone of: score, heal, key, life, speed, shield, power.
n1.0 

destroy_on_touch

Disappears when it touches something. what: opposite player enemy any. solid = also when it hits a wall/ground.

SettingDefaultWhat it does
whatoppositeone of: opposite, player, enemy, any.
solidtrue 

push

The player can push it (crates). Use on a wall entity.

SettingDefaultWhat it does
speed140.0 

teleport

Portal: the player is moved to the entity named "to".

SettingDefaultWhat it does
to 

open_door

A door that opens when the player has the keys. keys = 0 means all keys in the level.

SettingDefaultWhat it does
keys0 

Spawning and time

Making new things, timers and waves of enemies.

spawn

Makes new copies of entity "what" every few seconds. where: top bottom left right edges random ahead self lanes ground n = how many each time, max = most alive at once, total = stop after this many (0 = never) gap > 0 = spawn a top+bottom pair with a hole this big (flappy pipes) speed_up = each spawn comes this much sooner (0.03 = 3 %)

SettingDefaultWhat it does
what 
every1.5 
where 
n1 
max_alive25 
total0 
gap0.0 
speed_up0.0 
speed160.0used only if the spawned thing has no movement of its own
yground air mid random (side view)
first0.6 

timer

Every few seconds does something: jump shoot flip spawn die score.

SettingDefaultWhat it does
every2.0 
actionjump 

lifetime

Disappears after "time" seconds (blinks at the end).

SettingDefaultWhat it does
time3.0 

waves

Attacks in waves: wave k has batch + grow*(k-1) copies of "what". A wave is cleared when all of its copies are gone. Counts for the "waves" win rule.

SettingDefaultWhat it does
what 
n5 
batch3 
grow2 
gap2.0 
every0.45 
where 
speed160.0 

Game feel (juice)

Shake, particles, sounds and squash. They change how a game feels, not its rules.

screen_shake

Shakes the camera on events. on: comma list of jump land hit death collect shoot

SettingDefaultWhat it does
onhit,death 
amt7.0 

particles

A burst of little bits on events. on: comma list of hit death collect jump land shoot

SettingDefaultWhat it does
ondeath 
color 

sfx

Plays a sound on events. on: comma list of jump hit death collect shoot land

SettingDefaultWhat it does
onjump,hit,collect,shoot,death 

squash_stretch

Cartoon squash on jump / land / hit.

SettingDefaultWhat it does
amount1.0 

Bounds, aim and camera

Keeping things on screen, aiming and the camera.

stay_in_bounds

Keeps the entity inside the world (side view: only left/right, so pits still work).

No settings.

wrap

Leaves one side of the world, comes back on the other.

No settings.

aim

Turns its look toward the target (player by default) - for turrets and eyes.

SettingDefaultWhat it does
targetplayer 

camera

The camera follows this entity (instead of the first player).

No settings.

pattern

Plays the level's hand-made patterns (chunks.json) for timeline archetypes: rows (shooter / catch / lanes): each row = one line of things coming down, one char per column gaps (flappy): one pipe pair per entry, gap centre row 0..8 bursts (dodge): enemies appear in a shape (edges, ring, line_top, line_left, corners) Characters map to entities through world.char_map (e, f, c, b, m, o, s ...). After the last pattern it starts again a bit faster, so "survive N s" games never run dry.

SettingDefaultWhat it does
speed160.0 
loop_faster0.12 

Close combat

Sword and fist fighting: attacks, dash, block and boss moves.

melee

Close combat (combat games): a light attack (J / Space / Attack button) and a heavy one (K / Heavy button) that hit every enemy in an arc in front of the player. Heavy = more damage, wider reach, bigger push, longer wait. Aims at the nearest enemy close by (so taps on a phone always connect), else the way the player moves.

SettingDefaultWhat it does
dmg1.0 
heavy_dmg3.0 
reach95.0 
heavy_reach140.0 
cd0.28 
heavy_cd0.85 

dash

Dodge (combat games): L / Shift / Dodge button - a quick dash the way you move (or the way you face), and you can't be hurt during it. Then a short wait before the next one.

SettingDefaultWhat it does
speed980.0 
time0.18 
cd0.75 

charge

A brute that warns, then charges (combat games): walks closer slowly, stops and glows red for `windup` seconds (your cue to dodge), then rushes at the spot where you were, then rests. Dodge it or get hit hard.

SettingDefaultWhat it does
speed70.0 
rush640.0 
reach280.0 
windup0.65 
rush_time0.5 
rest0.9 

lunge

A fighter that warns before it strikes (combat games): walks up to you, stops close by and flashes orange for `windup` seconds (your cue: hit it first or dodge), then lunges a short way at you, then backs off a moment.

SettingDefaultWhat it does
speed120.0 
reach80.0 
windup0.38 
lunge520.0 
lunge_time0.16 
rest0.7 

block

Block and parry (combat games): hold I / Ctrl / BLK. While blocking you move slowly and hits from the front do no harm (they push the attacker back). Start the block just before a hit lands (within `parry_window`) and it's a PARRY: the attacker is stunned for a long moment - the best time for a combo.

SettingDefaultWhat it does
parry_window0.2 
slow0.4 

boss_moves

A boss that fights in patterns (combat boss fights): it walks after you and every few seconds picks a move - slam stops, glows, then a shockwave ring around it (get out of the ring or dodge) charge glows red, then rushes at you spray a ring of shots in every direction summon two helpers come in from the edges Under half health it gets angry: shorter breaks, faster moves, and the ring of shots comes twice.

SettingDefaultWhat it does
speed70.0 
helper 
dmg2.0 

Game-type parts

One part per special game type. Each runs the whole game type by itself.

stacker

Stack game: a block slides from side to side above the tower; a tap (jump / Space / click) drops it. The part that hangs over the block below is cut off and falls; a near-perfect drop keeps the full width ("PERFECT!", 3 in a row = the block grows back a little). Missing the tower ends the game. The entity itself is only the camera anchor (it is hidden); the tower is drawn under the world (WorldTower). Score = blocks placed (the HUD), so "score 20" = a tower of 20 blocks. Harder every block and every level.

SettingDefaultWhat it does
block_h34.0 
width280.0 
speed240.0px/s at the first block
perfect7.0px: closer than this to the block below = PERFECT

auto_jump

Climber (Doodle Jump style): bounces up by itself every time it lands. Move left / right to land on the next platform.

SettingDefaultWhat it does
force760.0 

snake

Snake: the head moves one grid cell at a time in the last direction pressed; eating (any pickup) makes the snake longer and a little faster; hitting the wall, a rock or its own body ends the game. New food appears when the last one is eaten (the food is the game's pickup, `food` = its name). The body is drawn under the world (SnakeBody).

SettingDefaultWhat it does
cell32.0 
step0.15seconds per cell at the start (faster with every bite and every level)
foodapple 
start_len4 

pong_ball

Pong: the ball bounces off the top and bottom and off both paddles (the player's on the left, the computer's on the right, parts/pong_cpu.gd). Past the computer = a point for you ("GOAL!"); past you = you lose a life. Faster every hit.

SettingDefaultWhat it does
speed380.0 
max_speed900.0 

pong_cpu

Pong: the computer's paddle follows the ball up and down, a bit slower than the ball (faster every level).

SettingDefaultWhat it does
speed300.0 

slingshot

Slingshot (Angry Birds style): drag back from the sling and let go (mouse / finger), or aim with up / down, set the power with left / right and press Space. The shot flies in an arc (gravity) and knocks out every enemy it touches. A few shots per level; then the next one starts at the sling again. Out of shots = lost.

SettingDefaultWhat it does
shots4 
max_power1050.0 
pull140.0px of drag for full power

whacker

Whack-a-mole: holes in a grid; moles (the enemy) pop up for a moment. Tap / click a mole, or move the cursor with the arrows and press Space. A mole that goes back down unhit = missed (too many = lost). Hitting the decoy (the second enemy, e.g. a bomb) costs a life. Faster and busier every level.

SettingDefaultWhat it does
molemole 
decoy 
up_time1.4seconds a mole stays up at level 1

car_drive

Racing: an oval track on one screen. The car drives by itself (gas is always on), left / right steer, down brakes. Off the asphalt it is slow. Laps are counted at the start line; the first car to finish all laps wins - if a computer car (parts/car_ai.gd) gets there first, you lose ("2nd place"). Track shape: track() (the world draws it).

SettingDefaultWhat it does
laps3 
max_speed430.0 
turn2.8radians per second at full steer

car_ai

Racing: a computer car going round the oval (parts/car_drive.gd track) in its own lane, a bit faster every level. Bumps into the player's car push both. Finishing all laps before the player = the player comes 2nd.

SettingDefaultWhat it does
speed330.0 
laps3 

fishing

Fishing: the boat moves left / right on the water; a tap / Space / jump drops the hook, a second tap (or the bottom) reels it up. The first thing the hook touches comes up with it: a fish = points (deeper = more), the bad thing (the second enemy, e.g. a boot or a jellyfish) = -1 life. Fish keep swimming in at different depths.

SettingDefaultWhat it does
fishfish 
bad 
sink300.0 
reel420.0 

Kinds, win rules and lose rules

Every entity has a kind, and every game has win and lose rules. They are set in game/game.json and on each entity.

ListValues
Kindsplayer, enemy, obstacle, pickup, projectile, platform, wall, goal, spawner, npc
Win rulesnone, score, time, reach_goal, collect_all, kill_all, boss, dies, waves, distance
Lose ruleshp_zero, time_up, fall, dies, escaped, missed

Next: Your project, file by file.

Something wrong or missing on this page? Email gaminodeofficial@gmail.com.