• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

(Solved) How to make an overview map

B

Boredaholic

Guest
So i searched and searched on here as well as googled. Not entirely sure how to word this other than below.

Creating a game, need something as basic as press "m" for map and then having the map pop up with a location of where the player object is on said map. Map doesn't need any extra functions other than to open, have the ability to scroll around on it to view the map and where you are located, then a close function. Obviously there's more to it, but that's essentially what i'm trying to do.

Any help appreciated, or if there is another topic already on this that i couldn't find by all means direct me there and i'll go read all about it.

*Edit* Doesn't need to pause the game (not intended for the purpose of gameplay) and i'm sure it has to do with just setting up a menu like the inventory menus, but i'm not entirely sure how to set it up to show the exact location of the player object on the overview
 
V

van0014

Guest
You could draw the map overlay over everything else by having it in an object's draw event, and changing the depth. Toggle visibility or drawing code with m changing a variable.

You then need to scale map coordinates to fit within the overlay coordinates. Then the player position can be found. That's easy enough if all maps are the same size.

Does this sound overwhelming? I can go into details, but for now just wanted to explain how I'd approach it
 
B

Boredaholic

Guest
Doesn't sound overwhelming by any means. I understand roughly what you're getting at. Thank you. I've also determined a workaround instead of having exact locations. May just end up making a full sized map that you can scroll around with grid numbers for what grid you're in. then the player has to work out where they are. It's not supposed to be an easy game. Gotta have some challenges where i can. Haven't decided which route to go.

Thank you for the reply! If i choose to go the first route i may pick your brain some more.
 
You can also create another view for this, but it mirrors your scene and might not be exactly what you want. It's usually good for RTS games and situations where you need a detailed/zoom-able map.
 
V

van0014

Guest
Draw_sprite_part and draw_surface_part are awesome for drawing or scaling parts of sprites and drawing areas.
I've been making a map editor for over 5 years and that's how I draw the scrollable field of view. There's other way to do it, this works for me by preventing lag since it only gets updated as you edit.
A sprite was necessary to allow room restarts for window resizing without loosing the map, otherwise I'd just use surfaces
 
Last edited by a moderator:
Top