Routines

This page is a collection of short routines that can be used as subroutines in larger programs. By contrast, the Sample Programs page links to entire games (that may use some of these routines). Technique Examples contains yet a third type of program — short programs that may be of some value by themselves, but are present here mainly to demonstrate the use of some programming technique in an actual program.

When contributing routines, please follow these guidelines:

  1. A routine should be self-contained, and relatively short in length.
  2. A routine should be thoroughly tested to make sure it works correctly.
  3. Include inc:routine as the starting point for pages.
  4. When the routine page is finished, link to it from here.

List & Matrix Routines

String Routines

Text Manipulation

Graphics Routines

Miscellaneous Routines

  • High Scores — Displays and stores a high score table.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License