| View previous topic :: View next topic |
| Author |
Message |
Groupie


Joined: 29 Jan 2003 Posts: 286 Location: Pamplona (Spain)
|
Posted: Thu May 29, 2003 9:54 am Post subject: Parallax Scrolling |
|
|
What is the basic idea behind parallax scrolling?. Is it hard to program? |
|
| Back to top |
|
 |
Immortal Grandmaster of C64


Joined: 20 Feb 2003 Age: 32 Posts: 3160 Location: Deventer, NL
|
Posted: Thu May 29, 2003 11:20 am Post subject: |
|
|
The basic idea to me is that there are multiple levels of background images scrolling at variating speeds; eg the last layer moves the slowest as it's the furthest away, while first layer from the player moves the fastest as it's closest to the player.
I'm only setting my first few footsteps into assembly programming myself at the moment, and I think that Lasse Öörni has the most relevant document of what I've seen so far:
http://www.student.oulu.fi/~lo...scroll.htm |
|
| Back to top |
|
 |
C64 Games Programmer


Joined: 07 Jan 2002 Posts: 2145 Location: Finland
|
Posted: Thu May 29, 2003 11:34 am Post subject: |
|
|
Hmm.. I don't think that rant touches parallax scrolling at all..
I've understood parallax scrolling to be when a layer moves in front of another at higher speed, like in 'Parallax', where in the background there's a slow moving tile pattern. Uridium also has a sort of (though very simple) parallax with the stationary stars behind the scrolling screen.
It's about manipulating the charset so that the stationary/slower moving back layer moves into the opposite direction than the front layer. For a simple repeating pattern this is easy to do, and not even so time-consuming.
But for the trick that Hawkeye/Flimbo's Quest (plus the countless clones released by CP Verlag  ) use, there needs to be multiple (4) charsets stored into memory, where in each the back layer chars are in different state of rotation. This involves a certain strategy in drawing the background patterns: as a certain char rotates, another char comes into it, which must be always the same in the BG... (yeah, not very well explained)
The scrollroutine then needs to move the whole screen and repaint the back layer as appropriate, so it appears to either stay stationary or scroll slower as expected. (requires doublebuffering)
Never tried that myself, what I wrote now was based on an article Jukka Tapanimäki had in the finnish mag C=Lehti, about the Hawkeye scrolling. But I guess it's not the easiest thing on this planet..  |
|
| Back to top |
|
 |
Immortal Grandmaster of C64


Joined: 20 Feb 2003 Age: 32 Posts: 3160 Location: Deventer, NL
|
Posted: Thu May 29, 2003 11:54 am Post subject: |
|
|
| Lasse wrote: | Hmm.. I don't think that rant touches parallax scrolling at all..
|
Correct.. that's why I said the closest thing
Most tutorials only get into a text scroller |
|
| Back to top |
|
 |
Groupie in Training


Joined: 02 Jun 2003 Posts: 87 Location: Manchester, UK
|
Posted: Mon Jun 02, 2003 2:17 pm Post subject: |
|
|
You can also use interupts to set the built-in screen scrolling routines at different speeds. Shame i can't remember how to do that in practise......my memory has faded.
:oops: |
|
| Back to top |
|
 |
Grandmaster of C64


Joined: 19 Mar 2002 Posts: 2311 Location: Leeds, UK Twonk: qazi
|
Posted: Mon Jun 02, 2003 3:43 pm Post subject: |
|
|
| Monkey wrote: | | You can also use interupts to set the built-in screen scrolling routines at different speeds. Shame i can't remember how to do that in practise......my memory has faded. |
Fairly simple, just split $D016 and move everything above the split at one speed and everything below at another; if done right, it's reasonably effective but always has a slightly two dimensional feel to it unless sprites are overlaid to give a bit of extra depth. _________________
|
|
| Back to top |
|
 |
Newbie

Joined: 30 Jun 2003 Posts: 48
|
Posted: Mon Jun 30, 2003 7:53 am Post subject: |
|
|
http://www.atariage.com/forums...t=parallax
my 2 cents in parallax...
the basic concept is the same... |
|
| Back to top |
|
 |
Groupie


