• Welcome to PiBoSo Official Forum. Please login or sign up.
 
November 30, 2022, 09:35:29 PM

News:

GP Bikes beta20e available! :)


MaxHUD plugin

Started by HornetMaX, September 26, 2013, 04:34:50 PM

Previous topic - Next topic

iNsane

Gotcha, thanks for the explanation! :)


   🌐 MX Bikes custom content
MXB-Mods.com

   📚 MX Bikes User Wiki
MXB-Wiki.com

   💸 Feel free to donate
PayPal

Rox75009

Hey @HornetMaX,

First of all, thanks for created this great plug-in!

I am conducting a research for my final design thesis on HUDs for motorcycles. I'll be testing Real prototyped HUDs on GP Bikes to test it. 

So far, I've worked with Processing and the output/telemetry plug-in to get data from the simulation.


import hypermedia.net.*;
int PORT_RX=30001;
String HOST_IP="127.0.0.1";
UDP udp;

int pos;

void setup() {
  udp= new UDP(this,PORT_RX,HOST_IP);
  //udp.log(true);
  udp.listen(true);
}


void receive(byte[] data, String HOST_IP, int PORT_RX) {
   
  pos = 25;
  int gear = (data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24);
 
  pos = 33;
  int speed = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*3.6);
   
/* etc...*/
}

However, I would love to get the Map of the MaxHUD plug-in to work with my code. I could I retrieve it (and play with the parameters) ? What kind file is it ?

(I am not so great at coding but with some explanation, I could get it I think)

Many thanks!

HornetMaX

Quote from: Rox75009 on August 04, 2022, 10:07:04 AMHowever, I would love to get the Map of the MaxHUD plug-in to work with my code. I could I retrieve it (and play with the parameters) ? What kind file is it ?

(I am not so great at coding but with some explanation, I could get it I think)

Many thanks!
Hi there, not sure what you mean exactly but I suppose you want to have something similar to the HUDMap widget (i.e. a 2d or 3d representation of the track).

GPB passes to the plugin the centerline of the track. The format is relatively simple: a bunch of SPluginsTrackSegment_t, each of them being either straight segment or an arc (part of a circle).

Relevant code in the output plugin example from PiBoSo:
typedef struct
{
int m_iType; /* 0 = straight; 1 = curve */
float m_fLength; /* meters */
float m_fRadius; /* curve radius in meters. < 0 for left curves; 0 for straights */
float m_fAngle; /* start angle in degrees. 0 = north */
float m_afStart[2]; /* start position in meters */
float m_fHeight; /* start height in meters */
} SPluginsTrackSegment_t;

/*
_pRaceData is a pointer to a float array with the longitudinal position of the start / finish line, splits and speedtrap.
This function is optional
*/
__declspec(dllexport) void TrackCenterline(int _iNumSegments,SPluginsTrackSegment_t *_pasSegment,void *_pRaceData)
{

}

Rox75009

Yeah, you got it right. I would like to have a 2D representation of the track . Thanks for explaining how the track's centerline is done (with segments and arcs)!

However, I don't get how to properly:
- call the function (in my case in Processing);
- do as you did in the maxHUD Map Widget, display the 50m upcoming track (rotating the map to keep the player always facing up). <-- This is what I want to achieve!

Rox75009

Quote from: Rox75009 on August 08, 2022, 12:12:53 PMYeah, you got it right. I would like to have a 2D representation of the track . Thanks for explaining how the track's centerline is done (with segments and arcs)!

However, I don't get how to properly:
- call the function (in my case in Processing);
- do as you did in the maxHUD Map Widget, display the 50m upcoming track (rotating the map to keep the player always facing up). <-- This is what I want to achieve!

Would be really appreciated if someone could help me here 🙏🏻

Chris_Beeves

Quote from: Rox75009 on August 10, 2022, 01:25:52 PMWould be really appreciated if someone could help me here 🙏🏻
Start your own thread with this, it really doesn't have anything to to with MaxHUD.
I had to try..

iNsane

hey Max, we've just recently discovered that by using MaxHud on a specific MXB track, the game crashes with a C++ Runtime error. PiBoSo figured it was due to MaxHud, I tried it as well and can confirm that it only crashes with MaxHud enabled.
I'll send you a DM with the track link, would be awesome if you'd got the time to debug and fix this :) We appreciate it big time!





   🌐 MX Bikes custom content
MXB-Mods.com

   📚 MX Bikes User Wiki
MXB-Wiki.com

   💸 Feel free to donate
PayPal

HornetMaX

