Skip to content

Bringing High Definition to MTA's HUD - #5265

Draft
MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:feat/modern-hd-radar-and-map
Draft

Bringing High Definition to MTA's HUD#5265
MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:feat/modern-hd-radar-and-map

Conversation

@MohabCodeX

Copy link
Copy Markdown
Contributor
Untitled-2

Motivation

1080p has long become the standard resolution for playing MTA, yet the game's HUD, radar, and map textures are still running on low-resolution assets designed for the PS2 era back when total system RAM was only 32 MB.

This PR upgrades the visual clarity of the game by moving from low-resolution 512 assets to crisp 2048 HD textures. No shapes or styles were changed; everything keeps the authentic GTA:SA look, just with sharp high-definition assets.

DirectX PNG Streaming vs TXDs

  • Radar & F11 Map (DirectX PNG Streaming): The San Andreas map is built of 144 separate tiles. Streaming individual PNGs via Direct3D enables on-demand tile loading, zero-blur bilinear filtering, and full compatibility with MTA's interactive Big Map controls.
  • HUD, Weapons & Fonts (High-Res TXDs): Compact sets like weapon icons, crosshairs, and fonts remain in clean TXD packages (weapons.txd, fonts.txd, hud.txd) to integrate directly with GTA:SA native dictionary lookups.

Why implement this natively in C++ instead of Lua?

Doing this in C++ provides several advantages:

  • Performance: Avoids heavy per-frame Lua scripts and garbage collection overhead. Textures are handled directly in the native Direct3D and RenderWare pipeline.
  • Consistency: Fully synchronized with native camera movement, vehicle speed, and game states without requiring custom math workarounds.
  • Accessibility: Available to every player on every server out of the box, without requiring server owners to install custom Lua scripts.

Memory & VRAM Impact

  • Old assets: ~7 MB VRAM
  • New HD assets: ~35 to 50 MB VRAM

The extra ~40 MB footprint is negligible.

What's Changed in this PR

1. Interactive F11 Big Map

  • Streamed 144 HD PNG tiles with bilinear filtering for sharp visuals at any zoom level.
  • Added click-and-drag with the left mouse button to pan around the map smoothly alongside standard keyboard controls.
  • Enabled smooth mouse wheel zooming from 0.45x (full island view) up to 16.0x, saved automatically in the map_zoom cvar.
  • Added an ocean backdrop using GTA's authentic sea color (RGB: 104, 136, 168) rendered outside map bounds to prevent dark overlapping edges.
  • Right-clicking anywhere places a destination waypoint that mirrors onto the minimap and automatically clears when you arrive within 15 meters.
  • Fixed mouse wheel zooming inside vehicles so it no longer accidentally switches radio stations.
  • Added a clean centered control guide at the bottom using the Bank Gothic font.

2. Minimap & Dynamic Speed Zoom

  • High-resolution minimap tile rendering.
  • Smooth dynamic zoom that expands the radar view as your vehicle or aircraft speed increases.

3. HUD, Weapon Icons & Fonts

  • HD icons for all 47 GTA:SA weapons and crosshairs with bilinear filtering.
  • HD fonts rendered cleanly without jagged edges.
  • HD altitude indicators (up, down, square) and radar blip icons.

Future Roadmap

This PR is the foundational step of a broader modernization effort. Planned next steps include:

  • Dynamic HUD Scaling & Custom Positioning:

    • Making the entire HUD responsive to fit 16:9 widescreen and high-DPI displays properly instead of the stretched 4:3 layout.
    • Adding Lua API functions to customize individual HUD element positions, offsets, and scale (e.g. moving the health bar, armor, money, or clock anywhere on the screen).
  • Custom Weapon Icons & Textures:

    • Lua functions allowing developers to dynamically replace weapon icons and crosshairs with custom images or dx-textures per weapon or custom weapon model.
  • Extended Radar Customization APIs:

    • Functions for arbitrary radar positioning and sizing.
    • Switching radar shape between circular and rectangular/square styles.
    • Blip edge clamping, custom blip textures, and distance-based blip fading.

Credits & Special Thanks

  • HD Fonts: DJDarko
  • HD HUD: headhunter93rus
  • HD Weapon Icons: RRT94
  • HD Radar Tiles: Community source used by rifleh700.
  • Special Thanks: rifleh700 for his work on mradar, which served as great inspiration for bringing these features into the native C++ core.

- Upgraded the in-game radar and F11 map to use crisp HD textures instead of low-res files.
- Modernized the F11 big map with smooth mouse dragging, mouse wheel zooming, and a clean ocean background.
- Added a simple right-click destination waypoint that clears automatically when you arrive.
- Added dynamic radar zoom that smoothly adjusts based on vehicle and aircraft speed.
- Upgraded the HUD with high-definition weapon icons, crosshairs, and cleaner font rendering.
- Fixed control conflicts such as the mouse wheel accidentally changing radio stations while zooming.
@Fernando-A-Rocha

Copy link
Copy Markdown
Contributor

W o w !!! What are the new Lua functions/events?

@ffsPLASMA

Copy link
Copy Markdown
Contributor

I wouldnt say ~35 to 50 MB of VRAM are negligible. There are still lots of users with old ass hardware. And even then, those 50 MB can decide whether you run out of memory or not when playing on some unoptimized servers.

So a checkbox in settings toggling it would be the best solution.

@MohabCodeX

Copy link
Copy Markdown
Contributor Author

W o w !!! What are the new Lua functions/events?

To keep it simple, I focused only on visual improvements. The rest will come in separate PRs later. Eventually, we’ll be able to customize HUD sizes, positions, and more.

I wouldnt say ~35 to 50 MB of VRAM are negligible. There are still lots of users with old ass hardware. And even then, those 50 MB can decide whether you run out of memory or not when playing on some unoptimized servers.

So a checkbox in settings toggling it would be the best solution.

Good point. I also think that PR needs to be discussed before merging.

@Dryxio

Dryxio commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

I think a lot can be optimized here, unless I missed something, the F11 map loads all 144 png tiles at once and keeps them alive so it's not really streaming, at 256x256 RGBA it's already around 36 MB just for the F11 tiles

Check about the fact that DXT5 is used on fully opaque tiles instead of DXT1 (is there a reason to use DXT5?)

also noticed most of hud.txd and the crosshairs being uncompressed. This alone you'll probably gain 50-70%, noticed some other stuff but need to test

@FileEX FileEX added the enhancement New feature or request label Aug 24, 2026
@MohabCodeX

Copy link
Copy Markdown
Contributor Author

Since this will require quite a bit of discussion, I’ll keep it as a Draft for now.

@MohabCodeX
MohabCodeX marked this pull request as draft August 28, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants