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.

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.

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.

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.

Thanks guys for the support!

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!

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).

I wanna show you my attempts:

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

// 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);

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!

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 )

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 )

Polski people and Ruski people are always the best coders lolThe 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?

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 VHUD whereon I might working? No, it isn't any of this.

QUOTE (Ash_735 @ Monday, Aug 5 2013, 20:30)

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.

QUOTE (Ash_735 @ Monday, Aug 5 2013, 20:30)

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

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).

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.

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

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

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

QUOTE (SilentPL @ Monday, Aug 5 2013, 23:39)

QUOTE (Wesser @ Tuesday, Aug 6 2013, 00:24)

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

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?

QUOTE (DK22Pac @ Monday, Aug 5 2013, 23:42)

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).

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:

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).