AminetAminet
Search:
84476 packages online
About
Recent
Browse
Search
Upload
Setup
Services

demo/intro/parallax4-os3.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Multilayer parallax SDL demo
Author:david at olofson.net (David Olofson), Amiga port by Artur Jarosik
Uploader:Artur Jarosik <orta1 wp pl>
Type:demo/intro
Architecture:m68k-amigaos >= 3.0
Date:2008-08-26
Download:http://aminet.net/demo/intro/parallax4-os3.lha - View contents
Readme:http://aminet.net/demo/intro/parallax4-os3.readme
Downloads:649

 Parallax Scrolling IV - Overdraw Elimination +
 ----------------------------------------------

    This is the fourth of the SDL scrolling
    examples, and uses an improved version
    of the recursive overdraw eliminating
    algorithm from Parallax Scrolling III.


Just as Parallax Scrolling III, this version
renders the screen from front to back, adjusting
the target surface clip rectangle to keep the
"underlying" graphics from covering the areas
already rendered.

The difference is that instead of working with
one tile at a time (which results in lots of
recursions and clipping overhead), this version
looks ahead, and processes runs of similar tiles
in "batches". Only one recursive call per run is
required, as opposed to one per tile.

Just as before, there are three classes of tiles;

  1. Fully opaque.
 Very simple: The tile is drawn as defined
 in the map data, and no further action is
 taken. This case terminates recursion.

  2. Fully transparent.
 Recursion is done in order to render the
 next layer. No further action is taken.

  3. Partially transparent.
 Recursion to the next layer is done as for
 case 2. Then the color keyed or blended
 tile is rendered on top of the result,
 after the recursive call chain returns.

The "run detector" treats 2 and 3 the same, so
there are effectively only two kinds of runs;
opaque runs (that terminate recursion), and
partially transparent runs (containing both empty
and partially transparent tiles), which requires
a recursive call to the underlying layer(s)
before being rendered.

This version scales *much* better than Parallax
Scrolling III, but honestly, it still sucks.
Some day, I'm probably going to go all the way,
and create a heavily optimized version, with all
the hairiness you could expect from such a beast.

Or why not try to beat me to it? ;-)


The program supports a few command line options:

 -f Fullscreen
 -d Double buffer
 -<n> Depth = <n> bits
 -l<n> Use <n> layers (default = 7)
 -b "Bounce-around" mode
 -w Wrap maps instead of bouncing
 -a<n> Alpha for non-opaque tiles = <n>
 -v<n> Verbosity level <n> (default = 0)
 -np Don't use planet layers
 -nr Don't use the "run detector".
 (This makes the algorithm work
 like the previous version; one
 tile at a time.)


 //David Olofson  <david at olofson.net>
        //Ventzislav Tzvetkov http://drhirudo.hit.bg





Contents of demo/intro/parallax4-os3.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                86241  200876  42.9% -lh5- 548a Aug 15 13:42 parallax4
[generic]                 1136    2309  49.2% -lh5- 05f2 Jan 18  2002 readme
[generic]                 8448   22752  37.1% -lh5- 42d0 Jan 18  2002 Source/aclocal.m4
[generic]                  100     132  75.8% -lh5- e835 Aug  1  2001 Source/AUTHORS
[generic]                 1274    2607  48.9% -lh5- bae4 Jan 18  2002 Source/ChangeLog
[generic]                28347  100820  28.1% -lh5- 31f5 Jan 18  2002 Source/configure
[generic]                  297     455  65.3% -lh5- 3aa2 Jan 18  2002 Source/configure.in
[generic]                 6992   17983  38.9% -lh5- 8f29 Aug 13  1998 Source/COPYING
[generic]                 4057   12117  33.5% -lh5- 10d9 Jan 18  2002 Source/depcomp
[generic]                 3032    7831  38.7% -lh5- 15e0 Aug  1  2001 Source/INSTALL
[generic]                 2233    5598  39.9% -lh5- a21f Aug  1  2001 Source/install-sh
[generic]                   55      58  94.8% -lh5- 7f76 Jan 18  2002 Source/Makefile.am
[generic]                 3590   11029  32.6% -lh5- af20 Jan 18  2002 Source/Makefile.in
[generic]                 2135    6283  34.0% -lh5- b90d Aug  1  2001 Source/missing
[generic]                  380     722  52.6% -lh5- c7b6 Aug  1  2001 Source/mkinstalldirs
[generic]                    0       0 ****** -lh0- 0000 Aug  1  2001 Source/NEWS
[generic]                 4947   15120  32.7% -lh5- 4fbf Jan 18  2002 Source/parallax4.c
[generic]                  967    2247  43.0% -lh5- 865a Jan 18  2002 Source/parallax4.h
[generic]                 6197   34614  17.9% -lh5- 35ab Jan 18  2002 tiles.bmp
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        19 files  160428  443553  36.2%            Aug 26 21:32

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>