Can someone help me make a Radar/Minimap?


As you might know, I’m making a 3rd-person shooter. It’s a wave survival game where enemies spawn randomly throughout the map. I figured it would be pretty annoying if the player walked around the corner, straight into a bullet, so I started making a radar system. This was harder than I thought, and I haven’t been able to find out how to create most of the necessary things needed for a radar.

Does anyone know how to make the player’s and enemy’s movement in the game work with the radar?

The Radar object is in the UI.


Not exactly 3rd person (at least in it’s current state, I mean technically, but it’s just top-down) so you can see bullets anyways.
But if you want to get it so it pops up on the “radar” make sure things are to scale;
If 2 pixels = 1 block, that’s a 1/16 ratio. So for the distance you move, you want it to be displayed at 1/16th the scale. This will be added on to the starting position of the dot on the radar

So RadarX + PlayerX/16 & RadarY + PlayerY/16 should be correct.
Then it’s just the same for the enemy or projectiles. Just make sure the scale on the radar is correct

1 Like

Ok! Is there a way to make a moving minimap though? I was thinking of an object that moved under the radar, but I don’t know how to make the edges that aren’t in the radar 0 transparency.
I might not need a minimap though.

Also, is there a way to tell the distance from the enemies? I tried to use proximity, but that didn’t work very well, since it can’t count the number of enemies.

So I’m assuming all enemies? Proximity can do that, but it isn’t effective because it’d likely be very large, potentially causing some lag. You can use an expression to calculate it instead the distance instead

1 Like

For a moving Minimap, Masking would be great for that, but Flowlab doesn’t really have that ability currently. There are likely ways around it, but it’ll probably be overcomplicated.

Off the top of my head what I’m thinking of is having the wall objects spawn smaller versions of themselves on the map, the same way the player is on it. But an extra step is needed to adjust the position based on the camera position. Make sure this only happens when they’re within a certain distance
Also, another calculation should be done to see if the objects are off of the radar, if it is, remove it. You could technically do this with the In-View behavior like what you’d do to check if the walls are within range, but the radar would need to be a square for that to work by itself, so you should perform a distance check as well.

1 Like

If I used in-view, wouldn’t the enemies be able to activate it?

? Yes enemies can use the In-View behavior.

It sounded from your response that you thought In-View would be in the player, then from there it would detect stuff. That’s not how it works, so to clarify what the in-view behavior does in case you’re unfamiliar with it: If I have it in Object A, when object A is on the screen, “In” will output. When it’s off the screen, “Out” will output.
You can adjust the amount needed to be considered In or Out of the screen.
I’m just saying to use it so that only the parts that are within range will run code, otherwise it’s a waste in performance.

1 Like