About this document

This is the work-in-progress documentation for the Xelf game engine.
Xelf stands for "extensible emacs-like facility". You can create
active game objects called "nodes"; nodes can move and interact by
being grouped into "buffers". Node and buffer classes can be
subclassed to implement game logic and override default behavior.
Other features include efficient quadtree-based collision detection,
A-star pathfinding, gamepad support, and more.

Handling Lisp in your text editor

If you clicked the link in the last section to the Wikipedia page on
Common Lisp and looked at the code examples, you probably noticed all
the parentheses. The heavy use of parentheses marks Lisp off from
other languages and makes it feel unfamiliar. But once you are able to
read and write the basics, it all falls together naturally. The
unusual syntax of Lisp is actually the key to many of its coolest
features.

Matching up parentheses and indenting things properly is best handled
automatically by a text editor with support for editing Lisp code,
such as Vim, which can be used with Slimv — the Superior Lisp
Interaction Mode for Vim. I myself use the GNU Emacs text editor along
with Slime.

Using one of these options—Emacs with Slime, or Vim with Slimv—is
probably the best way to develop and test Lisp code made with
Xelf. With Slime or Slimv you can edit Lisp code efficiently, send
commands to the underlying Lisp environment that Xelf is running in,
or redefine methods and functions in order to alter object behaviors
while the system is running.

Both Emacs and Vim are highly customizable development environments,
not just text editors; in fact, I have developed and tested Xelf
(all ~8KLOC) entirely with GNU Emacs as my IDE.

Furthermore, Emacs and Vim are Free software, will run on basically
any platform, are of very high quality, and have large, friendly user
communities.

That being said, you can edit Lisp code in basically any text editor,
and it's quite possible that the text editor you already use has a
plugin or script available for editing Lisp code and matching those
parentheses. If you're unsure about Vim and Emacs, try looking around
to see if you can find Lisp support for your existing editor.

The instructions below assume Slime is being used.

Getting Started with Xelf

1. Install SDL 1.2 libraries

If you are on GNU/Linux, you must install certain libraries through
your distributions' software installer: SDL 1.2, SDL-IMAGE, SDL-MIXER,
SDL-GFX, AND SDL-TTF. You may additionally need to install the
corresponding SDL-*-DEV versions of those packages.

The exact package names vary between distributions; you may wish to
use Synaptic to search and find the right ones. Remember that Xelf
uses SDL 1.2 and not SDL2.

Windows users can find the relevant SDL 1.2 DLL's in the Xelf
distribution, in ./xelf/contrib/win32/

5. Put Xelf in your Quicklisp folder

Note

If you are cloning from git or have already extracted the xelf
directory elsewhere, move (or symlink) it to
~/quicklisp/local-projects.

6. Load Xelf

Once Emacs and Slime are started, load and compile Xelf from the REPL:

(ql:quickload :xelf)

7. Link the example game into Quicklisp

At the shell:

cd ~/quicklisp/local-projects
ln -s xelf/plong plong

8. Play with the example

Then in Slime:

(ql:quickload :plong)
(plong:plong)

If this works, you're ready to start working with Xelf. Try reading
through the example and making your own additions and modifications.
The paddle is slow—try speeding it up. The ball physics are totally
wrong. Try substituting your own collision rules! Make something
interesting and have fun.

If you get errors, please report problems to me at dto@xelf.me. You
can also visit the channel "#lispgames" on irc.freenode.org.

9. Making a new project

This section is under construction. In the meantime you can use
Quickproject to get started, and then use the Plong example as a
boilerplate.

11. (Optional) Delivering executables of your game

Please see my notes on building and cross-compilation. The build
script will work on both Linux and Windows, and you can even use Wine
to cross-compile self-contained Win32 downloadables from within Linux!

A Mac OSX version of these build scripts is in the works. You can
check out the current work-in-progress document to learn more.

Buffers

ADD-NODE (generic function)

(BUFFER NODE &OPTIONAL X Y (Z))

Add the mode NODE to the BUFFER.
Optionally set the location with X,Y,Z.

COMPOSE (function)

(BUFFER1 BUFFER2)

Return a new buffer containing all the objects from both BUFFER1
and BUFFER2. The original buffers are destroyed.

COMPOSE-BELOW (function)

(&OPTIONAL BUFFER1 BUFFER2)

Return a new buffer containing all the objects from BUFFER1 and
BUFFER2, with BUFFER2's objects pasted below those of BUFFER1. The
original buffers are destroyed.

COMPOSE-BESIDE (function)

(&OPTIONAL BUFFER1 BUFFER2)

Return a new buffer containing all the objects from BUFFER1 and
BUFFER2, with BUFFER2's objects pasted beside those of BUFFER1. The
original buffers are destroyed.

CURRENT-BUFFER (function)

Return the currently active buffer.

DO-NODES (macro)

(SPEC &BODY BODY)

Iterate over the nodes in BUFFER, binding VAR to each node and
evaluating the forms in BODY for each. SPEC is of the form (VAR
BUFFER).

FOLLOW-WITH-CAMERA (generic function)

(BUFFER NODE)

Arrange for the BUFFER to follow NODE with the camera as it moves.

GET-NODES (generic function)

(BUFFER)

Collect all the nodes in the buffer as a list.
Consider using DO-NODES instead.

GLIDE-WINDOW-TO (generic function)

(BUFFER X Y &OPTIONAL Z)

