A Super Metroid-style map display

0 favourites
  • 8 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • Examples of the interface for both the minimap and full map in Super Metroid:

    <img src="https://dl.dropbox.com/u/919275/CivilWarProj/Placeholders/Super%20Metroid_1.png" border="0" />

    <img src="https://dl.dropbox.com/u/919275/CivilWarProj/Placeholders/Super%20Metroid_2.png" border="0" />

    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. XD

  • 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!

  • 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...

  • Once you have it up and running, this might be a great topic for a tutorial.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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...

    I just had to give you props, this is smooth as hell.

  • 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.

  • 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.

  • This is just plain sweet! Nice work!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)