OS4 DepotLogo by Kicko 
(anonymous IP: 52.14.166.224,0) 
 HomeRecentStatsSearchMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (602)
   o Document (24)
   o Driver (97)
   o Emulation (149)
   o Game (1011)
   o Graphics (500)
   o Library (118)
   o Network (234)
   o Office (66)
   o Utility (932)
   o Video (69)

Total files: 4399

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


Support the site


 Readme for:  Demo » Misc » parallax4.lha

Parallax4

Description: Multilayer parallax SDL demo
Download: parallax4.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 258kb
Date: 06 Sep 05
Author: david@olofson.net (David Olofson), Amiga port by Ventzislav Tzvetkov
Submitter: Ventzislav Tzvetkov
Category: demo/misc
License: GPL
Distribute: yes
Min OS Version: 4.0
FileID: 1012
 
Comments: 0
Snapshots: 0
Videos: 0
Downloads: 11  (Current version)
11  (Accumulated)

[Show comments] [Show snapshots] [Show videos] [Show content] [Show crashlogs] 
 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()olofson.net>
        //Ventzislav Tzvetkov http://drhirudo.hit.bg






Copyright (c) 2004-2024 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment