Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Map Location Script

Batman

Sponsor

Okay, I've searched everywhere and I can't seem to find something like this, (hopefully I missed something out there.) Basically, what I'm looking for is a script that let's you see where you are, on a large map. I don't want to click the mouse button to "fast-travel" anywhere. Just simply see what your location is, on a large map, based on the current tile you're on, like a huge picture of a map with an arrow on it or something.

I know there are "mini-map" scripts out there but for the game I'm making, I'm trying to use the least about of HUD I can, therefore, what I want is for the player to push a key on the keyboard, and a big map will pop up showing the location of your character, is this a possibility?

E.G: World of Warcraft, Silent Hill, Grand Theft Auto, etc.
 

Batman

Sponsor

It's simple.
Push a button, a giant map comes up, theres some sort of indicator of where you are in the world.

map.png
 
I think we would all benefit from this thread if you answered the following questions.

  • 1. Would this be for a world map or would it be for smaller maps, such as towns, houses, or dungeons?
    2. Is it a drawn map or does the script have to render the map, and if so, a miniaturized version of the map or a passability map?
    3. What happens if the map is too big to fit on screen?

In the meantime, look out for Charlie Fleed's Minimap Script. I think it might be just what you're looking for.
 

Batman

Sponsor

1. Towns.
2. It would, preferably be a drawn map (like made in photoshop or something), but I mean a script that renders the map could work as well.
3. The towns in my game generally aren't like enormous...I don't "think" there would be a problem there...but I'm not too sure would happen to be honest :P

And thanks I'll check it out :)
 
Well, you see, it's very different to code a script for a drawn map than a rendered map. The latter, for instance, is more complicated and has been done on several occasions. If you want a rendered map, I truly believe you're better of with Charlie Fleed's script. Otherwise, if you would rather draw maps, it's a really simple script anyone can handle. You simply need to divide the hero's map coordinates over the map's width and height. So that's one very important issue you have to decide. You might also want to keep in mind drawing a map for every single town might be an extenuating job.
 

Batman

Sponsor

I tried out Charliefleet's script and when I make the map bigger, for some reason the map is totally off, even when I refresh it by deleting the saved passmap in the passmap folder, which is why I might want to try the other method.
 
The problem with the things you want are...

1: If you want the player to see his position on a worldmap as well, you'll need some fancy tagging and scripting of maps

3: Thing is, you need to set a standart. If you have a 20x15 town and a 40x30 town, do you want to stretch to fit, or orient all sizes at the largest one, or do something else? You don't have this problem drawing it, but whoever scripts it will, as they need to know how to translate the x and y coordinates to the map.
 
This guy has in mind using drawn maps. I was thinking of using the image length and width, along with map dimensions and the player's coordinates to stretch a position marker across the drawn map.

Code:
map_x  = (image_width / map_x_dimension) * player_x_position

map_y = (image_height / map_y_dimension) * player_y position
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top