[MOD] - Minimap

Proof of Concept (How the Minimap Works)

This Minimap leverages Unity’s rendering and UI systems, along with MelonLoader’s modding framework, to create a seamless minimap experience. Here’s a high-level overview of how it works:

  1. Player Controller:
  • The mod uses player object in the game “PlayerController”.
  • The player’s transform (position and rotation) is tracked continuously to keep the minimap centered on the player.
  1. Minimap Camera Setup:
  • A new orthographic camera is created specifically for the minimap. Orthographic mode ensures a 2D top-down view without perspective distortion.
  • The camera is positioned 200 units above the player and looks straight down (rotated 90 degrees on the X-axis).
  • The camera’s culling mask is set to match the game’s map layers (using CityMap._defaultCullingMask and additional layers like “Buildings”, “Roads”) to ensure all relevant objects (roads, buildings, etc.) are rendered.
  • A render texture (1024x1024 resolution) is attached to the camera to capture its output.
  1. UI Integration:
  • A UI canvas is created in Screen Space Overlay mode to display the minimap on the screen.
  • The render texture from the minimap camera is displayed using a RawImage component, sized to 250x250 pixels and positioned in the bottom-left corner.
  • A border is added around the minimap using an Image component for a polished look.
  • A red triangle marker (created dynamically as a sprite) is overlaid on the minimap to represent the player’s position and direction.
  1. Dynamic Updates:
  • The minimap camera follows the player’s position in real-time, ensuring the map stays centered.
  • The mod supports two rotation modes:
    • Rotating Minimap: The camera rotates with the player’s facing direction, keeping the player marker pointing up.
    • Static Minimap: The camera stays fixed (north-facing), and the player marker rotates to show the player’s direction.
  • Zoom functionality adjusts the camera’s orthographicSize (from 20 to 100 units) based on key inputs (+ and -).
  1. Performance Considerations:
  • The minimap camera only renders the necessary layers to minimize performance impact.
  • The render texture resolution (1024x1024) balances visual quality with performance.
  • All objects (camera, canvas, etc.) are marked with DontDestroyOnLoad to persist across scene changes.

This implementation ensures the minimap is both functional and visually appealing, while being lightweight enough to run smoothly alongside Big Ambitions.

Disclaimer

  • Use at Your Own Risk: This mod is provided “as is” without any warranties. While I’ve tested it thoroughly, I’m not responsible for any issues, crashes, or data loss that may occur while using this mod. Always back up your game files before installing mods.
  • Game Updates: Future updates to Big Ambitions may break compatibility with this mod. If the game updates its layer system, object hierarchy, or rendering, the minimap may not function correctly. I’ll do my best to update the mod as needed, but please report any issues you encounter.
  • Third-Party Software: This mod requires MelonLoader, a third-party modding framework. Ensure you understand the risks of using modding tools, as they may affect your game’s stability or violate the game’s terms of service (if applicable). I’m not affiliated with the Big Ambitions developers or MelonLoader team.

Future Plans

  • Support for additional key bindings (or maybe add buttons) and customization options, or you can suggest a plans.

Credits

  • Thanks to the Big Ambitions community for inspiration and support!

Feedback

I’d love to hear your feedback before we release this! If you have suggestions for new features, please leave a comment below or contact me directly. Enjoy navigating the city with your new minimap! :smile:

3 Likes

Hey buddy! Anywhere I can access the mod? Would love to take it for a spin :slight_smile:

1 Like

Hi @Jonas! Absolutely, you can grab the mod here:

Feel free to give it a spin, and I’d love to hear any feedback :smile:
Screenshot 2025-05-02 055830