Hey, I’ve recently joined JGO after lurking around for a few days and I figured I’d ask a question about one of the ideas that I’ve been throwing around. Without any more fluff I’ll just ask my question.
When creating a map for a 2D top-down RPG what would be the best way to create the game world/the maps?
My idea, which has probably been thought of before, would be to have two 2D arrays which would control which map tiles are where and which tiles you can/cannot walk on. The first array would simply hold a number, say 1 is flat and 2 is a hill, and then when you start up the game it would go through the array and spawn the flat tiles where the 1’s are and the hill tiles where the 2’s are. After that, when the player moves their character from tile to tile, the second array would be checked to see if the player can/cannot move onto the tile.
(I’ve only learned the very basics IMO of Java so-far, but I figured that I might as well think about ways to get things to work for later on.)