Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,350 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

In45do

GTA SA : Rectangular HUD

Recommended Posts

In45do

Hello guys! As the titles says I want to make a rectangular shape for GTA SA! This progress cannot be done without Alexander Blade's IV HUD so thanks so much to this guy. Anyway I already start to create the rectangular shape HUD and 'maybe' look like GTA V HUD.
I make 2 different version of the HUD, so you can choose which one is your favorite! The usual HUD settings is already exist in both version of the HUD. (It's best to use Multi Player Edition when playing with SA:MP).

I've made new HUD that match for your different graphics condition. It's called graphical HUD, you can download it if the old HUD are too big or ugly.

Please everyone who want to publish it, ask my PERMISSION FIRST!
(I will add a link where all FAKE AUTHOR claim my mod)
STEALER LIST :

- AndersonNatera94
- Ken-Spectre
- THEBOSS
- Honorv

- mielkas1995

- archerhercules786
(Note: - If you seen a mods with author, THEBOSS, it's 100& stolen!)

Video tutorial made by ThxIvanithox and Dede Yonata :

 

 

 

 



This is usual HUD settings :
- Fixed rectangular radar! (Thanks to DK22Pac and Wesser)
- New Blood texture around the HUD!
- Rectangular HUD! (Misc)
- Rectangular shape for health bar!
- Rectangular shape for armor bar!
- Bonus : 5 star wanted level system!
- Bonus : IV blips (latest version)!

Single Player Edition :
- Rectangular shape for special ability bar!
- New parachute bar position!
Fixed Alternate Link

Multi Player Edition :
- Only have health and armor bar!
- Old parachute bar position.
Fixed Alternate Link

 

New! Graphical HUD :

- Smaller HUD
- New phone texture ( IFruit )
- HQ Health bar
- HQ Armor bar
- HQ Special ability bar (SP Version)
- Smaller altitude bar
- Smaller radar centre

Note:
*There is a reason why I keep the old parachute bar position, it's because I don't want to screw the fun when playing SA:MP (San Andreas : Multi Player), if you falling with parachute or flying with vehicles, it wouldn't block your radar.

*You have to know that special ability bar that I'm talking about is armor bar. So the works of this special ability is that you can take so much heat before your armor decrease!

*New wanted level system (like in GTA V), maximum is 5!

The file is uploaded and waiting for approval. Use alternate link to download! Sorry for my bad English.

Edited by In45do

Share this post


Link to post
Share on other sites
Mega

Now that's really cool, I'll be sure to try it out soon enough and give my review on it!

 

Do you plan on a possible Vice City/IV version anytime soon? Just wondering.

Share this post


Link to post
Share on other sites
In45do

Thanks! biggrin.gif

 

I can't edit the mod in Vice City and GTA IV, I'm just retexturing.

Share this post


Link to post
Share on other sites
Gramps

Send a PM to SilentPL. He knows how to change the radar into many shapes, I've seen him do square/rectangle and even triangles.

 

I did see this mod yesterday on GTAGarage, and was talking to him on Skype @ the same time, but it was 3AM in Poland @ that time, and he was heading to bed; but I did quickly mention it to him.

 

Looks great so far, keep it up.

Share this post


Link to post
Share on other sites
GamerShotgun

Now if someone could do a similar styled radar, but with 2.5D and changing views, that would be awesome.

Share this post


Link to post
Share on other sites
Stryfaar

Looking pretty cool. Can't wait to see this mod progress a bit more. Maybe do that 3D radar thing that V features? Good luck! smile.gif

 

 

Send a PM to SilentPL. He knows how to change the radar into many shapes, I've seen him do square/rectangle and even triangles.

+1. icon14.gif Widescreen support would be cool too.

Share this post


Link to post
Share on other sites
elMarcoPL

Nice one, I like it.

Share this post


Link to post
Share on other sites
Musi

This is f*cking awesome. Good job, man! Keep it up!

Share this post


Link to post
Share on other sites
Maryo_Nicle7

Very nice! icon14.gificon14.gif I will test it after my computer repaired smile.gif

Share this post


Link to post
Share on other sites
Wesser

Okey, I was curious about giving any kind of shape to the radar. I figured out 0x005832F0 function is responsible for the map boundaries of radar sprites, whereas 0x00585700 hides the pixels of the combined map tiles that are beyond a distance equal to the map size by giving a circular look. I'll prepare the script if you are interested. icon14.gif

Share this post


Link to post
Share on other sites
In45do
Okey, I was curious about giving any kind of shape to the radar. I figured out 0x005832F0 function is responsible for the map boundaries of radar sprites, whereas 0x00585700 hides the pixels of the combined map tiles that are beyond a distance equal to the map size by giving a circular look. I'll prepare the script if you are interested. icon14.gif

Thanks guys for the support! biggrin.gif

 

And about that script I think I can test it out. Anyway I need a good modders for this. Your name will be in the credit, Wesser, if it works. Again thanks alot! biggrin.gif

Share this post


Link to post
Share on other sites
Wesser

Once you know where to put your hands on, everything becomes easy. It does already work decently. Here is a screen (don't care about player clothes as they come from a downloaded savegame tounge.gif):

 

user posted image

 

Oh, that image spoilers something (visual) upcoming but I won't reveal anything.

Edited by Wesser

Share this post


Link to post
Share on other sites
DK22Pac

Also tried to make this. link

Does anyone know how that 3d map works in V's HUD? Maybe I'll try to make it too tounge.gif

@Wesser Nice icon14.gif

Share this post


Link to post
Share on other sites
In45do

Wow! You did good! Can I add it to this mod? I will canceled the files that waiting for approval and make a little settings.

Good job, Wesser! icon14.gif

 

@DK22Pac Thanks for helping too! biggrin.gif Anyway I'm your fan... blush.gif

 

EDIT: @DK22Pac I think the 'North' sign is flipped, I mean the North now heading South. Any fix for this?

Edited by in45do

Share this post


Link to post
Share on other sites
Wesser

 

Also tried to make this. link

Indeed, your solution is far more complex than mine but you can make an easier and faster routine yet. I would say using sqrt, atan2 and sin/cos trigonometric functions for computing the distance between a point and an axis-aligned rectangle means cutting your own throat. You can reduce it by doing just a square root (actually, there is even a workaround way but it ruins the aim of the original function). icon14.gif

 

I wanna show you my attempts:

  • Method 1: Clamp a point according to the rectangle boundaries (game related, fastest):

     

    #include <float.h>struct SRwV2d {   float m_fX;   float m_fY;};struct SRwRect {   float m_fLeft;   float m_fTop;   float m_fRight;   float m_fBottom;   void SetBounds(float fLeft, float fTop, float fRight, float fBottom) {       m_fLeft = fLeft;       m_fTop = fTop;       m_fRight = fRight;       m_fBottom = fBottom;   }};float clampWithinBounds(float fValue, float fMin, float fMax) {   return fValue > fMin ? (fValue < fMax ? fValue : fMax) : fMin;}void testPointWithinAARect(SRwV2d *pstPoint, SRwRect *pstRect, SRwV2d *pstClamp, float *pfDist) {   if(pstPoint->m_fX < pstRect->m_fLeft   || pstPoint->m_fY < pstRect->m_fTop   || pstPoint->m_fX > pstRect->m_fRight   || pstPoint->m_fY > pstRect->m_fBottom) {       pstClamp->m_fX = clampWithinBounds(pstPoint->m_fX, pstRect->m_fLeft, pstRect->m_fRight);       pstClamp->m_fY = clampWithinBounds(pstPoint->m_fY, pstRect->m_fTop, pstRect->m_fBottom);       *pfDist = 1.0f + FLT_EPSILON;       return false;   }   pstClamp->m_fX = 0.0f;   pstClamp->m_fY = 0.0f;   *pfDist = 0.0f;   return true;}float getPointAARectDistance(SRwV2d *pstPoint) {   SRwRect stRect;   SRwV2d stClamp;   float fDist;   stRect.SetBounds(-1.0f, -1.0f, 1.0f, 1.0f);   if(!testPointWithinAARect(pstPoint, &stRect, &stClamp, &fDist)) {       pstPoint->m_fX = stClamp.m_fX;       pstPoint->m_fY = stClamp.m_fY;   }   return fDist;}

     

     

  • Method 2: Check for point-edges perpendicularity and point-vertices obliqueness (fast):

     

    #include <math.h>#include <float.h>struct SRwV2d {   float m_fX;   float m_fY;};struct SRwRect {   float m_fLeft;   float m_fTop;   float m_fRight;   float m_fBottom;   void SetBounds(float fLeft, float fTop, float fRight, float fBottom) {       m_fLeft = fLeft;       m_fTop = fTop;       m_fRight = fRight;       m_fBottom = fBottom;   }};float clampWithinBounds(float fValue, float fMin, float fMax) {   return fValue > fMin ? (fValue < fMax ? fValue : fMax) : fMin;}float isWithinEpsilonAbs(float fValue, float fCheck) {   return fabs(fValue - fCheck) < FLT_EPSILON;}bool testPointWithinAARect(SRwV2d *pstPoint, SRwRect *pstRect, SRwV2d *pstClamp, float *pfDist) {   float fPointX, fPointY, fClampX, fClampY, fDistX, fDistY;   fPointX = pstPoint->m_fX;   fPointY = pstPoint->m_fY;   fClampX = clampWithinBounds(fPointX, pstRect->m_fLeft, pstRect->m_fRight);   fClampY = clampWithinBounds(fPointY, pstRect->m_fTop, pstRect->m_fBottom);   if(pstClamp) {       pstClamp->m_fX = fClampX;       pstClamp->m_fY = fClampY;   }   if(pfDist) {       fDistX = fPointX - fClampX;       fDistY = fPointY - fClampY;       // Is the point outside the rectangle?       if(fDistX) {           // Is the point in one of the outer squared regions in front of vertices?           if(fDistY) {               // Isn't the point oblique relative to one of the vertices?               if(!isWithinEpsilonAbs(fDistX, fDistY)) {                   *pfDist = sqrt((fPointX * fPointX) + (fPointY * fPointY));               // The point lies on one of the rectangle (square) diagonals.               } else {                   *pfDist = fabs(fDistX) * (float)M_SQRT2;               }           // The point is perpendicular to one of the edges on the Y axis.           } else {               *pfDist = fabs(fDistX);           }       // Is the point still outside the rectangle and perpendicular to one of the edges on the X axis?       } else if(fDistY) {           *pfDist = fabs(fDistY);       // The point either lies on the border or is inside the rectangle and thus perpendicular to one of the edges.       } else {           fPointX = fabs(fPointX);           fPointY = fabs(fPointY);           *pfDist = 1.0f - (fPointX < fPointY ? fPointX : fPointY);           return true;       }       return false;   }   return fPointX == fClampX && fPointY == fClampY;}float getPointAARectDistance(SRwV2d *pstPoint) {   SRwRect stRect;   SRwV2d stClamp;   float fDist;   stRect.SetBounds(-1.0f, -1.0f, 1.0f, 1.0f);   if(!testPointWithinAARect(pstPoint, &stRect, &stClamp, &fDist)) {       pstPoint->m_fX = stClamp.m_fX;       pstPoint->m_fY = stClamp.m_fY;       return 1.0f + fDist;   }   return fDist;}

     

     

  • Method 3: Compute the distance between a point and each edge of the rectangle (the general algorithm, slower).

     

Does anyone know how that 3d map works in V's HUD? Maybe I'll try to make it too tounge.gif

Do you think that grabbing the scene from another RwCamera would work? I never put such an assumption in practice (duh, my bad, I thought about a proper 3D map).

 

 

Wow! You did good! Can I add it to this mod?

Thank you both. It has been planned strictly for my purposes but I can donate it without any problems.

Edited by Wesser

Share this post


Link to post
Share on other sites
In45do

@DK22Pac Thanks for the modification! I already include your name in this mod!

@Wesser Again, thank you, Wesser! I really cannot done this without your help, and I already include your name in this mod!

 

Thanks to everyone for supporting this mod! icon14.gif

 

 

Share this post


Link to post
Share on other sites
ThirteenAG
Thank you both. It has been planned strictly for my purposes but I can donate it without any problems.

How about someone will create a repository at github or some other place and everyone can contribute to such a project(i mean GTA V hud, not based on IV hud asi)?

Share this post


Link to post
Share on other sites
Ash_735

Interesting, Silent messed around with this before we even knew what the GTAV Radar looked like (he also made a Triangle Radar just for laughs), he would let you guys know what's up but I think it's probably be the same as Wesser's (which reminds me man, when you coming to join the party wink.gif)

Share this post


Link to post
Share on other sites
TJGM

 

How about someone will create a repository at github or some other place and everyone can contribute to such a project(i mean GTA V hud, not based on IV hud asi)?

+1

 

Anyway, how about you change the special meter to lung capacity instead? Having the armour in both bars makes the OCD side of me tick..

Edited by TheJAMESGM

Share this post


Link to post
Share on other sites
SilverRST
Interesting, Silent messed around with this before we even knew what the GTAV Radar looked like (he also made a Triangle Radar just for laughs), he would let you guys know what's up but I think it's probably be the same as Wesser's (which reminds me man, when you coming to join the party wink.gif)

Polski people and Ruski people are always the best coders lol

The mod looks really nice and cool. Might wanna try.

 

Btw, what about that thing meter when you jump out of a plane? Does it stay the same?

Share this post


Link to post
Share on other sites
DK22Pac
@DK22Pac I think the 'North' sign is flipped, I mean the North now heading South. Any fix for this?

Sure, here's fixed version

 

@Wesser Did you mean offline rendering or what?

Share this post


Link to post
Share on other sites
johnny404
@DK22Pac I think the 'North' sign is flipped, I mean the North now heading South. Any fix for this?

Sure, here's fixed version

 

@Wesser Did you mean offline rendering or what?

What does that .asi do exactly? because it doesn't do anything in my game

Share this post


Link to post
Share on other sites
Wesser

 

How about someone will create a repository at github or some other place and everyone can contribute to such a project(i mean GTA V hud, not based on IV hud asi)?

I don't know why are you telling me so. Are you referring to a hypothetical GTA V HUD whereon I might working? No, it isn't any of this. tounge.gif

 

 

Interesting, Silent messed around with this before we even knew what the GTAV Radar looked like (he also made a Triangle Radar just for laughs), he would let you guys know what's up but I think it's probably be the same as Wesser's...

Yeah, it's easy at the end. I doubt Silent has done any odd computation if it was intended just for fun. icon14.gif

 

 

.. (which reminds me man, when you coming to join the party wink.gif)

Silent is "bothering" me sometime by asking when this day will come. Everytime I reply on by saying that I will join when I will complete some projects (they are few however, whether this can be fulfilling or not). tounge.gif

 

 

@Wesser Did you mean offline rendering or what?

Not exactly, but nevermind. wink.gif

Share this post


Link to post
Share on other sites
ThirteenAG
I don't know why are you telling me so. Are you referring to a hypothetical GTA V HUD whereon I might working? No, it isn't any of this. tounge.gif

No, i'm just wondering if anyone is interesting of creating the open source(based on GitHub) GTA V hud for SA, that's all. Probably the bad idea smile.gif

Share this post


Link to post
Share on other sites
Silent
I doubt Silent has done any odd computation if it was intended just for fun. icon14.gif

I ended up using some linear function calculations (finding a function which had radar centre and the point as values and then find its value for radar edges).

Share this post


Link to post
Share on other sites
DK22Pac

I remember I wanted to ask coding community for helping me with IV hud project (really ambitious thing as I think, despite the fact that it has cop searching and pathfind system), but I leave that idea for some reason.

Share this post


Link to post
Share on other sites
Wesser

 

I don't know why are you telling me so. Are you referring to a hypothetical GTA V HUD whereon I might working? No, it isn't any of this. tounge.gif

No, i'm just wondering if anyone is interesting of creating the open source(based on GitHub) GTA V hud for SA, that's all. Probably the bad idea smile.gif

Sadly, there are meager chance to get even few people involved into the project. confused.gif

 

 

I doubt Silent has done any odd computation if it was intended just for fun. icon14.gif

I ended up using some linear function calculations (finding a function which had radar centre and the point as values and then find its value for radar edges).

Are you talking about the third method I mentioned by calculating the dot product between a point and every rectangle side and testing the lowest value?

 

 

I remember I wanted to ask coding community for helping me with IV hud project (really ambitious thing as I think, despite the fact that it has cop searching and pathfind system), but I leave that idea for some reason.

Personally, I would have given more priority to my projects and might have done something occasionally for IV HUD, but the pathfind system holds all of my interest about the modification (because I'm still trying to find a way to draw curvilinear bends, even though it would require adapting the algorithm for generating blurred rotors which still needs to be fixed somewhere though).

Share this post


Link to post
Share on other sites
Silent
Are you talking about the third method I mentioned by calculating the dot product between a point and every rectangle side and testing the lowest value?

Not sure, possibly tounge.gif

 

Haven't thought about calculating a dot product... what relevant info would it give?

Share this post


Link to post
Share on other sites
Wesser

It has many applications in more subjects. It becomes useful for calculating angles between vectors, lengths of vectors and such. In our case, it gives the distance between a point and a line by considering that:

  • If negative, the point lies on the left side of the line;
  • If zero, the point lies onto the line;
  • If positive, the point lies on the right side of the line.
I may be wrong, so I'm awaiting for some corrections. smile.gif

Share this post


Link to post
Share on other sites
Silent

Still, I think we could get away with checking if length^2 > 1.0 (to save an expensive sqrt) then finding a linear function which has (0,0) and (blipX, blipY) within it and then finding a value for 1/-1 argument (actually, either dot product or just an angle between (0,1) and blipX and blipY may be useful here).

 

I haven't really implemented it into the code (I think the screen was taken with basic 'squareish' coords clipping, which is very inaccurate), but I think it should work (with possible alterations, obv).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.