Creating Point and Click Games with Escoria

The Esc scripting language

The Esc scripting language is the main way in which your game is controlled. With animations, it's what gives life to your game. It's used to play cutscenes, show text, define dialog trees, and modify the game logic. Each interactive item in the game will have a file with its esc script (extension .esc), and every time the player interacts with an object, an event is called inside this .esc file. The language is very simple, designed to be used by game designers and dialog writers. It is not "Turing complete", so it' not a fully featured programming language, but it's powerful enough to drive the logic of a point-and-click game.

The main functions of an esc script are:

Controlling the game's global flags and inventory

Global flags can be true or false, and are used to keep the state of the user's progress through the game, and make decisions based on this state. Similarly, the scripts are used to give and take items to the user's inventory, via global flags. See the "Inventory" chapter and the "Global state and saving" chapter in the "What you need to know as a game designer" section. For example:

set_global picked_item true

Controlling item states and visibility

Esc scripts can set the item states, and make them active or inactive. For example:

set_state bamboo_god angry


set_active good_bamboo false

Playing animations and controlling the timing

The animations inside the Items are played from esc scripts. The execution of the script can be paused until animations are done playing, or the script can pause for an arbitrary time. For example:

cut_scene bamboo_god happy


wait 5

to wait for five seconds

Showing text and dialogs

Esc scripts can make characters speak using different types of dialogs and avatars. A basic example:

say bamboo_god "What is the meaning of this! “Made in China”?! Be wary of my wrath as I shall curse you and all your lineage!" 

Complex dialog trees can also be implemented, that will we discuss in the chapter "Dialog text".


The Esc language is also used as the savegame format, when saving a game, a .esc file is created with the current game state, and the current scene. Here is the content of a quick_save.esc file for example:

cut_scene telon fade_out
## Global flags

set_global picked_item true
set_global introduced true
set_global i/inv_bad_bamboo true

## Objects
set_active bad_bamboo false
## Player
change_scene res://scenes/intro-game/scene.tscn
cut_scene telon fade_in

Reference for the esc scripting language

A complet list of esc commands and function can be found in the "doc" folder of escoria, called "", or can be read online here:

We will introduce you to each feature of this scripting language in the next chapters.

Il y a une erreur de communication avec le serveur Booktype. Nous ne savons pas actuellement où est le problème.

Vous devriez rafraîchir la page.