Tile map scrolling
Posted: Thu Nov 27, 2014 10:51 am
Hi, I'm relatively new to this, and have put together a maze generator (using the Randomized Prim's algorithm) with a player to navigate around the maze.
The maze generates fine, and I have created physics boxes for the walls and the player with no problem. I can get the player to move around the map, but the map, whilst scrolling at the same rate, is not moving the drawing range quickly enough. I.E. it is starting drawing an earlier tile than it should.
I realise that this is not that easy to explain in words, however if you run the file and move right/down (using wasd) you'll see the map stop drawing.
Have I missed out a +/- somewhere, or am I misunderstanding something about graphics.translate (or something else entirely!)?
Many thanks,
BCvery1
The maze generates fine, and I have created physics boxes for the walls and the player with no problem. I can get the player to move around the map, but the map, whilst scrolling at the same rate, is not moving the drawing range quickly enough. I.E. it is starting drawing an earlier tile than it should.
I realise that this is not that easy to explain in words, however if you run the file and move right/down (using wasd) you'll see the map stop drawing.
Have I missed out a +/- somewhere, or am I misunderstanding something about graphics.translate (or something else entirely!)?
Many thanks,
BCvery1