Configure window to glide smoothly to the point X,Y.

GLIDE-WINDOW-TO-NODE (generic function)

(BUFFER NODE)

Configure window to glide smoothly to the NODE.

INSERT (generic function)

(NODE &OPTIONAL X Y Z)

Add the NODE to the current buffer, optionally at X,Y,Z.

MOVE-TOWARD (generic function)

(NODE DIRECTION &OPTIONAL (STEPS))

Move the node STEPS units in compass direction
DIRECTION.

MOVE-WINDOW (generic function)

(BUFFER DX DY &OPTIONAL DZ)

Move the buffer's window by DX,DY.

MOVE-WINDOW-TO (generic function)

(BUFFER X Y &OPTIONAL Z)

Move the buffer's window to X,Y.

MOVE-WINDOW-TO-NODE (generic function)

(BUFFER NODE)

Move the buffer's window to the node NODE.

ON-SCREEN-P (function)

(NODE)

Return non-nil when NODE touches the buffer's window bounding box.

PASTE (function)

(DESTINATION SOURCE &OPTIONAL (DX 0) (DY 0))

Copy the objects in SOURCE into DESTINATION with offset DX,DY.

REMOVE-NODE (generic function)

(BUFFER NODE)

Remove the object NODE from BUFFER.

SAVE-EXCURSION (variable)

SCALE-WINDOW (generic function)

(SELF &OPTIONAL (WINDOW-SCALE-X) (WINDOW-SCALE-Y))

SNAP-WINDOW-TO-NODE (generic function)

(BUFFER NODE)

Snap the window to the node NODE.

STACK-HORIZONTALLY (function)

(&REST BUFFERS)

Combine BUFFERS into a single buffer, with each buffer stacked horizontally.

STACK-VERTICALLY (function)

(&REST BUFFERS)

Combine BUFFERS into a single buffer, with each buffer stacked vertically.

STOP-FOLLOWING (generic function)

(BUFFER)

Stop all buffer following.

SWITCH-TO-BUFFER (function)

(BUFFER)

Switch to the buffer BUFFER.

TRANSFORM-WINDOW (function)

(&KEY (X 0) (Y 0) (Z 0) (SCALE-X 1.0) (SCALE-Y 1.0) (SCALE-Z 1.0))

TRIM (generic function)

(BUFFER)

Trim excess space from the buffer.

WINDOW-BOUNDING-BOX (generic function)

(BUFFER)

Return as multiple values the world-coordinate
bounding box of the buffer's viewing window.

WINDOW-POINTER-X (function)

(&OPTIONAL (X *POINTER-X*))

Return the absolute x-coordinate of the mouse pointer.

WINDOW-POINTER-Y (function)

(&OPTIONAL (Y *POINTER-Y*))

Return the absolute y-coordinate of the mouse pointer.

WITH-BORDER (function)

(BORDER BUFFER)

Return a new buffer with the objects from BUFFER
surrounded by a border of thickness BORDER units.

WITH-BUFFER (macro)

(BUFFER &REST BODY)

Evaluate the BODY forms in the BUFFER.

WITH-NEW-BUFFER (macro)

(&BODY BODY)

Evaluate the BODY forms in a new buffer.

Resources

DEFRESOURCE (macro)

(&REST ENTRIES)

Define a new resource.

A Xelf 'resource' is an image, sound, text, color, or font. Most
resources will depend on a file for their data, such as a .PNG file
for images and .WAV files for sounds.

A 'resource record' defines a resource. A resource record is a
property list with the following elements:

:NAME A string; the name of the resource. (Required)
:TYPE A keyword symbol identifying the data type.
Valid types are :color :music :image :sample :ttf :font
If TYPE is not given, Xelf will try to guess the file type
based on the extension given as the NAME.
:PROPERTIES
Property list with extra data specific to resource TYPE.
:FILE Name of file to load data from, if any.
Relative to project directory.
If FILE is not given, use the NAME.

FIND-RESOURCE (function)

(NAME &OPTIONAL NOERROR)

Obtain the resource named NAME, performing any necessary
loading. Unless NOERROR is non-nil, signal an error when NAME cannot
be found.

FIND-RESOURCE-OBJECT (function)

(NAME &OPTIONAL NOERROR)

Obtain the resource object named NAME, or signal an error if not
found.

FIND-RESOURCE-PROPERTY (function)

(RESOURCE-NAME PROPERTY)

Read the value of PROPERTY from the resource RESOURCE-NAME.

INDEX-ALL-IMAGES (function)

Index all .PNG images in the project.

INDEX-ALL-SAMPLES (function)

Index all .WAV samples in the project.

INDEX-PENDING-RESOURCES (function)

INDEX-RESOURCE (function)

(RESOURCE)

Add the RESOURCE's record to the resource table.
If a record with that name already exists, it is replaced.

LOAD-RESOURCE (function)

(RESOURCE)

Load the driver-dependent object of RESOURCE into the OBJECT field
so that it can be fed to the console.

FIND-DIRECTION (function)

FIND-HEADING (function)

Return the angle in radians of the ray from the point X0,Y0 to the
point X1,Y1.

FORWARD (generic function)

(NODE DISTANCE)

Move the NODE forward along its current heading for DISTANCE units.

HEADING-BETWEEN (generic function)

(NODE OTHER-NODE)

Return the angle (in radians) of the ray from NODE to OTHER-NODE.

