Skip to content
GAMPEONCreate
New project
Preview: this works today, but details can still change.

Scripting overview

GAMPEON games are made of resources. A resource is a folder with a manifest, Lua scripts and other files. A server runs many resources at once: one for the game mode, one for the shop, one for the chat, and so on.

Script type Runs on Use it for
Server script The game server Rules, money, inventories, anything that must not be cheated
Client script Every player’s computer Input, UI, effects
Shared script Both Configuration and helpers both sides need

The server is the authority. Never trust a value just because a client sent it: check it on the server. See Events.

hello/
├── fxmanifest.lua
└── server.lua
fxmanifest.lua
name 'hello'
version '1.0.0'
server_script 'server.lua'
server.lua
AddEventHandler('onResourceStart', function(name)
if name == GetCurrentResourceName() then
print('Hello from ' .. name)
end
end)
CreateThread(function()
while true do
Wait(60000)
print('Another minute passed')
end
end)
  • Events pass messages inside one side and between server and client. See Events.
  • Threads run code over time without blocking the game. See Threads and timers.
  • Exports let one resource call functions of another. See Exports.

Every resource runs in its own protected Lua 5.4 state. There is no file access, no require and no os.execute, and every resource has limits on memory and run time. Long loops must call Wait. See Sandbox.

Report a problem with this pageOther ways to give feedback