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

demo/intro/parallax4.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 Ventzislav Tzvetkov
Uploader:Ventzislav Tzvetkov
Type:demo/intro
Architecture:ppc-amigaos >= 4.0.0
Date:2005-09-06
Download:http://aminet.net/demo/intro/parallax4.lha - View contents
Readme:http://aminet.net/demo/intro/parallax4.readme
Downloads:645

 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.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]               170611  598479  28.5% -lh5- 7bd5 Sep  4 21:17 parallax-4/parallax4
[generic]                 4947   15120  32.7% -lh5- 4fbf Jan 18  2002 parallax-4/parallax4.c
[generic]                  967    2247  43.0% -lh5- 865a Jan 18  2002 parallax-4/parallax4.h
[generic]                 1832    2104  87.1% -lh5- 30ee Sep  6 16:41 parallax-4/parallax4.info
[generic]                 1238    2499  49.5% -lh5- 779e Sep  4 21:25 parallax-4/parallax4.readme
[generic]                 1826    2104  86.8% -lh5- f3df Sep  6 16:41 parallax-4/parallax4.readme.info
[generic]                 1136    2309  49.2% -lh5- 05f2 Jan 18  2002 parallax-4/README
[generic]                 3032    7831  38.7% -lh5- 15e0 Aug  1  2001 parallax-4/INSTALL
[generic]                 2233    5598  39.9% -lh5- a21f Aug  1  2001 parallax-4/install-sh
[generic]                  245     387  63.3% -lh5- 1463 Sep  4 21:18 parallax-4/make.amiga
[generic]                 3604   10899  33.1% -lh5- b504 Aug 30 17:43 parallax-4/Makefile
[generic]                   55      58  94.8% -lh5- 7f76 Jan 18  2002 parallax-4/Makefile.am
[generic]                 3590   11029  32.6% -lh5- af20 Jan 18  2002 parallax-4/Makefile.in
[generic]                  380     722  52.6% -lh5- c7b6 Aug  1  2001 parallax-4/mkinstalldirs
[generic]                 6197   34614  17.9% -lh5- 35ab Jan 18  2002 parallax-4/tiles.bmp
[generic]                 1274    2607  48.9% -lh5- bae4 Jan 18  2002 parallax-4/ChangeLog
[generic]                 1808    5503  32.9% -lh5- 66e5 Aug 30 17:43 parallax-4/config.log
[generic]                 5778   15886  36.4% -lh5- 4250 Aug 30 17:43 parallax-4/config.status
[generic]                28347  100820  28.1% -lh5- 31f5 Jan 18  2002 parallax-4/configure
[generic]                  297     455  65.3% -lh5- 3aa2 Jan 18  2002 parallax-4/configure.in
[generic]                 6992   17983  38.9% -lh5- 8f29 Aug 13  1998 parallax-4/COPYING
[generic]                 4057   12117  33.5% -lh5- 10d9 Jan 18  2002 parallax-4/depcomp
[generic]                 2135    6283  34.0% -lh5- b90d Aug  1  2001 parallax-4/missing
[generic]                 1302    1655  78.7% -lh5- 0adc Sep  6 16:04 parallax-4.info
[generic]                  788    4483  17.6% -lh5- f4e2 Aug 30 17:43 parallax-4/.deps/parallax4.Po
[generic]                 8448   22752  37.1% -lh5- 42d0 Jan 18  2002 parallax-4/aclocal.m4
[generic]                  100     132  75.8% -lh5- e835 Aug  1  2001 parallax-4/AUTHORS
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        27 files  263219  886676  29.7%            Sep  6 19:04

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