HEADING-DIRECTION (function)

(HEADING)

LOCATION (generic function)

(NODE)

Return as values the X,Y location of NODE.

MOVE (generic function)

(NODE HEADING DISTANCE)

Move the NODE toward HEADING by DISTANCE units.

MOVE-TO (generic function)

(NODE X Y &OPTIONAL Z)

Move the NODE to the point X,Y,Z.

OPPOSITE-DIRECTION (function)

(DIRECTION)

Return the direction keyword that is the opposite direction from
DIRECTION.

OPPOSITE-HEADING (function)

(HEADING)

Return the heading angle opposite to HEADING.

STEP-IN-DIRECTION (function)

(X Y DIRECTION &OPTIONAL (N 1))

Return the point X Y moved by n squares in DIRECTION.

STEP-TOWARD-HEADING (generic function)

(NODE HEADING &OPTIONAL (DISTANCE))

Return as multiple values the point DISTANCE units
at angle HEADING away from the center of NODE.

TURN-LEFT (generic function)

(NODE RADIANS)

Increase heading by RADIANS.

TURN-RIGHT (generic function)

(NODE RADIANS)

Decrease heading by RADIANS.

X (generic function)

(NODE)

Return the current x-coordinate of the NODE.

Y (generic function)

(NODE)

Return the current y-coordinate of the NODE.

Z (generic function)

(NODE)

Return the current z-coordinate of the NODE.

Drawing

*DEFAULT-TEXTURE-FILTER* (variable)

Filter used for drawing rendered outline fonts.
Valid values are :mipmap (the default), :linear, and :nearest.

*NOMINAL-SCREEN-HEIGHT* (variable)

Nominal height of the window, in pixels.

*NOMINAL-SCREEN-WIDTH* (variable)

Nominal width of the window, in pixels.

*SCALE-OUTPUT-TO-WINDOW* (variable)

When non-nil, always show a fixed amount of the buffer when changing
window size. Otherwise (the default) one onscreen pixel equals one
unit of buffer space, so that more of the buffer shows if the window
becomes larger.

*SCREEN-HEIGHT* (variable)

Physical height of the window, in pixels.

*SCREEN-WIDTH* (variable)

Physical width of the window, in pixels.

*USE-TEXTURE-BLENDING* (variable)

*WINDOW-POSITION* (variable)

Controls the position of the game window. Either a list of coordinates or the symbol :center.

*WINDOW-TITLE* (variable)

Title string for OS window.

ALIGN-TO-PIXELS (generic function)

(SELF)

CHANGE-IMAGE (generic function)

(NODE IMAGE)

Set the image of NODE to be IMAGE.

DRAW (generic function)

(NODE)

Draw the NODE.

DRAW-BOX (function)

(X Y WIDTH HEIGHT &KEY (COLOR "black") (ALPHA 1))

DRAW-IMAGE (function)

(NAME X Y &KEY (Z 0.0) (BLEND :ALPHA) (OPACITY 1.0) HEIGHT WIDTH)

Draw the image named NAME at x,y,z, sized HEIGHT, WIDTH, with blending mode BLEND.

DRAW-LINE (function)

(X0 Y0 X1 Y1 &KEY (COLOR "white"))

DRAW-TEXTURED-RECTANGLE (function)

(X Y Z WIDTH HEIGHT TEXTURE &KEY (BLEND :ALPHA) (OPACITY 1.0)

(VERTEX-COLOR "white"))
Draw an OpenGL textured rectangle at X, Y, Z with width WIDTH and height HEIGHT.
The argument TEXTURE is a texture returned by FIND-TEXTURE. BLEND sets
the blending mode and can be one of :ALPHA, :ADDITIVE, :MULTIPLY.

DRAW-TEXTURED-RECTANGLE-* (function)

(X Y Z WIDTH HEIGHT TEXTURE &KEY U1 V1 U2 V2 ANGLE (BLEND :ALPHA)

(OPACITY 1.0) (VERTEX-COLOR "white"))

FIND-TEXTURE (function)

(NAME)

IMAGE-HEIGHT (function)

(IMAGE)

Return the height in pixels of IMAGE.

IMAGE-WIDTH (function)

(IMAGE)

Return the width in pixels of IMAGE.

RESIZE (generic function)

(NODE WIDTH HEIGHT)

Resize the NODE to be WIDTH by HEIGHT units.

RESIZE-TO-BACKGROUND-IMAGE (generic function)

(BUFFER)

Resize the buffer to fit its background image.

RESIZE-TO-IMAGE (generic function)

(NODE)

Resize the NODE to fit its image.

SCALE (generic function)

(SELF X-FACTOR &OPTIONAL Y-FACTOR)

SET-BLENDING-MODE (function)

(MODE)

USE-FILTER (function)

(FILTER)

Collision Detection

*QUADTREE-DEPTH* (variable)

BOUNDING-BOX (generic function)

(NODE)

Return as multiple values the coordinates of the bounding box for
NODE. These are given in the order (TOP LEFT RIGHT BOTTOM).

KEYBOARD-DOWN-P (function)

KEYBOARD-HELD-P (function)

Returns the duration in seconds that KEY has been depressed over a
number of game loops.

KEYBOARD-KEYS-DOWN (function)

Returns a list of the keys that are depressed.

KEYBOARD-MODIFIER-DOWN-P (function)

(MOD)

Returns t if the modifier key MOD is depressed.

