Discuss Scratch

lwell72
Scratcher
100+ posts

Scrolling map

Is there a way to make a little map at the side of your game showing whats going on in your scrolling game?
deck26
Scratcher
1000+ posts

Scrolling map

lwell72 wrote:

Is there a way to make a little map at the side of your game showing whats going on in your scrolling game?
Depends what you want it to show probably. A full map (reduced size) with a rectangle showing where you are should be easy enough.
gtoal
Scratcher
1000+ posts

Scrolling map

try to implement it using the same code for both the main map and the mini map, just a change of scale parameter and positioning,
Uniquename1
Scratcher
100+ posts

Scrolling map

I decided to add one to one of my games. Wasn't too difficult. Took a few leaps of faith. Probably reinvented ratios not sure was never good with those.
Pretty simple script in a sprite called map gps.

https://scratch.mit.edu/projects/167457622/#player

First i decided my map would be 80 pixels long. Then i found how many x's in my scroll world. Roughly 0x to -4317x and 0y to-3240y. So I figured there is 54 scrollx's per increment of my mini map by dividing scroll max by # of incrments or 4317/80. So I figure when my scroll x is way left say at 1 or up to 54 the minimap should be at the way left at 1 of its area. then i just decided to say how if at 1minimap then scrollx =54 so scrollx=108 is 2 on the minimap etc. That ended up meaning that the absolute value of scrollx/ 54 = minimap position. Then to start my minimap i just added or subtracted how far over to where i wanted it to start. It just happened that i put the actual map at x: 160 y: -160 at it's lowest left hand point. I chose them as multiples of 80 but didn't really need it as i could just add or subtract any number to move the minimaps boundaries wherever.

Could have maybe used 100 instead of 80 but that wouldn't be anymore of a round # in the end. Oddly since my Y is not the same width as my x. I first plugged the same 54# into it and it worked. I later tried to change it to 60 I thought to match it's different length but that messed it up so idk what that means. Works though using the same # for both.

Last edited by Uniquename1 (Oct. 31, 2017 19:25:45)

lwell72
Scratcher
100+ posts

Scrolling map

thanks for the help deck26
gamesupr
Scratcher
10 posts

Scrolling map

ifiloveyouthenforeverscratchwillbeamazingendend
Son_Anakin
Scratcher
18 posts

Scrolling map

whenclickedforeveraskHow Do I Make A Map Bigger Than The Screen That The Sprites Can Move Aroundandwait
Taco_Studios789
Scratcher
3 posts

Scrolling map

Can you help me make a scolling platformer? the map wont expand
deck26
Scratcher
1000+ posts

Scrolling map

Taco_Studios789 wrote:

Can you help me make a scolling platformer? the map wont expand
Create a new topic please rather than necroposting.
Scratchmk17610
Scratcher
14 posts

Scrolling map

I cant make a scrolling game on my own. Is this the code of the sprite

whenclickedifthenkeywpressed?broadcast this to the mapend
in the map -
whenIreceive this to the mapchangeyby-10
MasterZonate
Scratcher
1 post

Scrolling map

setpencolortosetpencolortosetpencolorto
The_Imaginarium
Scratcher
1000+ posts

Scrolling map

https://scratch.mit.edu/discuss/topic/355062/
Please refrain from necroposting.
han614698
Scratcher
1000+ posts

Scrolling map

Image by Yusei-Fudo
The_Imaginarium
Scratcher
1000+ posts

Scrolling map

han614698 wrote:

snip
Please don't reply that image to people new to the forums. It is very discouraging, and it feels like someone is telling at you.

Last edited by The_Imaginarium (May 9, 2021 11:46:49)

Powered by DjangoBB