I am trying to generate the rooms (up/down/left/right, or if possible all 8 screens within the room range) to my player's relative map coordinates, so the person playing won't see the levels being generated. Very similar to this:
.... except it generates only the rooms around the player.
I also wanted to delete the rooms that are too far away, so that the game runs at a constant speed.
I found out that I can manually edit the c2runtime.js so that it can load my AJAX links from the current directory "./" (by the way, is it possible to load a page named after a variable?). I can use that to load a CSV and store information as variables.
Each room is 9x8 tiles large (48x48 tiles), and I want to define a 2-digit number to indicate what each tile is.
Now here's the problem. I am not sure exactly how I would go about breaking each piece of the huge CSV string and store them into separate variables and continue to do so until I hit a specific amount of characters. I've tried storing the entire thing as a huge variable, but that didn't work as well as I'd hoped...
Does anyone here happen to know how to break up the huge CSV data string and store it into separate variables?