KEYBOARD-MODIFIERS (function)

Returns a list of the modifier keys that are depressed.

KEYBOARD-PRESSED-P (function)

(KEY)

Returns t if KEY has just been depressed in the current game loop.

KEYBOARD-RELEASED-P (function)

(KEY)

Returns t if KEY has just been released in the current game loop.

KEYBOARD-TIME-IN-CURRENT-STATE (function)

(KEY)

Returns the duration in seconds that KEY is either pressed or
depressed.

KEYBOARD-TIME-IN-PREVIOUS-STATE (function)

(KEY)

Returns the duration in seconds that KEY was in its previous state
either pressed or depressed.

Mouse

*POINTER-X* (variable)

Current window-relative x-coordinate of the mouse pointer.

*POINTER-Y* (variable)

Current window-relative y-coordinate of the mouse pointer.

ALTERNATE-TAP (generic function)

(SELF X Y)

HANDLE-POINT-MOTION (generic function)

(SELF X Y)

PRESS (generic function)

(SELF X Y &OPTIONAL BUTTON)

RELEASE (generic function)

(SELF X Y &OPTIONAL BUTTON)

SCROLL-DOWN (generic function)

(SELF)

SCROLL-LEFT (generic function)

(SELF)

SCROLL-RIGHT (generic function)

(SELF)

SCROLL-TAP (generic function)

(SELF X Y)

SCROLL-UP (generic function)

(SELF)

TAP (generic function)

(SELF X Y)

Joystick

*DEFAULT-JOYSTICK-PROFILE* (variable)

*GENERIC-JOYSTICK-MAPPING* (variable)

*JOYSTICK-AXIS-DEAD-ZONE* (variable)

*JOYSTICK-AXIS-SIZE* (variable)

*JOYSTICK-BUTTON-SYMBOLS* (variable)

*JOYSTICK-DEAD-ZONE* (variable)

*JOYSTICK-DEVICE* (variable)

The SDL device id of the current joystick.

*JOYSTICK-DEVICE-NUMBER* (variable)

The number of the current joystick.

*USER-JOYSTICK-PROFILE* (variable)

ANALOG-STICK-HEADING (function)

(&OPTIONAL (STICK (JOYSTICK-LEFT-ANALOG-STICK)) (ID 0))

ANALOG-STICK-PRESSED-P (function)

(&OPTIONAL (STICK (JOYSTICK-LEFT-ANALOG-STICK)) (ID 0))

ANALOG-STICK-PRESSURE (function)

(&OPTIONAL (STICK (JOYSTICK-LEFT-ANALOG-STICK)) (ID 0))

BUTTON-TO-SYMBOL (function)

(BUTTON)

IS-JOYSTICK-EVENT (variable)

IS-RAW-JOYSTICK-EVENT (variable)

JOYSTICK-AXIS-PRESSED-P (function)

(AXIS &OPTIONAL (ID 0))

JOYSTICK-AXIS-RAW-VALUE (function)

(AXIS &OPTIONAL (ID 0))

JOYSTICK-AXIS-VALUE (function)

(AXIS &OPTIONAL (ID 0))

JOYSTICK-BUTTON-PRESSED-P (function)

(BUTTON &OPTIONAL (ID 0))

JOYSTICK-BUTTON-STATE (function)

(BUTTON &OPTIONAL (ID 0))

JOYSTICK-BUTTONS (function)

(&OPTIONAL (PROFILE (JOYSTICK-PROFILE)))

JOYSTICK-EVENT-P (function)

(EVENT)

Return non-nil if the EVENT is a joystick event.

JOYSTICK-LEFT-ANALOG-STICK (function)

(&OPTIONAL (PROFILE (JOYSTICK-PROFILE)))

JOYSTICK-NAME (function)

(&OPTIONAL (PROFILE (JOYSTICK-PROFILE)))

JOYSTICK-PROFILE (function)

JOYSTICK-RIGHT-ANALOG-STICK (function)

(&OPTIONAL (PROFILE (JOYSTICK-PROFILE)))

JOYSTICK-TYPE (function)

(&OPTIONAL (PROFILE (JOYSTICK-PROFILE)))

LEFT-ANALOG-STICK-HEADING (function)

(&OPTIONAL (ID 0))

LEFT-ANALOG-STICK-PRESSED-P (function)

(&OPTIONAL (ID 0))

LEFT-ANALOG-STICK-PRESSURE (function)

(&OPTIONAL (ID 0))

NUMBER-OF-JOYSTICKS (function)

RESET-JOYSTICK (function)

(&OPTIONAL (DEVICE 0))

Re-open the joystick device and re-initialize the state.

RIGHT-ANALOG-STICK-HEADING (function)

(&OPTIONAL (ID 0))

RIGHT-ANALOG-STICK-PRESSED-P (function)

(&OPTIONAL (ID 0))

RIGHT-ANALOG-STICK-PRESSURE (function)

(&OPTIONAL (ID 0))

Sound

*FREQUENCY* (variable)

*OUTPUT-CHANNELS* (variable)

*OUTPUT-CHUNKSIZE* (variable)

HALT-MUSIC (function)

(&OPTIONAL (FADE-MILLISECONDS 0))

Stop all music playing.

HALT-SAMPLE (function)

(CHANNEL &REST ARGS)

Stop playing the sample on channel CHANNEL.

PLAY-MUSIC (function)