Joined: 18 Jun 2002 Age: 25 Posts: 259 Location: Macedonia
|
Posted: Tue Jul 01, 2003 7:44 pm Post subject: |
|
|
|
|
| Back to top |
|
 |
Newbie

Joined: 30 Jun 2003 Posts: 48
|
Posted: Wed Jul 02, 2003 8:38 pm Post subject: |
|
|
if i would known your tutorial i had not to invent the wheel twice...
hve |
|
| Back to top |
|
 |
C64 Games Programmer


Joined: 11 Feb 2002 Posts: 2566 Location: The Midlands, United Kingdom
|
Posted: Fri Jul 04, 2003 4:23 pm Post subject: |
|
|
Would you say a scrolltext in a demo/intro controllable both ways at different speeds is Parallax? _________________ |
|
| Back to top |
|
 |
C64 Games Programmer


Joined: 07 Jan 2002 Posts: 2145 Location: Finland
|
Posted: Fri Jul 04, 2003 4:25 pm Post subject: |
|
|
If there is a stationary or slower scrolling background behind the text, then it's parallax. Otherwise not. |
|
| Back to top |
|
 |
Groupie


Joined: 06 Jun 2003 Posts: 236 Location: Canada
|
Posted: Sat Jul 05, 2003 4:15 pm Post subject: |
|
|
Parallax scrolling is a nifty 2-D way to cheat perspective...basically that's its main use..hence scrolling backgrounds at various speeds much like real life.
That's a classical animator's trick and have been around for decades before the commodore ever got made.
Programming it using interrupts shouldn't be overly difficult and yeilds good results for that bland static background you're just dying to fill in.  |
|
| Back to top |
|
 |
THC researcher


Joined: 28 Dec 2001 Posts: 876 Location: Scotland, Edinburgh.
|
Posted: Sat Jul 05, 2003 7:16 pm Post subject: |
|
|
So say the screen is split in 4 with different speed scrolling, and there are no, for example, sprite overlays, is that *not* parallax?
IE:
----------------
4x scroll
-----------------
3x scroll
-----------------
2x scroll
-----------------
1x scroll
-----------------
I knew parallax meant something moving over a static (or different speed) background (or vice versa), but I also thought this type of split scrolling, could be described as parallax, even without any different speed overlays (sprites) on the top of the scrolling (text) portion. I think the method I'm describing is used in StarRay... (amongst others) _________________ Om. |
|
| Back to top |
|
 |
Newbie

Joined: 30 Jun 2003 Posts: 48
|
Posted: Mon Jul 07, 2003 9:15 pm Post subject: |
|
|
i would see this as paralax scrolling, too as f.e. this technique is used in games like shadow of the beast... i remember that this "paralax" buzz word i heard 1st time from my amiga/atari ST times... and many games used this technique to create a kind of depth on "plain" 2d screen... if you define paralax scrolling just by moving different layers with different speed than these games are not paralaxing?
check out on amiga/ST:
- enchanted land
- shadow of the beast
- xenon 1+2
hve |
|
| Back to top |
|
 |
Grandmaster of C64


Joined: 19 Mar 2002 Posts: 2311 Location: Leeds, UK Twonk: qazi
|
Posted: Mon Jul 07, 2003 11:12 pm Post subject: |
|
|
| Heaven/TQA wrote: | | i would see this as paralax scrolling, too as f.e. this technique is used in games like shadow of the beast... i remember that this "paralax" buzz word i heard 1st time from my amiga/atari ST times... and many games used this technique to create a kind of depth on "plain" 2d screen... if you define paralax scrolling just by moving different layers with different speed than these games are not paralaxing? |
Parallax is just an effect that our brains use for depth perception in the real world where objects further away appear to move slower so, regardless of the technique used to produce the effect on a computer, it's still parallax. When the layers pass over each other (Flimbo's Quest, Turrican 2's shoot-em-up stage, etc) it's just shedloads harder to keep all the balls in the air and lob sprites around and if you're nicking sprites to make up one or two layers of depth it means you're restricting the play area too.
Games like Shadow of the Beast pretty much "cheat" by keeping the amount of stuff overlapping to a minimum in the same way that Bounder or Katakis are doing a relatively small amount of work by just redefining characters back against the smooth scroll, but as long as the depth cues are there the parallax label is still valid. _________________
|
|
| Back to top |
|
 |
|