Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
A visual guide to Flowlab's circuit-based game development approach
Flowlab uses a visual circuit approach rather than traditional programming. Logic flows through connected behaviors like electricity through a circuit.
Signals always flow left to right through connected behaviors:
Stores game states like whose turn it is or if a door is unlocked
Ensures an event only happens once (tutorials, achievements)
Creates on/off toggles for game features like sound
Create multi-state systems with multiple switches
Basic conditional that only allows signals through when condition is met
Creates AND logic by chaining filters in sequence
Creates OR logic with parallel paths to same action
Tests numeric values against thresholds
The Switch stores whose turn it is (0=Player1, 1=Player2). The Filter only allows actions when it's the correct player's turn. When a move completes, the Switch is toggled to change turns.
When a piece reaches the opposite end of the board, the Filter detects this condition and allows the signal to pass. This turns ON the is_king Switch, which then changes the sprite and enables special movement rules.
Collision triggers when objects touch. The Filter checks which object type it collided with, allowing different responses for different objects.
The Number behavior adds the specified value to the object's property. In this case, it increments the score by 1 each time an item is collected.
Messages allow communication between different objects. One object sends a message, and any object with the matching Mailbox behavior will receive it.
Keyboard triggers activate when keys are pressed. The Number provides the movement speed value, which is sent to the Velocity behavior to move the object.
| Feature | Switch | Filter | 
|---|---|---|
| Primary Purpose | Store state (memory) | Decision making (gatekeeper) | 
| Persistence | Maintains state until changed | No persistence between signals | 
| Output Behavior | Constantly outputs current state | Only outputs when input arrives and condition is true | 
| Input Ports | ON, OFF, TOGGLE | Single input port | 
| Common Uses | Game states, toggles, one-time events | Conditional checks, validation, signal control | 
| Key Mental Model | "Memory cell that stores and broadcasts state" | "Gateway that only allows signals through when conditions are met" | 
The true power of Flowlab comes from combining switches (memory) with filters (decisions) to create complex, stateful game mechanics. Switches remember what's happened, and Filters make decisions based on that memory.
Remember these key insights as you build your games:
Think in signals that travel through connected behaviors, not lines of code being executed.
Unconnected behaviors won't communicate. Every signal path needs explicit connections.
Combine state storage (Switch) with conditional logic (Filter) for powerful game mechanics.