Python Forum
[PyGame] Handle giant 2D map
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Handle giant 2D map
#1
Hi everyone !

I'm posting here to get some help about a "concept" in coding. In fact, i've coding a little code which allows me to display an object that you can move in a window. This "player" can go outside the window and it will load the next map etc.. So basically my program is based on files which contains 20*20 numbers which represent a tile for each ID/number and i blit this array every times in the loop.

But in terms of "gameplay" it looks like the old "prince of persia" on pc : when you reach the limit of the window the next "scene" or "map" replace the current and you have the impression to move around the level by travelling through "canvas/pictures" . It's the first idea i've had to handle a giant map : make more and more little files with 20*20 tiles and blit them as the player go far.

But my question is : How can I handle a type of "open-world" map ? How can I display a 10000*10000 pixels map and moving through it without rendering everything and without loading in the memory a giant array of 10000*10000 IDs ?! It's really a concept that escapes my logic so any help or any observation will be appreciated !

thanks for your help !

( I point you out on the fact that English is not my native language, I'm french but i'll do my best to let you understand what i mean.)
Reply


Messages In This Thread
Handle giant 2D map - by MrMahus - May-23-2018, 07:32 AM
RE: Handle giant 2D map - by micseydel - May-23-2018, 04:35 PM
RE: Handle giant 2D map - by MrMahus - May-23-2018, 05:10 PM
RE: Handle giant 2D map - by micseydel - May-23-2018, 08:19 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020