2020-08-12 snapshot

Post anything about MX Simulator here. Please. I'm begging you.
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

2020-08-12 snapshot

Post by jlv »

Changes:
  • Use double precision for 1st person gimbal to prevent jitter when running for extremely long times.
  • Fixed flaggers not working in demos.
  • Now sends more ping packets when spectating to work around buggy networks dropping connections.
  • Added mx.cache_pose_sequence() and mx.pose_statue_from_sequence() for more efficient posing.
Windows users: https://mxsimulator.com/snapshots/mx-20 ... 2-1530.exe
Linux users: https://mxsimulator.com/snapshots/mxbin-2020-08-12-1530

Replace mx.exe or mxbin with one of the above files. The default location for mx.exe should be "C:\Program Files (x86)\MX Simulator". I'd keep a backup of the originals since these aren't well tested.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2020-08-12 snapshot

Post by jlv »

There's an example of using mx.cache_pose_sequence() and mx.pose_statue_from_sequence() here.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
BcMxKx37
Posts: 1723
Joined: Sun Jun 02, 2013 5:20 am
Location: Costa Mesa, CA
Contact:

Re: 2020-08-12 snapshot

Post by BcMxKx37 »

thanks jlv
Image
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: 2020-08-12 snapshot

Post by DJ99X »

Beautiful work! They are much better than the billboard versions!

Just a query - was this bit of code to keep the script functional on older snapshots? If so, I was getting alot of errors when I tried the track before I recalled that I hadn't installed the snapshot

Code: Select all

function cache_pose_sequence(anim) {
	if ("cache_pose_sequence" in mx)
		anim.cached_poses = mx.cache_pose_sequence(anim);
}
Suggestion - reckon you could add a few functions for reading some information from statues/billboard files etc? Seems messy to have to declare initial locations in both those files and the frills script. Would also be nice to register statue/billboard indexes for common statues/billboards on starting as opposed to hard coding statue indexes into the script. Not sure if that would be better off being done by having a new statues/billboards file that has some kind of grouping/type tag.
DJ99X
Posts: 15523
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: 2020-08-12 snapshot

Post by DJ99X »

In addition to that, possibly another file for scripted particles that is just a list of additional textures to load. Would be good to be able to create/delete billboards through the script, instead of having to declare hundreds of them in billboards file, and have to hide them under the map/scale to 0 if you don't need them.
white327
Posts: 263
Joined: Thu Apr 18, 2013 6:48 pm
Team: MotoPro GFX

Re: 2020-08-12 snapshot

Post by white327 »