(MUSIC-NAME &REST ARGS)

Begin playing the music resource MUSIC-NAME. If the resource
MUSIC-NAME has the property :volume, its value is used as the volume
of the music.

PLAY-SAMPLE (function)

(SAMPLE-NAME &REST ARGS)

When sound is enabled, play the sample resource SAMPLE-NAME.
If successful, returns the integer CHANNEL number playing the sound.

SEEK-MUSIC (function)

(POSITION)

SET-MUSIC-VOLUME (function)

(NUMBER)

Set the mixer music volume between 0 (silent) and 255 (full volume).

Math

*DIRECTIONS* (variable)

List of keywords representing the eight compass directions.

CFLOAT (function)

(QUADRILLE::F)

HEADING-DEGREES (function)

(RADIANS)

PERCENT-OF-TIME (macro)

(PERCENT &BODY BODY)

Evaluate the BODY forms PERCENT percent of the time.

RADIAN-ANGLE (function)

(DEGREES)

Convert DEGREES to radians.

RANDOM-CHOOSE (function)

(SET)

Randomly choose one element of the list SET and return it.

RENDER-PLASMA (function)

(WIDTH HEIGHT &KEY (GRAININESS 1.0) ARRAY)

Return a rectangle subdivision noise field with WIDTH,HEIGHT.

SECONDS->FRAMES (function)

(SECONDS)

Return the time in SECONDS as an integer number of frames.
Based on the current *FRAME-RATE*.

Hooks

*AFTER-LOAD-PROJECT-HOOK* (variable)

*AFTER-STARTUP-HOOK* (variable)

*EVENT-HANDLER-FUNCTION* (variable)

Function to be called with input events. Keyboard, mouse,
and joystick events are represented as 'event lists' of the form:

(STRING . MODIFIERS)

where STRING is a string representing the key or button, and MODIFIERS
is a list of key modifier symbols like :shift, :control, :alt, and so
on.

The modifier list is sorted; thus, events can be compared for
equality with `equal' and used as hashtable keys.

*EVENT-HOOK* (variable)

*MESSAGE-FUNCTION* (variable)

*MESSAGE-HISTORY* (variable)

*MESSAGE-HOOK-FUNCTIONS* (variable)

*MESSAGE-LOGGING* (variable)

*NEXT-UPDATE-HOOK* (variable)

*RESIZE-HOOK* (variable)

Hook to be run after user resizes window.

*UPDATE-FUNCTION* (variable)

ADD-HOOK (function)

(HOOK FUNC)

Hooks are special variables whose names are of the form
`*foo-hook*' and whose values are lists of functions taking no
arguments. The functions of a given hook are all invoked (in list
order) whenever the hook is run with `run-hook'.

This function arranges for FUNC to be invoked whenever HOOK is triggered with
`run-hook'. The function should have no arguments.

ADD-TO-LIST (function)

(LIST ELEMENT)

Add the item ELEMENT to the list LIST.

RESET-MESSAGE-FUNCTION (function)

RUN-HOOK (function)

(HOOK)

Call all the functions in HOOK, in list order.

System

*ACTIVE-PROMPT-COLOR* (variable)

*BASE-PORT* (variable)

*BURST-DURATION* (variable)

*BURST-PERIOD* (variable)

*BURST-TIMER* (variable)

*CENSUS* (variable)

*CHATTER-PERIOD* (variable)

*CLIENT* (variable)

*CLIENT-HOST* (variable)

*CLIENT-OUTPUT-PORT* (variable)

*CLIENT-PORT* (variable)

*COPYRIGHT-NOTICE* (variable)

Copyright notices for Xelf, its dependencies, and the current Lisp
implementation.

*CURRENT-SOUNDS* (variable)

*DATAGRAM* (variable)

*DATAGRAM-LENGTH* (variable)

*DEFAULT-CURSOR-WIDTH* (variable)

*DEFAULT-ENTRY-LABEL-COLOR* (variable)

*DEFAULT-ENTRY-TEXT-COLOR* (variable)

*DEFAULT-PROMPT-HISTORY-SIZE* (variable)

*DEFAULT-PROMPT-LABEL-COLOR* (variable)

*DEFAULT-PROMPT-MARGIN* (variable)

*DEFAULT-PROMPT-OUTSIDE-TEXT-COLOR* (variable)

*DEFAULT-PROMPT-STRING* (variable)

*DEFAULT-PROMPT-TEXT-COLOR* (variable)

*DEGRADE-STREAM-P* (variable)

*ECHO-TIMEOUT-LENGTH* (variable)

*ECHO-TIMEOUT-SECONDS* (variable)

*ECHO-TIMER* (variable)

*EVERYTHING* (variable)

*EXECUTABLE* (variable)

Non-nil when running Xelf from a saved binary image.

*FLAG-RECEIVED-P* (variable)

*FLAG-SENT-P* (variable)

*FRAME-RATE* (variable)

Requested frame rate.

*FULLSCREEN* (variable)

When non-nil, attempt to use fullscreen mode.

*GAME-VARIABLES* (variable)

*ID-STRING* (variable)

*IGNORED-SLOTS* (variable)

*INACTIVE-PROMPT-COLOR* (variable)

*INHIBIT-SPLASH-SCREEN* (variable)

*INPUT* (variable)

*JOYSTICK-PROFILE* (variable)

*JOYSTICK-PROFILES* (variable)