Quote from: iNsane on October 19, 2022, 02:02:09 PMhey Max, we've just recently discovered that by using MaxHud on a specific MXB track, the game crashes with a C++ Runtime error. PiBoSo figured it was due to MaxHud, I tried it as well and can confirm that it only crashes with MaxHud enabled.
I'll send you a DM with the track link, would be awesome if you'd got the time to debug and fix this :) We appreciate it big time!
Hi,

what do you mean exactly with "it crashes" ? At startup ? When you go to track ? After riding a few meters ? Always at the same spot ? Randomly after a few secs/minutes ? Context, plz :)

Also:
  • I don't understand what you want to show with the screen capture above.
  • The .pkz is named "Jones_AX2.pkz" but the folder inside is "Jones AX2" (OK I can fix that by myself, just FYI). EDIT: doh, you told me about that in your DM, sorry.
  • In your racedata (.rdf) you have finishline, holeshot, split1 & split2 all at the same place. Maybe this screws MaxHUD (or even MXB). Not sure it's good practice.

wiper

Hello Max,

first of all and most importantly:  Thanks a lot for your hard work !  This phantastic plugin is a must have for a sim nut like myself :-)

As for my issue I think the actual zip archive seems corrupted ( "MaXHUD - v2.2.6.zip" on the Mega site ). Any of the downloads I tried last weeks ended with a 0 bytes zip result. Would be great if you could check that out.
Luckyly you also provided the beta dlo. With it I could get the latest GPB version working using the 2.2.5 content.
The latest MXB (beta)version though doesn't like 2.2.5 it seems: no ini created, no log. Guess I have to roll back to an older MXB installer for the time beiing ( which I cant find atm...)

Anyways, thanks in advance for your efforts and all the best for your next versions/projects !

Cheers Walter

HornetMaX

November 01, 2022, 12:58:04 AM #1044 Last Edit: November 01, 2022, 01:00:06 AM by HornetMaX
Quote from: wiper on October 31, 2022, 02:24:49 PMAs for my issue I think the actual zip archive seems corrupted ( "MaXHUD - v2.2.6.zip" on the Mega site ). Any of the downloads I tried last weeks ended with a 0 bytes zip result. Would be great if you could check that out.
Seems to work fine here for me, I can download 2.2.6 without any problem. Can you try with a different browser ?

BTW, 2.2.6beta should not be used.

EDIT: I re-uploaded the archive just in case.

wiper

Thanks for reupload !
Instant success downloading it. Strange though ..

davidboda46

Hi Max.
Have a question. I have a Logitech Rumble Pad 2 USB controller mounted on my steering wheel. Use it for rider movement and buttons. Is there a way to activate the rumble function on it to work with MaxHUD. When I go to the rumble widget, I can only scroll through 4 Xinput devices and they are all disconnected. The controller is working fine for everything else (ie it shows up in other widgets as Logitech RumblePad 2) but not in "rumble". I'm not to clever when it comes to Xinput and such.... Can I add the controller in the ini file or do I have to use x360e or something like that, or is it even possible?

Cheers,

/David "Gonzo" Boda #46
"THE EDGE... THERE IS NO HONEST WAY TO EXPLAIN IT BECAUSE THE ONLY PEOPLE WHO REALLY KNOW WHERE IT IS ARE THE ONES WHO HAVE GONE OVER"

HornetMaX

Hi David, looks like your pad is not seen as an xinput pad, so no joy.
A quick search on the web (Logitech Rumble Pad 2 xinput) brings up a lot of results of people with troubles using that pad in xinput games. There may be a solution via x360ce (e.g. here), but it may be a bit messy.

But why would you want the rumble active on a pad mounted on your steering wheel ? Just curious ...

davidboda46

Quote from: HornetMaX on November 10, 2022, 03:20:04 PMHi David, looks like your pad is not seen as an xinput pad, so no joy.
A quick search on the web (Logitech Rumble Pad 2 xinput) brings up a lot of results of people with troubles using that pad in xinput games. There may be a solution via x360ce (e.g. here), but it may be a bit messy.

But why would you want the rumble active on a pad mounted on your steering wheel ? Just curious ...

Just for a bit of immersion I guess. The force feedback is unusable with my rig, the feedback is too high even at 25% and since the wheel itself is an old SW FF wheel I can't use the dedicated software to change the wheel's proprietary force feedback sensitivity. And my "wheel" is "The Thing"... https://forum.piboso.com/index.php?topic=5163.msg78677#msg78677. The board in the left side of the handlebar broke, and I could not solder it back to life so I stuck a full gamepad there instead... Never played GPB with a rumble controller so I was mostly curious.

Cheers,

David "Gonzo" Boda #46
"THE EDGE... THERE IS NO HONEST WAY TO EXPLAIN IT BECAUSE THE ONLY PEOPLE WHO REALLY KNOW WHERE IT IS ARE THE ONES WHO HAVE GONE OVER"