ESKEES script language
The full reference is available in Japanese for now. This page is an overview. Alpha: details may change without notice.
ESKEES script describes everything from "change the expression when clicked" to small games like Tetris and Patapata. It has a Lua-like syntax with blocks closed by end, and can be edited as blocks, text or a diagram in ESKEES Studio. The same script runs in test play, the Player, showcase and ESKEES Screen.
What a script looks like
Only five kinds of things can appear at the top level: var, save, function, class and on (triggers).
var score = 0 to 999999 save -- a number shown on screen and saved
save record = { best = 0 } -- the save-data layout
function add(a, b) -- a function (top level only)
return a + b
end
class Bird -- an actor class (the part named Bird)
vy = 0
function update(dt)
self.y += self.vy * dt
end
end
on press face -- a trigger
score = add(score, 1)
end
Triggers
on start(once when opened),on frame(every frame,dtseconds),on every 1.5on press/click/down/upfor click areas and UI buttons (anyfor anywhere),on drag A to B,on tap Classon key Space/on keyup(keyboard and gamepad names such asPadA)on change var,on scene name
Statements
- Control —
if,switch,loop,while,repeat n … end,repeat … until,for i = 1, n do,for k, v in pairs(t) do,for each in Class,break,wait - Parts and animation —
frame face = "smile",toggle,play,tween … to { … } in 0.25 ease "back-out" - Actors —
spawn Class at x, y,destroy,self.x,touching Class,self:overlapping("Class"),spawn (expression) at x, y(class name from a table's part column),self.style = "Red"/spawn Class at x, y as Red(component styles) - Scenes, UI, sound —
scene,scene Game fade 0.6(fade to black and switch),on key Space in Game(a trigger that only fires in that scene and stops when you leave it),ui Panel show,ui Element hide/ui Element color "#ff4040"(one element inside a panel),say Text = "…",say Text = name(a variable's value),say Text = "Lv" .. lvordata.items.herb.name(expressions),sound,music, sound keys on a timeline clip (they play whenplayplays the clip), a component's own sound names (sound land/self:sound("land")) - Particles and shader values —
effect Swirl param 1 = 3(a GLSL effect'su_param),particles Star at x, y count 12 speed 160 life 0.8 gravity 600 - Effects —
effect Vignette = 0.8,effect Fade to 1 in 0.5 wait,effect Hit on self to 0 in 0.2(screen and part effects by name) - Camera and stages —
camera follow self,camera shake,stage "name",save.slot = 2(switch save slots),tile.at,self:moveBy(dx, dy) - Scores —
score total as Time lowersends a value to the leaderboard (see ESKEES Studio)
Differences from Lua
- 0 and the empty string are falsy; undefined variables are 0.
+=and-=exist;!=works as well as~=.- Functions only at the top level — no closures, no varargs, one return value.
- Objects are
class(actors) only; no metatables and no standard library such asosorio. waitis a statement that pauses the script — no coroutines needed.
Naming
Names may be Japanese, but we recommend ASCII names for variables, functions, methods, classes and save data (score, addExp, class Enemy, save record). Full-width and half-width look-alikes otherwise create names that look identical but aren't. A class name is the name of its part, so parts that become classes should have ASCII names too. Text shown on screen can be in any language.