Graphics and Music Challenges for Classic Computer Applications
The following are three challenges I make to the computer community, relating to:
All three serve to arouse nostalgia among 1990s computer users.
Graphics Challenge for Retro Style Games
An interesting challenge for game developers, relating to designing games with classic graphics that run on an exceptional variety of modern and recent computers.
Limit 3D graphics to the following:
- No more than 2048 polygons can be displayed at a time.
- A polygon is either a triangle, a convex quadrilateral, or a line segment.
- Each vertex of the polygon must point to a vertex from the vertex list described below.
- Each polygon can be translucent and/or wireframed.
- Polygons undergo perspective-correct rendering.
- The maximum number of vertices can be used at a time is 3 times the maximum number of polygons.
- A vertex consists of an XYZ position, an XY texture coordinate, and an RGB vertex color.
- For each color, the red component is 5 bits, the green, 5 bits, and the blue, 5 bits.
- Textures must have the same color format as vertex colors, or may employ a 4-, 16-, or 256-color palette with that color format. Texture rendering supports flips and repeats on either or both axes. A texture’s maximum image size is 192 kibibytes.
- Depth tests, clear colors, and fog colors are supported.
- The 3D graphics buffer’s resolution is the same as the screen resolution.
Limit 2D graphics to the following:
- Up to three tile-based 2D layers can be displayed at a time. If 3D graphics are not being displayed, a fourth tile-based 2D layer can also be displayed. Otherwise, a layer for the 3D graphics can be displayed.
- There are sixteen palettes of 16 colors each (using the color format for vertex colors).
- Each tile is 8 × 8 pixels and uses the colors of one of the sixteen palettes just described.
- The 2D and 3D layers may contain transparent pixels.
- One of the 2D layers can undergo a 2D affine transformation.
- Separate from layers, 2D sprites can be displayed. No more than 128 sprites may be displayed at a time. Each sprite may be tile-based or bitmap-based and has dimensions of up to 64 × 64 pixels. Sprites may contain transparent pixels.
General:
- The 3D graphics layer, if any, can be alpha blended with the 2D graphics layers in any order.
- 256 × 192 screen resolution (256 pixels wide by 192 pixels high) with up to 60 frames per second, or 256 × 384 screen resolution with up to 30 frames per second.
- A game may limit the amount of graphics memory (akin to VRAM) to a certain maximum size, say, 2048 kibibytes. This does not limit the size or number of graphics assets a game can have.
- Music: Standard MIDI files (SMF) only. The files should be rendered using a cross-platform open-source software synthesizer (see next section), using either FM or wavetable synthesis. As much as possible, instruments should match their meanings in the General MIDI System level 1.
A game might use a different resolution than shown. In that case, the maximum allowed number of polygons and vertices and the maximum texture size, sprite size, and sprite count, as well as the maximum graphics memory size, if any, will change in proportion to the new resolution. (For example, if the resolution is 640 × 480 with up to 60 frames per second, these maximums are multiplied by 6.25 = (640 × 480) / (256 × 192). Other resolutions used in classic games include 320 × 200, 320 × 240, 640 × 350, and 512 × 384; another choice is 160 × 120.)
These limitations were inspired by the graphics limitations of classic handheld game consoles.
A game may impose further resource limits to the specifications given here (for example, to reduce the maximum number of 3D polygons, to disallow polygons, or to reduce the number of colors per tile allowed). I would be interested in knowing about these limitations that a new game that adopts this document decides to impose. I would also be interested in learning about a free and open-source graphics library that implements this specification.
Building a Public-Domain music synthesis library and instrument banks
To improve support for MIDI (Musical Instrument Digital Interface) music playback in open-source and other applications, I challenge the community to write the following items, all of which must be released to the public domain or under the Unlicense.
- A cross-platform open-source library for software synthesis of MIDI data stored in standard MIDI files (SMF, .mid), using instrument sound banks in SoundFont 2 (.sf2), Downloadable Sounds (.dls), and in OPL2, OPL3, and other FM synthesis sound banks, and possibly also in Timidity++/UltraSound patch format (.cfg, .pat). (Similar to Fluidsynth, but in the public domain or under the Unlicense. Instrument sound banks are files that describe how to render MIDI instruments as sound. In addition, the source code in the nonpublic-domain foo_midi, libADLMIDI, libOPNMIDI, and OPL3BankEditor may be useful here, but review their licenses first.)
- The library should support popular loop-point conventions found in MIDI files.
- The library should support seeking of MIDI files such that a pause and resume function can be offered by a media player.
- An instrument sound bank for wavetable synthesis of all instruments and drum noises in the General MIDI System level 1 specification.
- Instruments should correspond as closely as possible to those in that specification, but should be small in file size or be algorithmically generated.
- Instruments can be generated using the public-domain single-cycle wave forms found in the AdventureKid Wave Form collection, found at: AKWF-FREE.
- The samples for each instrument are preferably generated by an algorithm, such as one that renders the instrument’s tone in the frequency domain. An example of this is found in
com.sun.media.sound.EmergencySoundbank
, which however is licensed under the GNU General Public License version 2 rather than public domain.
- The instrument sound bank should be in either SoundFont 2 (.sf2) or Downloadable Sounds (.dls) format.
- A sound bank of decent quality in either format is about 4 million bytes in size.
- The volume of all instruments in the sound bank should be normalized; some instruments should not sound louder than others.
- An instrument sound bank for FM synthesis of all instruments and drum noises in the General MIDI System level 1 specification. Instruments should correspond as closely as possible to those in that specification.
Classic Wallpaper Challenge
See the “peteroupc/classic-wallpaper” repository for a challenge on creating tileable desktop wallpapers with a limited palette of colors and a limited pixel size — such wallpapers are getting ever harder to find because desktop backgrounds today tend to cover the full computer screen, to employ thousands of colors, and to have a high-definition resolution (1920 × 1080 or larger).
License
Any copyright to this page is released to the Public Domain. In case this is not possible, this page is also licensed under Creative Commons Zero.