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.
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.
| Setting | Default | What it does |
|---|---|---|
mode | topdown | one of: topdown, side, x, y, lanes, drag, none. |
speed | 220.0 | |
accel | 14.0 |
gravity
Pulls the entity down. g = -1 uses the world gravity.
| Setting | Default | What it does |
|---|---|---|
g | -1.0 | |
max_fall | 1200.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".
| Setting | Default | What it does |
|---|---|---|
force | 560.0 | |
air | 0 | |
variable | true | release early = smaller jump |
auto_move
Keeps moving one way. dir: right left up down random (or diagonals like down_left).
| Setting | Default | What it does |
|---|---|---|
dir | right | |
speed | 150.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.
| Setting | Default | What it does |
|---|---|---|
target | player | |
speed | 110.0 | |
reach | 0.0 |
patrol
Walks back and forth around its start. Turns at walls and (with gravity) at ledge edges.
| Setting | Default | What it does |
|---|---|---|
speed | 80.0 | |
dist | 160.0 | |
axis | x | one of: x, y. |
zigzag
Adds a side-to-side wobble on top of whatever else moves the entity.
| Setting | Default | What it does |
|---|---|---|
amp | 80.0 | |
freq | 1.5 |
bounce
Flies at a steady speed and bounces off walls and the world edges.
| Setting | Default | What it does |
|---|---|---|
speed | 220.0 | |
floor_bounce | true | false = falls out of the bottom (breakout ball) |
orbit
Circles around a named entity, or around its own start point.
| Setting | Default | What it does |
|---|---|---|
around | | |
radius | 80.0 | |
speed | 2.0 |
follow_path
Walks along the world path (layout "path"). At the end it escapes (counts for the "escaped" lose rule) and disappears.
| Setting | Default | What it does |
|---|---|---|
speed | 100.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).
| Setting | Default | What it does |
|---|---|---|
dir | auto | one of: up, down, left, right, facing, aim, auto. |
rate | 0.4 | |
speed | 520.0 | |
dmg | 1.0 | |
fire | auto | one of: auto, key. |
spread | 1 | |
reach | 650.0 | |
color | yellow |
health
Hit points. points = score the player gets for the kill. bar = show a bar above it.
| Setting | Default | What it does |
|---|---|---|
hp | 1.0 | |
points | 1 | |
iframes | -1.0 | -1 = auto (player 0.8 s, others 0.05 s) |
bar | false |
damage_on_touch
Hurts what it touches. hurts: opposite (other team) player enemy any.
| Setting | Default | What it does |
|---|---|---|
n | 1.0 | |
hurts | opposite | one of: opposite, player, enemy, any. |
knockback
Gets pushed away when hit.
| Setting | Default | What it does |
|---|---|---|
force | 320.0 |
invincible_after_hit
After a hit: safe for a while and blinking.
| Setting | Default | What it does |
|---|---|---|
time | 1.2 |
stomp
Jump on top of it to defeat it (and bounce up).
| Setting | Default | What it does |
|---|---|---|
bounce | 420.0 |
Touching things
What happens when two things touch.
collect
Picked up by the player. gives: score heal key life speed shield.
| Setting | Default | What it does |
|---|---|---|
gives | score | one of: score, heal, key, life, speed, shield, power. |
n | 1.0 |
destroy_on_touch
Disappears when it touches something. what: opposite player enemy any. solid = also when it hits a wall/ground.
| Setting | Default | What it does |
|---|---|---|
what | opposite | one of: opposite, player, enemy, any. |
solid | true |
push
The player can push it (crates). Use on a wall entity.
| Setting | Default | What it does |
|---|---|---|
speed | 140.0 |
teleport
Portal: the player is moved to the entity named "to".
| Setting | Default | What it does |
|---|---|---|
to | |
open_door
A door that opens when the player has the keys. keys = 0 means all keys in the level.
| Setting | Default | What it does |
|---|---|---|
keys | 0 |
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 %)
| Setting | Default | What it does |
|---|---|---|
what | | |
every | 1.5 | |
where | | |
n | 1 | |
max_alive | 25 | |
total | 0 | |
gap | 0.0 | |
speed_up | 0.0 | |
speed | 160.0 | used only if the spawned thing has no movement of its own |
y | | ground air mid random (side view) |
first | 0.6 |
timer
Every few seconds does something: jump shoot flip spawn die score.
| Setting | Default | What it does |
|---|---|---|
every | 2.0 | |
action | jump |
lifetime
Disappears after "time" seconds (blinks at the end).
| Setting | Default | What it does |
|---|---|---|
time | 3.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.
| Setting | Default | What it does |
|---|---|---|
what | | |
n | 5 | |
batch | 3 | |
grow | 2 | |
gap | 2.0 | |
every | 0.45 | |
where | | |
speed | 160.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
| Setting | Default | What it does |
|---|---|---|
on | hit,death | |
amt | 7.0 |
particles
A burst of little bits on events. on: comma list of hit death collect jump land shoot
| Setting | Default | What it does |
|---|---|---|
on | death | |
color | |
sfx
Plays a sound on events. on: comma list of jump hit death collect shoot land
| Setting | Default | What it does |
|---|---|---|
on | jump,hit,collect,shoot,death |
squash_stretch
Cartoon squash on jump / land / hit.
| Setting | Default | What it does |
|---|---|---|
amount | 1.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.
| Setting | Default | What it does |
|---|---|---|
target | player |
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.
| Setting | Default | What it does |
|---|---|---|
speed | 160.0 | |
loop_faster | 0.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.
| Setting | Default | What it does |
|---|---|---|
dmg | 1.0 | |
heavy_dmg | 3.0 | |
reach | 95.0 | |
heavy_reach | 140.0 | |
cd | 0.28 | |
heavy_cd | 0.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.
| Setting | Default | What it does |
|---|---|---|
speed | 980.0 | |
time | 0.18 | |
cd | 0.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.
| Setting | Default | What it does |
|---|---|---|
speed | 70.0 | |
rush | 640.0 | |
reach | 280.0 | |
windup | 0.65 | |
rush_time | 0.5 | |
rest | 0.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.
| Setting | Default | What it does |
|---|---|---|
speed | 120.0 | |
reach | 80.0 | |
windup | 0.38 | |
lunge | 520.0 | |
lunge_time | 0.16 | |
rest | 0.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.
| Setting | Default | What it does |
|---|---|---|
parry_window | 0.2 | |
slow | 0.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.
| Setting | Default | What it does |
|---|---|---|
speed | 70.0 | |
helper | | |
dmg | 2.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.
| Setting | Default | What it does |
|---|---|---|
block_h | 34.0 | |
width | 280.0 | |
speed | 240.0 | px/s at the first block |
perfect | 7.0 | px: 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.
| Setting | Default | What it does |
|---|---|---|
force | 760.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).
| Setting | Default | What it does |
|---|---|---|
cell | 32.0 | |
step | 0.15 | seconds per cell at the start (faster with every bite and every level) |
food | apple | |
start_len | 4 |
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.
| Setting | Default | What it does |
|---|---|---|
speed | 380.0 | |
max_speed | 900.0 |
pong_cpu
Pong: the computer's paddle follows the ball up and down, a bit slower than the ball (faster every level).
| Setting | Default | What it does |
|---|---|---|
speed | 300.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.
| Setting | Default | What it does |
|---|---|---|
shots | 4 | |
max_power | 1050.0 | |
pull | 140.0 | px 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.
| Setting | Default | What it does |
|---|---|---|
mole | mole | |
decoy | | |
up_time | 1.4 | seconds 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).
| Setting | Default | What it does |
|---|---|---|
laps | 3 | |
max_speed | 430.0 | |
turn | 2.8 | radians 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.
| Setting | Default | What it does |
|---|---|---|
speed | 330.0 | |
laps | 3 |
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.
| Setting | Default | What it does |
|---|---|---|
fish | fish | |
bad | | |
sink | 300.0 | |
reel | 420.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.
| List | Values |
|---|---|
| Kinds | player, enemy, obstacle, pickup, projectile, platform, wall, goal, spawner, npc |
| Win rules | none, score, time, reach_goal, collect_all, kill_all, boss, dies, waves, distance |
| Lose rules | hp_zero, time_up, fall, dies, escaped, missed |
Next: Your project, file by file.
Something wrong or missing on this page? Email gaminodeofficial@gmail.com.