Create your own 2D games and applications

Screenshots (click to enlarge)

Default startup window

Default startup window on Linux

This is the default window which is shown if Scrupp is executed without arguments. It is defined in the file main.slua whose code is printed below. No plugins are used, therefore the images that contain the texts have to be generated manually.

local width, height = 640, 480

scrupp.init("Scrupp", width, height, 32, false)

-- loading fonts
Fonts = {
	scrupp.addFont("fonts/Vera.ttf", 28),
	scrupp.addFont("fonts/Winks.ttf", 150),

-- generating images
Images = {
	Fonts[1]:generateImage{"Welcome to"},
	Fonts[2]:generateImage{"Scrupp", color={190,0,0}},
	Fonts[1]:generateImage{"Just change 'main.slua' to suit your needs!"}

main = {
	render = function(dt)

	keypressed = function(k)
		if k == "ESCAPE" then

Cairo support

Drawing arcs with Cairo The different compositing modes of Cairo Conditional circle color Masking and composition of images Different stroke styles

These are screenshots from the sample scripts of the Cairo binding lua-oocairo. The scripts were modified to output the result to a Scrupp window. The script files of these examples are part of the Scrupp distribution.

Movie support

MPEG playback MPEG playback with rotation, scaling and transparency

Scrupp supports the playback of MPEG-1 movies. The second screenshot shows the hardware accelerated scaled, rotated and transparent rendering of the same movie.

The movie is (c) copyright Blender Foundation |

Platform independence and error box

Error box on Linux using GTK Error box on Mac OS X using Carbon Error box on Windows

If an error occurs in one of the Lua scripts, a message box shows up containing the error message, the location and a traceback. This helps to find the faulty piece of code in no time. The screenshots show examples of such an error box on Linux, Mac OS X and Windows.

Full UTF-8 support

Full utf8 support

Scrupp has full support for utf-8 encoded text. The only requirement is a truetype font which supports the needed glyphs. In this example the excellent DejaVuSans.ttf from the DejaVu project has been used. This font is not part of the Scrupp package.


Paddle game written by Michal Kolodziejczyk Viewer for OpenStreetMap (wip) written by Michal Kolodziejczyk

These are two example programs written by Michal Kolodziejczyk. The first one is a paddle game (well, not hard to guess). The second one is a viewer for maps from the OpenStreetMap project. It's using LuaSocket to download the image files. Consider it work in progress.

Hosted by Logo

Last modified Fri May 29, 2009