May-23-2018, 07:32 AM
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.)
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.)