in Education by
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! JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
If I understand your problem right, TomTsagk explained it really good: Pygame camera follow in a 2d tile game Hope this helps.

Related questions

0 votes
    Hello I am quite new to pygame and I am trying to make an intro for a game where the user hovers ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    When I try to run this pygame code it instantly closes?? The window doesn't close instantly when I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    I installed pygame using the pip in command prompt but it still shows an error. I have already attempted ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    A few days ago I've started learning pygame. So, now I've got the code which allows me to draw different ... ) py.display.update() Select the correct answer from above options...
asked Jan 11, 2022 in Education by JackTerrance
0 votes
    I'm trying to make it so when a user scrolls down a page, click a link, do whatever it is they ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    Which of these methods can be used to obtain the coordinates of a mouse? (a) getPoint() (b) getCoordinates( ... Event Handling of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    How can one get the coordinates of a mouse click inside a panel? For instance I want to be able ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    The polar form of Cartesian coordinates is (a) Circular coordinates (b) Spherical coordinates (c) ... by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Transform the vector A = 3i - 2j - 4k at P(2,3,3) to cylindrical coordinates (a) ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Convert the point (3,4,5) from Cartesian to spherical coordinates (a) (7.07,45⁰,53⁰) ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Find the spherical coordinates of A(2,3,-1) (a) (3.74, 105.5⁰, 56.13⁰) ( ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Find the Cartesian coordinates of B(4,25⁰,120⁰) (a) (0.845, 1.462, 3.625) (b ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
0 votes
    Given B= (10/r)i+( rcos θ) j+k in spherical coordinates. Find Cartesian points at (- ... theory proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 11, 2021 in Education by JackTerrance
...