Explore and play our game on itch.io:
This project showcases a 2D game setup with:
- 🎯 Dynamic MiniMap: Maintains consistent dot size and view across screen orientations.
- 🎮 Shooter Mechanics: Move the player using arrow keys or WASD, and fire bullets by clicking the mouse.
- 🎥 Main Camera: Ensures consistent player size and visible area, regardless of aspect ratio.
- 🗺️ MiniMap:
- Uses a
RenderTexture
for a top-down view. - Keeps dot size consistent during screen rotation.
- Adjustable visible scene area for flexibility.
- Uses a
- 🎮 Main Camera:
- Dynamically adjusts for aspect ratio changes.
- Maintains player size consistency in portrait and landscape modes.
- 🔫 Shooter Mechanics:
- Move the player using WASD or Arrow Keys.
- Aim using the mouse.
- Shoot bullets by left-clicking.
- Clone the repository:
git clone https://github.com/TwoBitCode/2DMapNavigator.git
- Open the project in Unity (2023.3 or later).
- Open the
SampleScene
to test the setup.
- Player Movement and Shooting:
- Move with arrow keys or WASD.
- Aim with the mouse.
- Shoot bullets with the left mouse button.
CameraAdjusterConstantArea
:- Dynamically adjusts the orthographic size of the Main Camera to maintain a consistent visible area.
- Ensures the player's size remains consistent.
MiniMapCameraAdjuster
:- Fixes the orthographic size of the MiniMap Camera for a stable top-down view.
- Keeps the MiniMap unaffected by screen orientation changes.
- Adjust the
speed
andlifeTime
for bullets in the Player and Bullet scripts to fine-tune gameplay. - Modify the
desiredSceneArea
in each script:- Main Camera: Set it for the main gameplay area.
- MiniMap Camera: Control the zoom level of the MiniMap.
- Vivian Umansky
- Miriam Nagar