Game logic in Floptle is written in Lua. A script is a .lua file in your
project's scripts/ folder. Attach it to a node and it runs every frame while the
game is playing. Scripts hot-reload — save the file and the running game picks
it up immediately.
This page teaches; lua-api.md lists. The guide is in chapters:
read one end to end and you have that part of the engine, or dip into one when you
need it. The reference has every call the engine answers, grouped and searchable,
for when you already know the name and want the signature.
The same chapters are in the editor — Scripting tab → § Docs → 📖 Guides, with the contents down the left — and every call shows up as autocomplete and hover hints as you type. All three are generated from one table, so they cannot disagree.
Section numbers are stable and are what the engine's own messages cite ("see scripting.md §16"), so they stay put even when a chapter is rearranged around them.
Your first script, the hooks the engine calls, and the globals every script has.
- 1. A first script
- 2. Lifecycle:
start,update,fixedUpdate - 6. Globals:
params,time,dt,log - 12. Recipe: a walkable first-person character
- 13. Bundled example scripts
Moving things, finding things, and swapping the whole world out.
- 3.
node— the transform - 8. Referencing other nodes & scripts
- 17. Scenes:
scene.load& the entry scene - 18. Layers & tags
- 21. Prefabs:
spawn&destroy
Bodies, collisions, and asking the world what is in front of you.
Keyboard, mouse, and the action map.
Models, textures, materials and data files, swapped while the game runs.
The three things that make a scene feel alive, driven from a script.
- 9. Animation:
node:animator() - 10. Particles:
node:particles() - 11. Audio:
audio.play,node:sound()& the mixer
Vectors, terrain, water, scattered props, decals, and orbital time.
- 19. Vectors & math:
vec3,vec2,distance - 22. Terrain:
terrain.sculpt,dig& queries - 22a. Water: volumes, buoyancy &
water.* - 22b. Scatter: thousands of props from a seed
- 22c. Decals: marks on the world's surfaces
- 25. Space: orbits, gravity & time-warp
Replication, remote calls, rollback, and voice.
- 16. Networking:
net.*,synced,onRpc - 16b. Rollback netcode:
snapshot,restore&net.random - 16c. Voice: proximity chat
Saved games, timers, HTTP, the player's account, and the settings a game offers.
- 23. Saving:
save.set,save.get& slots - 24. Timers:
after,every&tween - 26. The web:
http.*&json.* - 27. The player's account:
account.* - 30. Settings a game offers its player:
app.*
Leaderboards, lobbies, and the overlay.
- 28a. Steam leaderboards:
steam.* - 28b. Steam lobbies: finding other players
- 28c. The Steam overlay
- 28d. Shipping a Steam game
- 28e. Invites and joining a friend
- 28f. DLC
- 28g. Game recording and screenshots
The in-engine IDE, the profiler, the gotchas, and why some calls refuse.