*LAST-MESSAGE-TIMESTAMP* (variable)

*LOCAL-HOST* (variable)

*MESSAGE-LOSS-RATE* (variable)

*NETPLAY* (variable)

*NODE-STREAM* (variable)

*NODE-STREAM-RATE* (variable)

*OBJECT-VARIABLES* (variable)

*OTHER-VARIABLES* (variable)

*OUTPUT* (variable)

*PROCESS-ALL-MESSAGES* (variable)

*PROJECT* (variable)

The name of the current project.
This is set by OPEN-PROJECT; use that instead.

*PROJECT-DIRECTORIES* (variable)

List of directories where XELF will search for projects.
Directories are searched in list order.

*PROJECT-PATH* (variable)

The pathname of the currently opened project.

*PROMPT* (variable)

*PROMPT-CURSOR-INACTIVE-COLOR* (variable)

*PROMPT-FONT* (variable)

*QUERY-PERIOD* (variable)

*RECEIVED-MESSAGES-COUNT* (variable)

*REMOTE-HOST* (variable)

*REMOTE-PORT* (variable)

*RESIZABLE* (variable)

When non-nil, game window will be resizable.

*SAFE-VARIABLES* (variable)

*SENT-MESSAGES-COUNT* (variable)

*SERVER* (variable)

*SERVER-HOST* (variable)

*SERVER-OUTPUT-PORT* (variable)

*SERVER-PORT* (variable)

*SERVER-SENT-MESSAGES-COUNT* (variable)

*TERMINAL-BACKGROUND-COLOR* (variable)

*TERMINAL-BOTTOM* (variable)

*TERMINAL-DISPLAY-LINES* (variable)

*TERMINAL-ERROR-COLOR* (variable)

*TERMINAL-FONT* (variable)

*TERMINAL-FOREGROUND-COLOR* (variable)

*TERMINAL-LEFT* (variable)

*TERMINAL-LINES* (variable)

*TERMINAL-SHOW-TIME* (variable)

*TERMINAL-TIMER* (variable)

*TIME-BASE* (variable)

*UNIT* (variable)

*UPDATES* (variable)

The number of game loop updates since startup.

*UPNP-CLIENT-HOST* (variable)

*UPNP-LOCAL-HOST* (variable)

*USE-SOUND* (variable)

Non-nil (the default) is to use sound. Nil disables sound.

*USE-UPNP* (variable)

*VERBOSE-P* (variable)

+30FPS+ (variable)

+60FPS+ (variable)

+FLAG+ (variable)

+FULL-STATE+ (variable)

+HASH+ (variable)

+INPUT+ (variable)

+SECONDS-PER-MINUTE+ (variable)

+STATE+ (variable)

+UUID+ (variable)

+XELF+ (variable)

ADD-TERMINAL-LINE (function)

(STRING)

AFTER-PASTE (generic function)

(THING)

ALWAYS-BURSTING (macro)

(&BODY BODY)

ARROW-KEYS-DIRECTION (function)

AT-NEXT-UPDATE (macro)

(&BODY BODY)

Run the forms in BODY at the next game loop update.

BACKGROUND-STREAM (generic function)

(BUFFER)

BACKWARD-CHAR (generic function)

(SELF)

BACKWARD-DELETE-CHAR (generic function)

(SELF)

BEGIN-NODE-STREAM (function)

(&OPTIONAL (STREAM (MAKE-NODE-STREAM)))

BEGINNING-OF-LINE (generic function)

(SELF)

BURST-MODE (function)

BURST-MODE-P (function)

BURST-PERIOD (function)

BURSTING (macro)

(&BODY BODY)

CHATTER-PERIOD (function)

CLASS-SLOTS (function)

(CLASS)

CLEAN-BUFFER (function)

(&OPTIONAL (BUFFER (CURRENT-BUFFER)))

CLEAN-DATABASE (generic function)

(BUFFER)

CLEAN-STRING (function)

(STRING)

CLEAR-INPUT-STATE (generic function)

(NODE)

CLEAR-LINE (generic function)

(SELF)

CLEAR-SOUNDS (function)

CLEAR-TERMINAL (function)

CLIENT-BUFFER (variable)

CLIENTP (generic function)

(BUFFER)

CLOSE-NETPLAY (function)

COMPRESS-SEXP (function)

(SEXP)

COMPRESS-STRING (function)

(STRING)

CONNECTEDP (generic function)

(BUFFER)

CONNECTINGP (generic function)

(BUFFER)

CONTROL-CHARACTER-P (function)

(CHARACTER)

CURRENT-DIRECTORY (function)

Returns the pathname of the current directory.

CURRENT-TIME (function)

DEGRADE-STREAM-P (function)

DEGRADE-TIME-P (function)

(TIME)

DELETE-CHAR (generic function)

(SELF)

DERANGE (function)

(INV8R::THINGS)

DO-AFTER-EVALUATE (generic function)

(SELF)

DRAW-BORDER (generic function)

(SELF &OPTIONAL (COLOR))

DRAW-CURSOR (generic function)

(SELF &REST IGNORE)

DRAW-HOVER (generic function)

(SELF)

DRAW-TERMINAL (function)

(&OPTIONAL (NUMBER-OF-LINES *TERMINAL-DISPLAY-LINES*) TRANSLUCENT)

DRAW-TERMINAL-MAYBE (function)

(&OPTIONAL NUMBER-OF-LINES TRANSLUCENT)

