Zoom to minimap
Today I implemented a simple system that activates a large icon on top of all ships when you are sufficiently zoomed out. This mean that once you zoom past a certain level, an overlay activates which lets you see where all the ships are and what faction they are in.
The first part of this is a script attached the Godot Camera2D object, shown below. This script uses a Tween node to smoothly zoom the camera such that the rate of zoom accelerates as you zoom further out.
Once you are zoomed out to "minimap_zoom" level, a signal is sent to the players ship that tells it to activate the minimap. The script on the players ship then uses Godot's Group feature to turns on the minimap icons for all of the ships on the server.
I may check this camera object into the Godot asset library if there is any interest.
Get Dark Nebulae Online
Leave a comment
Log in with your itch.io account to leave a comment.