Jump to content
Sign in to follow this  
  • entries
    162
  • comments
    262
  • views
    167556

Fun with parallax

Sign in to follow this  
OrangyTang

135 views

Over the last couple of days I managed to try an idea thats been in the back of my head for a while - a small parallax effect to give a slightly more 3d feel to things.

Obligitory image:


Of course, being a parallax effect it doesn't look much in a still image, but basically Tails is frolicing between four different layers of sprites, each at a slightly different depth.

The only 'trick' behind it is a projection matrix which just happens to be a 1:1 ortho arrangement when depth=0. Anything drawn at depth 0 is an unscaled sprite, whereas other values grow or shrink them accordingly. Then it's just a case of creating some sprites which have plenty of gaps so you can see one through the other. The idea is that it's a big clump of bushy purple grass ontop of some kind of green platform.

It seems to work quite well - I'm worried that it'll make the actual sprites (like Tails in this example) look too flat if they're within a semi-3d world, but I think as long as the parallax is kept small and subtle it'll be fine.

Even if I don't use the actual effect, having lots of layers and letting the characters run through tall grass (rather than just ontop, which is what it looks like if you've just got one layer) gives things a wonderfully softened feel and brings the environment alive somewhat.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!