GameMaker Map Camera Viewer within a Camera

OnLashoc

Member
Ok so my mind cannot fully comprehend what needs to happen here, I guess it's kind of short circuiting lol.

So I have a map that is about 2000 x 2000 pixels. The main game camera is set to 1024 x 768 (camera 0). The GUI is basically the character object that camera 0 follows. So of the 2000 x 2000 pixel map, at most on the screen you will ever see is 1024 x 768 pixels.

However, when you click on the Map Viewer button I want to display the full 2000 x 2000 pixel map scaled down to say 500 x 500 pixels... (I may have figured this out while I type it but I don't know lol). This scaled down map needs to show all the actual details of the larger map (obviously all the game icons / objects need to be scaled down in this view as well) so I figured a camera[1] or something map be needed and to referred to within the MapViewer Object which is 500 x 500 pixels.

Hopefully I didn't lose you lol Im dumb sometimes so my explinations can be too lol. Please see map below:




Any recommendations on how to achieve this? Suggestions?

I may have an idea and figured it out in my head, but any help would be appreciated!

Onnie
 

OnLashoc

Member
I figured a way to do it and rather simply done! It may not be the most efficient, but I have achieved the affect!

And I did even bother with the camera settings for either object.

When the player clicks on the Map menu button, an instance is created of the MapViewer object.

Within the MapViewer object I have the following code:

Step Event:
Code:
x=oGUI.x-117;
y=oGUI.y-33;

oMap.x = oAreamap.x;
oMap.y = oAreamap.y;
oMap.image_xscale=.25;
oMap.image_yscale=.25;
The MapViewer object also has an exit button, that when it is pressed the map is re-scaled to 100%.

Again maybe not the most efficient and I'll probably have to come back to this so any suggestions still welcomed!

Onnie
 

Gamebot

Member
Create a view the whole size of your room then scale down? If they want full screen you can either scale to screen size or use scroll bars/use mouse to look around?
 
Top