im gonna miss the moonwalk :(
Image
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2020-08-12 snapshot

Post by jlv »

DJ99X wrote:Beautiful work! They are much better than the billboard versions!

Just a query - was this bit of code to keep the script functional on older snapshots? If so, I was getting alot of errors when I tried the track before I recalled that I hadn't installed the snapshot

Code: Select all

function cache_pose_sequence(anim) {
	if ("cache_pose_sequence" in mx)
		anim.cached_poses = mx.cache_pose_sequence(anim);
}
Suggestion - reckon you could add a few functions for reading some information from statues/billboard files etc? Seems messy to have to declare initial locations in both those files and the frills script. Would also be nice to register statue/billboard indexes for common statues/billboards on starting as opposed to hard coding statue indexes into the script. Not sure if that would be better off being done by having a new statues/billboards file that has some kind of grouping/type tag.
I did test it on the old version but added the interpolation afterwards and inadvertently broke it. It was the fractional value used as an array index for the old way in pose_animate_frame(). Should have looked like this instead:

Code: Select all

	if ("cached_poses" in anim)
		mx.pose_statue_from_sequence(statue_index, anim.cached_poses, frame);
	else {
		frame = Math.floor(frame);
		mx.pose_statue(statue_index, anim.bone_count, anim.rest_centers, anim.poses[frame].centers, anim.poses[frame].rotations);
	}
Definitely is a mess hand counting statue indices. I was thinking I'd make it have a find statue by model/texture function and maybe one to just add a statue. Not 100% sure it's a good idea to allow adding statues after initialization so I might limit that to only work during initialization.
DJ99X wrote:In addition to that, possibly another file for scripted particles that is just a list of additional textures to load. Would be good to be able to create/delete billboards through the script, instead of having to declare hundreds of them in billboards file, and have to hide them under the map/scale to 0 if you don't need them.
You want to set its alpha to 0 disable it (mx.color_billboard(idx, 0, 0, 0, 0)). That way it's completely skipped over when it Z sorts them. It's better to have them all allocated in advance than to create/destroy them when the game is running.
white327 wrote:im gonna miss the moonwalk :(
The new flagger isn't as sexy but he makes up for it by being less 2 dimensional.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
white327
Posts: 263
Joined: Thu Apr 18, 2013 6:48 pm
Team: MotoPro GFX

Re: 2020-08-12 snapshot

Post by white327 »

white327 wrote:im gonna miss the moonwalk :(
The new flagger isn't as sexy but he makes up for it by being less 2 dimensional.[/quote]

It's not going to be the same. But im grateful steps are being taken to help the game. You are a fkin legend JLV!
Image
Motospun
Posts: 111
Joined: Thu Aug 23, 2018 6:44 pm
Location: Canada

Re: 2020-08-12 snapshot

Post by Motospun »

What she sees
Image
aeffertz
Posts: 4031
Joined: Sat Sep 06, 2014 7:01 am
Team: Studio ATE
Location: Wiscansin

Re: 2020-08-12 snapshot

Post by aeffertz »

So I've got it figured out and working for the most part but I am confused on how to use more or less flaggers than your example. I believe it might have something to do with this line?

Code: Select all

var g_flaggers = [
	[ 7 ],
	[ 9, 16 ],
	[ 10, 11 ],
	[ 12, 18 ],
	[ 13 ],
];
I'm not entire sure what those numbers are referencing but I think it might be referencing the statues file?
Image
Rojo
Posts: 56
Joined: Sat Oct 19, 2019 2:26 am
Team: PBR HUSQVARNA

Re: 2020-08-12 snapshot

Post by Rojo »

add rider lean side lean PPPPLLLLZZZZZZ
jlv
Site Admin
Posts: 14931
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2020-08-12 snapshot

Post by jlv »

aeffertz wrote:So I've got it figured out and working for the most part but I am confused on how to use more or less flaggers than your example. I believe it might have something to do with this line?

Code: Select all

var g_flaggers = [
	[ 7 ],
	[ 9, 16 ],
	[ 10, 11 ],
	[ 12, 18 ],
	[ 13 ],
];
I'm not entire sure what those numbers are referencing but I think it might be referencing the statues file?
Those are the gate numbers each flagger is watching. Like DJ said, this part is a mess. If you have 5 yellow flaggers listed, you have to have 5 flaggers and flags in the bolded positions below. If you want 6, you have to insert an extra flagger and flag in the statues and add an entry in g_flaggers for it. Also, the flags should have the exact same coordinates as their corresponding flagger.

[1415.000000 3.900000 1090.000000] -14.137167 @flaggertest/flagger.jm @flaggertest/flagger.png null <- starter
[1353.000000 3.900000 1286.000000] -14.075887 @flaggertest/flagger.jm @flaggertest/flagger.png null <- finisher
[1373.000000 3.900000 624.000000] -13.922237 @flaggertest/flagger.jm @flaggertest/flagger.png null <- yellow flagger 0
[820.000000 3.900000 832.000000] -14.801585 @flaggertest/flagger.jm @flaggertest/flagger.png null <- yellow flagger 1
[735.000000 3.900000 805.000000] -12.348725 @flaggertest/flagger.jm @flaggertest/flagger.png null <- yellow flagger 2
[893.000000 3.900000 1162.000000] -13.000000 @flaggertest/flagger.jm @flaggertest/flagger.png null <- yellow flagger 3
[924.000000 3.900000 1372.000000] -10.730029 @flaggertest/flagger.jm @flaggertest/flagger.png null <- yellow flagger 4
[1415.000000 3.900000 1090.000000] -14.137167 @flaggertest/30sec.jm @flaggertest/30sec.png null <- 30 second card
[1353.000000 3.900000 1286.000000] -14.075887 @flaggertest/flag.jm @flaggertest/flaggreen.png null <- green for finisher
[1353.000000 3.900000 1286.000000] -14.075887 @flaggertest/flag.jm @flaggertest/flagwhite.png null <- white for finisher
[1353.000000 3.900000 1286.000000] -14.075887 @flaggertest/flag.jm @flaggertest/flagchecker.png null <- checkers for finisher
[1373.000000 3.900000 624.000000] -13.922237 @flaggertest/flag.jm @flaggertest/flagyellow.png null <- yellow 0
[820.000000 3.900000 832.000000] -14.801585 @flaggertest/flag.jm @flaggertest/flagyellow.png null <- yellow 1
[735.000000 3.900000 805.000000] -12.348725 @flaggertest/flag.jm @flaggertest/flagyellow.png null <- yellow 2
[893.000000 3.900000 1162.000000] -13.000000 @flaggertest/flag.jm @flaggertest/flagyellow.png null <- yellow 3
[924.000000 3.900000 1372.000000] -10.730029 @flaggertest/flag.jm @flaggertest/flagyellow.png null <- yellow 4
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
aeffertz
Posts: 4031
Joined: Sat Sep 06, 2014 7:01 am
Team: Studio ATE
Location: Wiscansin

Re: 2020-08-12 snapshot

Post by aeffertz »

Okay, that explains it perfectly and is actually easier than I was expecting. It's really nice to actually be able to place the flaggers in the editor now! Now if only we had the height adjust slider for statues. :P

I just place all the flaggers in editor first and then copy and paste the statue lines into a new document and do a 'replace all' flagger.jm with flag.jm and same for the png.
Image
C.K.234
Posts: 359
Joined: Sat Feb 16, 2019 6:22 pm
Team: MXS Magazine KTM

Re: 2020-08-12 snapshot

Post by C.K.234 »

thanks jlv
Freddy694
Posts: 396
Joined: Tue May 16, 2017 3:57 pm
Location: Sweden

Re: 2020-08-12 snapshot

Post by Freddy694 »

Image
jre didnt like being a flagger, he is clearly showing it lmao
Image
Post Reply