DUPLICATE (generic function)

(NODE &REST INITARGS &ALLOW-OTHER-KEYS)

Make a copy of this NODE.

END-OF-LINE (generic function)

(SELF)

ENTER (generic function)

(SELF &OPTIONAL NO-CLEAR)

ESTIMATE-MESSAGE-LOSS-RATE (function)

(SENT RECEIVED)

EVALUATE-EXPRESSION (generic function)

(SELF SEXP)

EXIT (generic function)

(SELF)

EXPIRED-TIME-P (function)

(TIME)

FANCY-FORMAT-EXPRESSION (generic function)

(SELF EXPRESSION)

FIND-HEADING-DIRECTION (function)

(FLOAT)

FIND-INPUT (variable)

FIND-INSTANCES (function)

(BUFFER CLASS-NAME)

FIND-LOCAL-INPUTS (generic function)

(BUFFER)

FIND-PLAYER (variable)

FIND-SLOTS (function)

(OBJECT)

FLAG-P (generic function)

(SEXP)

FLAG-RECEIVED-P (function)

FLAG-SENT-P (function)

FLATTEN (generic function)

(THING)

FLATTEN-GAME-VARIABLES (function)

(&OPTIONAL FORCE)

FLATTEN-GAME-WORLD (function)

FLATTEN-OBJECT-VARIABLES (function)

(&OPTIONAL FORCE)

FLATTEN-VARIABLE (function)

(SYM)

FORMAT-TERMINAL (function)

(FORMAT-STRING &REST ARGS)

FORWARD-CHAR (generic function)

(SELF)

FRAME-STATE-P (generic function)

(SEXP)

FULL-STATE-P (generic function)

(SEXP)

GOTO (generic function)

(SELF)

GRACEFULLY (macro)

(&BODY BODY)

HIDE-TERMINAL (function)

HOLDING-BUTTON-P (function)

(JOYSTICK)

HOLDING-CONTROL-P (variable)

HOLDING-DOWN-ARROW-P (function)

HOLDING-ENTER-P (function)

HOLDING-LEFT-ARROW-P (function)

HOLDING-RETURN-P (function)

HOLDING-RIGHT-ARROW-P (function)

HOLDING-SHIFT-P (function)

HOLDING-UP-ARROW-P (function)

HORIZONTAL-SCROLLING-MARGIN (variable)

HOST-ID (function)

HOST-ID-STRINGS (function)

HUMANP (variable)

IGNORED-SLOT-P (function)

(SLOT)

INITIALIZE-SOUNDS (function)

INPUT-P (generic function)

(SB-PCL::OBJECT)

INPUT-SOCKET (generic function)

(BUFFER)

INPUT-STATE-P (generic function)

(SEXP)

INPUT-TIME (generic function)

(SB-PCL::OBJECT)

INPUT-UPDATE-P (generic function)

(SB-PCL::OBJECT)

INSERT-STRING (generic function)

(SELF STRING)

LABEL-STRING (generic function)

(SELF)

LABEL-WIDTH (generic function)

(SELF)

LAST-MESSAGE-TIME (function)

LAST-TERMINAL-LINE (function)

LINE (variable)

LINES-PER-SCREEN (function)

LOCAL-HOST (generic function)

(BUFFER)

LOCAL-MACHINE-DESCRIPTION (function)

LOCAL-PORT (generic function)

(BUFFER)

LOGGING (function)

(FORMAT &REST ARGS)

MAKE-BOUNDING-BOX (variable)

MAKE-CENSUS (generic function)

(BUFFER)

MAKE-CLIENT-UPDATE (variable)

MAKE-DIRECTORY-MAYBE (function)

(NAME)

MAKE-FLAG (function)

MAKE-NODE-STREAM (function)

(&OPTIONAL (BUFFER (CURRENT-BUFFER)))

MAKE-QUADTREE (function)

(QUADRILLE::X QUADRILLE::Y QUADRILLE::WIDTH QUADRILLE::HEIGHT &KEY

QUADRILLE::OBJECTS (QUADRILLE::DEPTH *DEFAULT-QUADTREE-DEPTH*))
Make a new quadtree with the given dimensions, OBJECTS, and DEPTH.

MESSAGE (function)

(FORMAT-STRING &REST ARGS)

Print a log message by passing the arguments to
`*message-function'. When the variable `*message-logging*' is nil,
this output is disabled.

MESSAGE-READY-P (generic function)

(BUFFER)

MINUTES (function)

(N)

NEWLINE (generic function)

(SELF)

NEXT-NODE (function)

NICE-STRING (function)

(STRING)

NODE-STREAM (function)

OPEN-CLIENT-SOCKET (function)

OPEN-PROJECT (function)

(&OPTIONAL (PROJECT *PROJECT*) PARAMETERS)

Set the current project to PROJECT.

OPEN-SERVER-SOCKET (function)

OUTPUT-HOST (generic function)

(BUFFER)

OUTPUT-PORT (generic function)

(BUFFER)

OUTPUT-SOCKET (generic function)

(BUFFER)

PARSE-IP (function)

(STRING)

PERIODICALLY (macro)

(&BODY BODY)

PLAY-SAMPLE* (function)

(SAMPLE)

PLAYER-ID (generic function)

(SB-PCL::OBJECT)

POPULATE (generic function)

(BUFFER)

PRINT-DATA (generic function)

(SELF DATA &OPTIONAL COMMENT)

PROCESS-FLAG (generic function)

(BUFFER SEXP)

PROCESS-INPUT (generic function)

(BUFFER SEXP)

PROCESS-MESSAGES (generic function)

(BUFFER)

PROCESS-SEXP (generic function)

(BUFFER RAW-SEXP &OPTIONAL TIME)

PROCESS-STATE (generic function)

(BUFFER SEXP)

PROCESS-TIME-OUT (generic function)

(BUFFER)

PROCESS-XELF-OBJECT (generic function)

(BUFFER SEXP)

PROMPT (variable)

PROMPT-STRING (variable)

QUADTREE-DELETE-MAYBE (generic function)

(QUADRILLE::OBJECT QUADRILLE::TREE)

QUADTREE-INSERT-MAYBE (generic function)

(QUADRILLE::OBJECT QUADRILLE::TREE)

QUADTREE-UPDATE (variable)

QUANTIZE-HEADING (function)

(H)

QUERY-PERIOD (function)

QUERYING (macro)

(&BODY BODY)

QUIT (function)

(&OPTIONAL SHUTDOWN)

Exit the game engine.

READ-EXPRESSION (generic function)

(SELF INPUT-STRING)

READ-SEXP-FROM-FILE (function)

(FILENAME)

RECEIVE-MESSAGE (generic function)

(BUFFER)

RECOMPILE (generic function)

(SELF)

REFORMAT-IP (function)

(IP)

REGISTER-CONNECTION (generic function)

(BUFFER)

REGISTER-LOCAL-HOST (generic function)

(BUFFER HOST)

REGISTER-LOCAL-PORT (generic function)

(BUFFER PORT)

REGISTER-REMOTE-HOST (generic function)

(BUFFER HOST)

REGISTER-REMOTE-PORT (generic function)

(BUFFER PORT)

REGISTER-SOCKET (generic function)

(BUFFER SOCKET)

REMOTE-HOST (generic function)

(BUFFER)

REMOTE-PORT (generic function)

(BUFFER)

REMOVE-CONTROL-CHARACTERS (function)

(STRING)

RENEW-ECHO-TIMER (function)

REVIVE (generic function)

(NODE)

ROLE-INDICATOR (function)

SAMPLE-PLAYING-P (function)

(SAMPLE)

SECONDS (function)

(N)

SEND-FLAG (generic function)

(BUFFER)

SEND-FRAME-STATE (generic function)

(BUFFER)

SEND-FULL-STATE-MAYBE (generic function)

(BUFFER &OPTIONAL FORCE)

SEND-INPUT (generic function)

(BUFFER)

SEND-MESSAGE (generic function)

(BUFFER SEXP)

SEND-NODE (function)

(NODE)

SEND-NODE-STREAM (function)

(&OPTIONAL (RATE *NODE-STREAM-RATE*))

SERIALIZE (function)

(SEXP)

SERVER-BUFFER (variable)

SERVERP (generic function)

(BUFFER)

SET-NODE-STREAM (function)

(VAL)

SHORT-STRING (function)

(STRING)

SHOW-TERMINAL (function)

(&OPTIONAL (TIME *TERMINAL-SHOW-TIME*))

SLOT-DEFINITION-NAME (function)

(SLOT)

SOLOP (generic function)

(BUFFER)

SPACEBAR (generic function)

(BUFFER)

SPLASH-SCREEN-MAYBE (generic function)

START-NETPLAY (function)

(&OPTIONAL (NETPLAY *NETPLAY*))

STATE-P (generic function)

(SEXP)

STREAMING-P (variable)

TEE (function)

(STRING &REST ARGS)

TIMED-OUT-P (function)

TRUNCATE-STRING (function)

(STRING)

TRY-CONNECT (generic function)

(BUFFER)

TRY-DEGRADE-STREAM (generic function)

(BUFFER)

TRY-HANDSHAKE (generic function)

(BUFFER)

TRY-IMPROVE-STREAM (generic function)

(BUFFER)

UNCOMPRESS-SEXP (function)

(DATA &OPTIONAL LENGTH)

UNFLATTEN (generic function)

(SEXP)

UNFLATTEN-HASH (function)

(DATA TEST)

UNFLATTEN-STATE (function)

(SEXP)

UNFLATTEN-VARIABLE (function)

(DATA)

UNFLATTEN-XELF (generic function)

(SEXP)

UNITS (function)

(N)

UNSERIALIZE (function)

(STRING)

UPDATE-BOUNDING-BOX (generic function)

(QUADRILLE::OBJECT QUADTREE)

Update the OBJECT's new bounding box and position in QUADTREE.

UPDATE-BURST-TIMER (function)

UPDATE-INPUT-STATE (generic function)

(NODE PLIST TIME)

UPDATE-LAYOUT-MAYBE (generic function)

(SELF)

UPDATE-TERMINAL-TIMER (function)

UUID (generic function)

(SB-PCL::OBJECT)

VALIDATE-MESSAGE (generic function)

(BUFFER OCTETS LENGTH HOST PORT)

VERBOSELY (function)

(FORMAT &REST ARGS)

VERTICAL-SCROLLING-MARGIN (variable)

WINDOW-SCROLLING-SPEED (variable)

WITH-SESSION (macro)

(&BODY BODY)

Starts up Xelf, runs the BODY forms, and starts the main game loop.
Xelf will exit after the game loop terminates.