Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Animal Crossing has a unique way of scrolling around the world, this video shows a good example: http://www.youtube.com/watch?v=1un1XeSxhoA&feature=related

When the character moves down, the the world scrolls around at the top, like it's stuck to a cardboard tube.

Any Ideas?

share|improve this question
Doesnt look like an effect to me, it looks like a very simple 3D world that the camera is just following. – James Sep 22 '11 at 16:27

1 Answer

Seems like it's just taking a "flat world" and mapping to cylindrical coordinates. Essentially wrapping the world on a cylinder. I did something similar with a flat world, but I wrapped it onto a sphere:

enter image description here enter image description here

The way I did it for a sphere is similar to the way you'd do it for a cylinder. Choose a suitable radius (ρ or "rho" in cylindrical coordinates) for your world. For each vertex, take the XZ coordinates of your world (assuming Y is height), then covert to cylindrical coordinates using the XZ and radius plus Y. If you don't add the Y, you'll get a flat cylinder. Then convert back to Cartesian coordinates to draw in game.

share|improve this answer
1  
Another thing to mention, the world's Y dimension in Animal Crossing is much larger than the circumference of the cylinder (just by eyeballing it, because the horizon line is very close). Therefore some part of the world map is cropped to only the areas closest to the character and that cropped area gets wrapped around the whole cylinder. It's similar to cropping a 2D tile-based map to only the visible parts. – ChrisC Sep 22 '11 at 16:58
Excellent point. I image that could also be used to keep the memory footprint small by loading/unloading the world as needed. – Byte56 Sep 23 '11 at 1:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.