Parallax sliding

Posted by Ariya Hidayat on November 3, 2008 · 2 comments

Quite popular in 80′s side-scrolling games, parallax scrolling is a simple trick which employed to give the illusion of depth. Back then, the graphics power of the computer was not advanced enough to have a technically corect 3-D effect. Parallax scrolling is cheap, and yet often it makes a big difference to the gameplay. The technique itself is a simple as it could be: have two or more layers that move at different speeds.

Parallax scrolling makes a comeback in the home screen of Android. Careful owners of T-Mobile G1 will spot the effect immediately once playing with the home screen. At Qt Developer Days in Redwood City a couple of days ago, I showed a simple GraphicsView-demo example that shows this parallax scrolling. As I promised it back then, and for those who attended Munich Developer Days (this demo did not exist yet at that time), here I showed it again as a Graphics Dojo example:

svn checkout svn://labs.trolltech.com/svn/graphics/dojo/parallaxslide
cd parallaxslide && qmake && make && ./parallaxslide

The obligatory screencast follows. You can also watch it on YouTube or blip.tv or get the 4.2 MB Ogg Theora video.

Minor update: I applied a patch from Enrico Ros that fixes “randomly invisible icons” problem.  Thanks, Enrico!

QShare(this)

Possibly related posts:

  1. Some WebKit Hybrid Stuff

2 comments

1 Piyush November 6, 2008 at 4:07 am
 

Hello Ariya,

I’ve been waitin for this ever since I left your session at DevDays 2008. However, I am not familiar with “SVN”. Is there a way you can provide this to us “SVN”-illiterates?
Also, will you also provide your presentation (if allowed)?

2 ariya November 8, 2008 at 5:02 pm
 

SVN is subversion. There are many GUI front-ends for it, e.g. TortoiseSVN (on Windows).

The presentation slides will be made available soon, stay tuned!

Comments on this entry are closed.

Previous post:

Next post: