A Super Metroid-style map display

Get help using Construct 2

Post » Sat Nov 17, 2012 4:02 pm

Examples of the interface for both the minimap and full map in Super Metroid:




I want to be able to create a similar map interface, where the player can see where they are in the level at any time, and dynamically fill in blanks and unexplored areas as they explore the map, as well as display a mini-map as well.

Now, for the map itself, I figured it would be a simple matter of having an array that records every 'square' on the map, which has, in order:

* X and Y values for grid position (needed for a 2D array to work)
* A value that determines whether it is 'hidden', shown but unexplored, or explored
* A value that determines what "type" of square it is (basically, a 0 would be completely blank, 1 would have a wall on the left, 2 would have a floor but no walls, etc).
* A value for if there is an icon to display on the square (such as a save point, an item, etc).

That's easy enough, but the main issue after that is showing and displaying both kinds of maps, as well as determining where the player is on the grid at any one time. I've been considering setting up a 'grid' of invisible objects that would work as 'grid spaces' with the values and can collide with the player to automatically determine where the player is on the grid (and would also be useful for level design, since I would have a reference on hand), but setting up an entire grid of those things would likely be rather tedious, I imagine, and I'd rather have a more automated method.

And then there's setting up the map grid itself, which is somewhat trickier, I think. Setting up a map manually is also quite possible... But it would be EXTREMELY TEDIOUS. If there was a tileset feature, doing it manually would actually be pretty easy. XDCandescence2012-11-17 16:03:51
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Sun Nov 18, 2012 5:22 pm

I was hoping this would get some responses; been trying to figure out the same thing for a while. From what I've gathered you need 2 editors: 1 for rooms and 1 for your mini-map. Rooms must be built in both, side-to-side. Each time you create a room in the mini-map, give it an ID, then create a tiled BG or something and stretch it over the room in the other editor and give it the same ID. When the player overlaps that tiled BG and its ID matches that of a room on the mini-map, set the "highlighter" and scroll position to that room on the mini-map and whatever else.

Another way is to use a level editor and build the entire area in a single file - yes, all of Crateria in one file - and generate the map automatically based on that data (Using Tiled BG objects stretched across each room, each with their own set of variables, door positions and type, etc...)

Aside from that you might want to ask DoctorM64 (creator of Project AM2R - Another Metroid 2 Remake) how he did it. I'm pretty sure he released a .gmk of his mini-map editor and some other stuff somwhere, so if you know GML, even a little bit, that might help.

Keep us updated!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Fri Jan 11, 2013 2:56 pm

Alright, I've finally made some progress on this thing. Here's what I've got so far, it's not actually that complex, but it does require families.

Map.Capx

Basically, rather than taking a collision-based approach to it, I've used the player's position as a reference for where it should be on the map and which parts of the map are explored.

It's based around setting up the 'grid' in the level editor first, but in theory it could be set up in reverse in the exact same manner. But I prefer it like this, for now, as it's much easier to plan out and build your layouts in that way, as the map will generate itself accordingly.

It's a bit basic so far, you gotta hold down the 'm' key to show the map, and the map won't update until you reach the top-left corner for some reason, but it's a start.

Edit: Nevermind, found the issue. It's working perfectly. Now, to update the cap with documentation...Candescence2013-01-11 16:21:01
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Fri Jan 11, 2013 5:01 pm

Once you have it up and running, this might be a great topic for a tutorial.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Sat Jan 12, 2013 12:46 am

[QUOTE=Candescence] Alright, I've finally made some progress on this thing. Here's what I've got so far, it's not actually that complex, but it does require families.

Map.Capx

Basically, rather than taking a collision-based approach to it, I've used the player's position as a reference for where it should be on the map and which parts of the map are explored.

It's based around setting up the 'grid' in the level editor first, but in theory it could be set up in reverse in the exact same manner. But I prefer it like this, for now, as it's much easier to plan out and build your layouts in that way, as the map will generate itself accordingly.

It's a bit basic so far, you gotta hold down the 'm' key to show the map, and the map won't update until you reach the top-left corner for some reason, but it's a start.

Edit: Nevermind, found the issue. It's working perfectly. Now, to update the cap with documentation...[/QUOTE]

I just had to give you props, this is smooth as hell.
B
16
S
3
G
3
Posts: 66
Reputation: 3,629

Post » Tue Jan 15, 2013 10:48 am

Updated the .capx with a couple of extras:

* Grid visibility is now affected by a couple of variables. For example, some parts of the map may already be revealed in certain circumstances (like data stations in Super Metroid).
* Opening the map pauses the game.
* Tried experimenting with using colour effects. Didn't quite get what I was going for, but, eh.

Edit: More changes!

* Implemented an additional 'layer' of icons for stuff like save rooms, nav rooms, rooms with items, etc.
* Sped up the sine fading on the player icon to make it easier to see stuff behind it.Candescence2013-01-15 11:32:37
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Wed Jan 16, 2013 4:28 pm

Another update, including a basic saving system allowing the map to be automatically updated once the array is loaded from JSON. Problem is, there's a couple of annoying issues, such as part of the non-explored map appearing properly, same with the contents icons. I'm trying to debug and figure out how to fix them right now, but it's a bit frustrating.
B
94
S
37
G
11
Posts: 404
Reputation: 11,275

Post » Wed Jan 16, 2013 4:59 pm

This is just plain sweet! Nice work!
Image Image Image
B
60
S
19
G
5
Posts: 325
Reputation: 7,369


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, Naightwolf, Skebab, Swivels and 22 guests