More SDL Demos for Euphoria

March 6, 2003

Mark K. Akita - mkakita@earthlink.net



Welcome!

This is a series of additional demo example programs showing how to use SDL in Euphoria.  In some cases these are quick programs I that originally wrote to make use of other graphics libraries such as Neil or PTC.  There are a couple of new programs as well.  The recurring theme in all but one of the programs is the use of alpha blending to simulate motion blur.  You can study them to learn about how to do simple bitmapped graphics animations using the SDL library.

SDL was written by Sam Lantinga and is distributed under the GNU Lesser Public License.
For more information about SDL visit the official website http://www.libsdl.org/
 

What you need to get started...

The following files are included with this SDL_mixer wrapper package:
README.TXT - this file in plain text form
README.HTML - this file in HTML form
SDL.DLL - The SDL dynamic link library
SDL_WRAP.EW - The Euphoria wrapper include file for SDL
BLUR.EXW & BLUR.EXE - A sample motion blur program
BOUNDER_SDL.EXW & BOUNDER_SDL.EXE - Displays an orbiting pattern on a starry background
ELLIPSE_SDL.EXW & ELLIPSE_SDL.EXE - Displays a swirling colored pattern of ellipses
FIREWORX.EXW & FIREWORX.EXE - A simple pyrotechnics display
LIFE_SDL.EXW & LIFE_SDL.EXE - John Conway's classic cellular automata example
MATHPIC_SDL.EXW & MATHPIC_SDL.EXE - Draw geometic patterns
BITMAPS - a folder containing images used by the demo programs
 

A quick guide to the example programs

For all of the demo programs, press the Esc key or click the left mouse button anywhere on the demo screen to exit.

BLUR - The blue guitar image will follow your mouse pointer on screen and leave a visible trail.

BOUNDER_SDL - Originally written using the Neil graphics library.  This version replaces the geometric background with a tiled star field and will display pastel balls, neon cubes, or rainbow rings orbiting the screen center.  Press the right mouse button to change patterns.

ELLIPSE_SDL - Originally written using the Open PTC library.  Display a changing rainbow colored ellipse pattern over a dark background.

FIREWORX - This program generates a continuous random fireworks display.

LIFE_SDL - Originally written using the Open PTC library.  Based on John Conway's famous game of life mathematical simulation.  There are literally gigabytes of information both scholarly and leisurely written about Life and computer Life simulations on the 'net, so I won't go into much detail about the rules or mechanics.  This version gradually cycles through a range of colors and runs a little faster than my earlier Euphoria attempts.  The program starts each with a random pattern, and goes through 2000 generations before starting over with a new random pattern.  You can also force a new pattern by pressing the right mouse button.

MATHPIC_SDL - Displays randomly generated color pattern, then repeats.  This is an SDL version of one of the first Euphoria graphics programs I wrote.


Let me know if you like these SDL/OpenGL demos!

Send comments & feedback to mkakita@earthlink.net