ariya
Qt
Graphics View
Graphics Dojo
Posted by ariya
 in Qt, Graphics View, Graphics Dojo
 on Monday, November 03, 2008 @ 14:21

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!

2 Responses to “Parallax sliding”

» Posted by Piyush
 on Thursday, November 06, 2008 @ 03:07

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)?

» Reply from ariya
 on Saturday, November 08, 2008 @ 16:02
ariya

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!



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.