05-05-2013, 10:26 PM
(05-05-2013, 12:16 PM)ronny14 Wrote: I'm making this in Game Maker 8, nothing too fancy.
The map is something I've struggled with since I started. I ended up with a rather long and complicated code that divided the screen into about 750 little "cells."
Each cell keeps track of 1 thing: Whether or not it should cover the map that is drawn below. When Samus is in a cell's location, the cell records the area it is in and then will reveal the map piece below it. Basically, if the cell has registered to show the map block in area 1, then it will hide the map block that is in the same position in area 2 until you visit that area.
It's rather basic compared to other map systems, and requires a lot of input, (the coordinates of each room must be specified) but I feel more in control with how the system works, and there doesn't seem to be a negative performance impact.
OH! Ok, so it's like you have an array with the x/y positions of the rooms. Once the room is entered you change it's value... Hm.. that could be done with a couple of For loops and single sprite with several frames.
8x8 sprite, say... 12 frames, frame 0 being 'blank'
Array [ x, y] = 0 for not explored, nor known
1 = single room block, 2 left half long, 3 right half long, etc.