Page:
Projects
Pages
2D Drawing
2D Nodes
Code Edits
Code Services
Containers
Control Input
Engines
Exporting
File System Dock
Getting Started
Home
Input and Actions
Lisp Text
Live Pipelines
Painters
Playing a Game
Popups Menus and Dialogs
Popups and Dialogs
Project Manager
Projects
Render Targets
Resources
Saving Scenes
Scene Tree
Script Screen
Sessions
Signals
Status
The Debugger
The Editor
The REPL
Themes
Tweens
Undo and Redo
User Interface
Widgets
No results
4
Projects
dxtr edited this page 2026-10-20 03:57:13 +02:00
Table of Contents
Projects
A project is a directory with a project.pyssel, as a Godot project has
a project.godot: the project's settings, beside the game's ASDF system,
scenes and resources. pyssel/editor starts one, and opens it in the
editor, or for your REPL alone:
(asdf:load-system :pyssel/editor)
(pyssel/editor:new-project "~/games/arena/")
;; project.pyssel, arena.asd, package.lisp, main.scene, icon.svg and .gitignore
(pyssel/editor:open-project "~/games/arena/")
;; ASDF finds arena.asd, the game's system is loaded, and the project is
;; this Lisp's.
(defvar *play* (pyssel/play:play))
;; Playing main.scene in this Lisp.
- Libraries: a game that uses a library beside Pyssel, as
cl-astar for A* pathfinding,
lists it in its system's
:depends-onand in a stiftfile of its own, beside Pyssel, so that it loads where stift sets ASDF up in the game's directory, asstift exec sbcldoes. Thepysselprogram keeps the systems it was built with, and finds others only where your own ASDF configuration points, not through the game's stiftfile, so a game that needs another library does not open in it yet. - Paths: in a session with a project, a relative path given to
load-resourceorsave-resource, and so toload-sceneandsave-scene, is relative to the project's directory,project-directory, so a game names its files the same way in the editor, in a play and exported:(sc:load-scene "levels/one.scene"). Files go on referring to each other relative to themselves. - Settings:
project-settings, ofpyssel/project, is the resource classproject.pysselholds: the project's name; its description, its icon, an SVG file, and its tags, which the editor's project manager shows; the game's system, its main scene, its window's title, size and clear colour, its theme, its autoloads, its input map of actions, its physics rate, the user interface's settings, the game's own, and the colours the editor's File System dock shows its folders in.load-projectloads them andsave-projectsaves them, in the fileproject-filenames. A tag is lower case, its words joined by underscores, as2d_game, shown as "2d Game";tag-problemsays why a string is not one. A session's project iscurrent-project; a play reads the settings afresh, so it plays what was saved, andrun-projectruns a project's game in the current session as a play does in its own. - Autoloads are nodes each run of the game makes afresh and puts
under the root before the main scene, where it finds them by their
names, as
/root/score: a scene,("score" :scene "autoloads/score.scene"), or a node class,("music" :class "arena:music-player"). Keep in one what a whole run needs and no scene owns, such as a score kept from level to level. - The clear colour,
project-clear-color, Godot's grey(0.3 0.3 0.3)by default, is what the game's window is cleared to behind all it draws, and the editor's 2D viewport behind the scene. - Embedded popups:
project-embed-subwindows, true by default, draws the game's popups and dialogs inside its window, as embedded windows, rather than in windows of their own. - Stretching, as Godot's
display/window/stretch:project-stretch-mode,:disabledby default,:canvas-itemsor:viewport, stretches the game's content over its window from its size,project-window-widthbyproject-window-height, as the base size, keeping its shape asproject-stretch-aspectsays,:keepby default,:ignore,:keep-width,:keep-heightor:expand;project-stretch-scalemakes it larger besides, andproject-stretch-scale-mode,:fractionalby default or:integer, stretches it by whole times only. They go on the game's root viewport as its content scale (see 2D Nodes). - The theme goes on the game's root viewport,
viewport-theme, where its controls look after their own and their ancestors' themes and before the default theme: every screen of the game takes it, and the editor's own controls, in a tree of their own, do not. - The text painter,
project-text-painter,:rasterby default, goes on the game's root viewport too,viewport-text-painter: how its controls draw their text where none of them says otherwise,:sdfor:slugfor text that scales. - The input map,
project-input-map, is the game's actions, as((:jump (:key :space) (:button :left)) (:pause (:symbol :escape))): a session with the project gives it to the trees made in it, so a play's game tree has it. - The user interface's settings,
tooltip-delay,tooltip-offset,drag-threshold,spin-repeat-delay,spin-repeat-intervalandsearch-seconds, are each session's own, and a session with a project takes the project's: a game that sets one sets it for its run alone. - The game's own settings are a property list in the project's
settings, which the game reads with
(pj:game-setting :lives 3), 3 if the settings have no:lives. - Folder colours,
project-folder-colors, are a list of each folder the editor shows in a colour and the colour, afolder-color, one of Godot's nine,:red,:orange,:yellow,:green,:teal,:blue,:purple,:pinkand:gray:(("art/" :blue) ("levels/one/" :red)), each folder's path relative to the project's directory and ending with a slash, once. They are kept here, not in.pyssel/, so that everyone working on the project sees them, as Godot keeps them inproject.godot.
open-project opens one project at a time, as edit does. What the
editor keeps of its own about a project goes in its .pyssel/ directory,
which version control leaves out.
Getting started
The core
Drawing
Scenes
User interface
Games and the editor
- Playing a Game
- Projects
- The Editor
- The File System Dock
- The Script Screen
- The REPL
- The Debugger
- Lisp Text
- Code Services
- Project Manager
- Undo and Redo
- Exporting
The project