OS4 DepotLogo by DBAlex 
(anonymous IP: 54.161.191.154,184) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 
 Categories

   o Audio (321)
   o Datatype (47)
   o Demo (176)
      o 1024k (0)
      o 64k (0)
      o Intro (14)
      o Magazine (13)
      o Misc (81)
      o Music (20)
      o Scene (48)
   o Development (487)
   o Document (19)
   o Driver (82)
   o Emulation (131)
   o Game (789)
   o Graphics (422)
   o Library (75)
   o Network (185)
   o Office (50)
   o Utility (728)
   o Video (55)

Total files: 3567

Full index file. Download
Recent index file. Download




 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
Downloads: 383  (Current version)
382  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show content Show crashlogs Replace file 
 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-2014 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment