A downloadable framework for Windows and Linux

Download NowName your own price

cel7 is a 60kb framework for making grid-based games limited to 4-bit color ASCII output. The framework is based around the fe programming language.


To run a game simply pass the game's code file(s) as a command-line argument or drag a game file onto the executable. Your game file(s) can be appended to the end of the executable to create a self-contained single-file game.


config
------------------------------------------------------------------------
(= title "Game Title")   : window title
(= width 16)             : width in characters
(= height 16)            : height in characters
(= debug nil)            : set if `-debug` was passed to executable
 
 
callbacks
------------------------------------------------------------------------
(= init (fn () ...))     : called after graphics have been initialized
(= step (fn () ...))     : called every frame
(= keydown (fn (k) ...)) : called when a key is pressed
(= keyup (fn (k) ...))   : called when a key is released
 
 
functions
------------------------------------------------------------------------
(// a b)                 : integer divide
(% a b)                  : modulus
(quit)                   : exits the application
(rand n)                 : returns a random number between 0 and n
(poke addr byte)         : sets byte in memory
(peek addr)              : gets byte from memory
(poke addr string)       : sets string in memory
(peek addr n)            : gets n bytes from memory as a string
(color clr)              : sets color for subsequent draw operations
(put x y ...)            : places text at [x, y]
(get x y)                : returns the character at [x, y]
(fill x y w h chr)       : sets the characters in the rectangle to chr
 
fe language reference:
https://github.com/rxi/fe/blob/master/doc/lang.md
 
 
memory addresses
------------------------------------------------------------------------
0x0000                   : unused
0x4000                   : color palette
0x4040                   : font atlas (96x7x7 bytes)
0x52a0                   : screen buffer

StatusReleased
CategoryTool
PlatformsWindows, Linux
Rating
(6)
Authorrxi
Tags2D, ascii, framework

Download

Download NowName your own price

Click download now to get access to the following files:

cel7.exe 54 kB
cel7 38 kB
demos.zip 2 kB