Parallax Scrolling Road

Parallax Scrolling Road
0.0 0


I’m working on a racing game in cocos2dx which will have a top view from the back camera. The attached image displays a similar example. I am confused about how to achieve the movement of the road if parallax scrolling is used. The road gets narrow as we move forward whereas it is broader closer to the camera. Should I focus on parallax scrolling to achieve this or is there some other technique to work with such games?
Is it even possible in cocos2dx…as it seems like a 3 dimensional thing?

race.jpg (50.1 KB)


IIRC, the screenshot is from a cocos2d-iphone game using only 2d components.
And I think that game is using multiple 2d images to create the 3d effect.


I agree with Ricardo - you should have multiple car images, one for each lane to simulate the 3d.
And about scrolling - I’d only move the borders, keeping the road as one image in place. This would create a movement ilusion, plus if a player is concentrated on the middle part of the screen, they are less likely to nitice minor imperfections on the edge of the screen where nothing important to gameplay happens.


It would be easier to use a 3d engine.


Thanks guys!