1

Ok, lots of explaining to follow, so bear with me.

I'm making a 2D top-down game in PyGame, and I have a "chunk loading" system set up. The system is as follows...

I have a "world" object, made up of "chunks". Each chunk is 16x16 "tiles" and contains data for each one of those tiles. In the world object, I have a system for generating these chunks as needs be, and storing them in a dictionary, like {(x, y):"grass"} etc... Each tile in the chunk is a 10px image, that needs to be drawn to the screen in PyGame, given the position of the camera (counted in tiles). I want the camera to be able to pan around over the top of these images, and move around. How on earth can I make this work?

A quick diagram...

diagram http://williamgardner.noip.me/files/chunks

I hope this makes sense, thanks!

wg4568
  • 319
  • 4
  • 15

1 Answers1

1

If I understand your problem right, TomTsagk explained it really good:

Pygame camera follow in a 2d tile game

Hope this helps.

Community
  • 1
  • 1
derfium
  • 173
  • 1
  • 3
  • 15