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

demo/intro/parallax4-mos.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), Morphos port by Fabrizio "Lanch" Bartoloni
Uploader:lanch tiscali it (Fabrizio Bartoloni)
Type:demo/intro
Version:4
Requires:PowerSDL
Architecture:ppc-morphos
Date:2005-08-31
Download:http://aminet.net/demo/intro/parallax4-mos.lha - View contents
Readme:http://aminet.net/demo/intro/parallax4-mos.readme
Downloads:676

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>


Contents of demo/intro/parallax4-mos.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[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
[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]                 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]                 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]                 2135    6283  34.0% -lh5- b90d Aug  1  2001 parallax-4/missing
[generic]                  380     722  52.6% -lh5- c7b6 Aug  1  2001 parallax-4/mkinstalldirs
[generic]                33370   85164  39.2% -lh5- cbb4 Aug 30 17:43 parallax-4/parallax4
[generic]                 1258    2548  49.4% -lh5- 0b99 Aug 30 18:24 parallax-4/parallax4-mos.readme
[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]                 5162    5162 100.0% -lh0- acca Apr 20  2005 parallax-4/parallax4.info
[generic]                 1136    2309  49.2% -lh5- 05f2 Jan 18  2002 parallax-4/README
[generic]                 6197   34614  17.9% -lh5- 35ab Jan 18  2002 parallax-4/tiles.bmp
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total        24 files  125955  372322  33.8%            Aug 31 01:18

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