LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Infinate Map Generator (IMG) project -After War map testing-

Root / Programming Questions / [.]

SwanBotCreated:
so I have though about this for a while now and finally decided to try to see if its possible to make, so over time ill update this to see what needs to be done and how. so we would start with the generator itself. there are many things I want to see made such as generated buildings, which could be done using BGPUT I think, so you would make the object/area items/buildings then attach them to a variable making it possible to move it in a blob as an object connected to itself instead of moving one tile at a time, then when its done placing it resets the variable to the variable that moves the map which connects them all to each other. then to keep them apart it uses to space used and places it randomly to make sure building and things like that don't hit/overlap. then to make it infinite you get an array to hold the places of everything so when moving it builds itself and adds whats built to the array so when you go back its the same and uses that data to put it back the right way. also you could set variable to distance so location will decide what types of land/city places it would be instead of it all being random everywhere.

Well, let me tell you that you can't store an infinite map in ram. I made some test and you could store 64 maps of 128x128 tiles(Without anything else). What you should do is store chunks of the map(Either in dat or as a label in a program) and then load only the ones that are displayed on the game. I tried to make this before: My map was a single background with 9 chunks of 42x42 tiles: XXX XCX XXX If the player moves outside of the chunk C, then all the chunks are shifted and new chunks are loaded in ram(Based on the direction where the player is moving). I didn't made a code to randomly place custom structures but you should see the code of some roguelikes to learn how they do this (Example: Pixel dungeon(Java) or Red Rogue(ActionScript). The author of the later has uploaded some examples of the functionalities of the game, including the map generator.) or you could search an Article on google.

ok thanks, ill look into those