                     The ELF Sprite Programming Language 
                             for EGA Life Forms
                     originally described by Linus Sphinx

                         adapted for the game of 

                                 Fishball

                                    by

                        Linus Sphinx And Ting Hsu


A text file of, "elf", is used to describe and, "cut up", a bitmap. The two files are
combined at runtime to produce a video game or simulation and allow for easy adjustment of
animation sequences, solid surface simulation, sound linking and chaining of events without
recompiling the interpeter.

Fishball ELF uses five files, located directly below the game in the bmp 
directory. The first one defines the animation sequences, second file defines
the fish, third the predators, four solid obstacles and fifth is the seas and 
the currents that make it up, combined they define the ocean and all it's 
inhabitants.

---------------------------
 SPRITES
---------------------------
First sprite definition file is named, "sprite.elf", uses the letters, "sq",
pound sign, forward slash, numbers, colons and commas arranged as: 

#:NumberOfSpritesInThisFile
s:hotX,hotY,hotWide,hotHigh,opaque,framecount,flipspeed,sound
q:frameX,frameY,framewide,framehigh
q:frameX,frameY,framewide,framehigh
q:frameleft,frametop,framewide,framehigh

commands are
        # - count of actual sprites 
        s - entity - sprite definition
        q - quadrangle - one for each framecount in elf command
        // - comment at the end of a command
        
the count command comes first in the file and appears only once
hot zone is the rectangle in the sprite used for collision detection, 
speed is the number of pixels to jump, flipspeed is the number of page flips 
between frame changes
framecount source quadrangles must follow each sprite
sound is a value referencing the line number starting at the second wave command in the 
wav/racket.elf file - 0 = no sound (0 is the background music)

---------------------------
FISH.ELF
---------------------------
Second fish definition file is named, "fish.elf", uses the letter, "f",
pound sign, forward slash, numbers, colons and commas arranged as: 

#:NumberOfSpritesInThisFile
f:layerZ,Action,TTL,Speed

lines beginning with f define a fish
layerZ is 0 to 9 with 0 representing the background, foreground layer 9.
Action is a number representing an index into the array of fish behavior patterns
TTL is how long this fish will live or 0 = forever
Speed is initial friskiness

---------------------------
PREDATOR.ELF
---------------------------
Third is the predator definition named, "predator.elf", uses the letter, "p",
pound sign, forward slash, numbers, colons and commas arranged as: 

#:NumberOfSpritesInThisFile
p:layerZ,Action,TTL,Speed

lines beginning with p are predators
layerZ is 0 to 9 with 0 representing the background, foreground layer 9.
Action is a number representing an index into the array of fish behavior patterns
TTL is how long this fish will live or 0 = forever
Speed is initial friskiness

---------------------------
ISLANDS.ELF
---------------------------
Fourth is the islands file, "islands.elf", that defines rigid objects the fish 
interact with using the letter, "i", pound sign, forward slash, numbers, colons and 
commas arranged as: 

#:NumberOfObstaclesInThisFile,
i:oceanX,oceanY,layerZ,Sprite,Action

lines beginning with i are islands or obstacles
reside at in the virtual ocean and then a rectangle in fish.bmp and Action is
the number in the behavior function array.
layerZ is 0 to 9 with 0 representing the background, foreground layer 9.

---------------------------
OCEAN.ELF
---------------------------
Fifth is the sea definition file named, "ocean.elf", defining the ocean size and
areas in it which are the currents that push the fish around which may not
overlap.

#NumberOfCurrentsInThisFile,OceanXsize,OceanYsize,Census,Speed
c:oceanX,oceanY,wide,high,flowDirection,flowSpeed,flowForce

the OceanXsize/OceanYsize is the full size of our virtual ocean.
Census is number of flips to wait between current population polls
Speed is how far to shift the background tile each draw cycle
'c' commands define a current which is a rectangle defining an area of the 
virtual ocean. All areas must be covered.
flowDirection as a number 1-9 according to the keypad
flowSpeed is the distance to move the background water tile.
flowForce is how far to fling your fish flowDirection

---------------------------
SUPPORT WEBSITE
---------------------------
http://gp2x.fullsack.com/

