PDA

View Full Version : repeating world



Fezziiwig
12-22-2013, 08:41 AM
I'm making a game where, like pacman, if you go off one side of the screen you come out on the other side. However the camera follows the player so it cant just be a matter of changing the player's coordinates. Is there an opengl solution other than just re rendering everthing multiple times?

chbaker0
12-22-2013, 08:58 AM
How large is the world? If it is smaller than your intended render distance, I'm sure that could complicate things much more. The details of the problem really affect the possible solutions.

Fezziiwig
12-22-2013, 09:25 AM
I would have thought I'm going to render smaller than the world. But I'm still not sure how you would go about solving this problem.

chbaker0
12-22-2013, 06:30 PM
You could probably split your world up into multiple sections (say, different sections for each edge and corner), and then translate them to where you want them to be seen when the camera is near the edge or corner. Then, once you cross the line, you could change the players coordinates to wrap around seamlessly.