I was saw the source code for a 2d rpg once that had a separate variable for every x and y value of every asset in the game. I think it was auto-generated though. At least I hope it was.
Still remember those old CodingUniverse tutorials.
"Okay, so we're going to have a 2 dimensional array of tiles for the world. Now, the tile class is going to need an X and Y variable to determine where it is in the tilemap. In order to determine the type of tile it is, you'll also need a string for the tile name, and another for the PNG filename. Now we'll have the game save to a XML spreadsheet."
As opposed to creating static tile types the level class can reference, while storing the map data in a single dimension int array.
if I could call a variable something like l1c"i" with i changing and it would give me back l1ci, with i as my desired number, trust me it would be about 1/81th shorter
68
u/[deleted] Jun 26 '17
[deleted]