2019-02-20 snapshot

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

Re: 2019-02-20 snapshot

Postby jlv » Wed Mar 13, 2019 1:38 am

willyt366 wrote:Anyone created a track yet with sounds thats ready to DL? Id love to hear the sounds in the game but not too experienced in Java

Just a nitpick - the game's new scripting system is in Javascript. Java is a different language.
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.

User avatar
Wahlamt
Posts: 7079
Joined: Mon Sep 13, 2010 3:15 pm
Team: MLG Compton
Location: Sweden
Contact:

Re: 2019-02-20 snapshot

Postby Wahlamt » Wed Mar 13, 2019 1:35 pm

jlv wrote:
willyt366 wrote:Anyone created a track yet with sounds thats ready to DL? Id love to hear the sounds in the game but not too experienced in Java

Java is a different language.

Shhh, don't spill the beans.

Seriously though, I wonder how common of a misconception Java - Javascript is 8)

User avatar
DJ99X
Posts: 15503
Joined: Tue Jan 15, 2008 11:36 am
Location: Land Down Under

Re: 2019-02-20 snapshot

Postby DJ99X » Thu Mar 14, 2019 3:32 am

Some more requests:

-Get tile index from x,z location
-Get bike wheel data (e.g. whether it's contacting ground, slip velocity, absolute velocity). Whatever data is readily available really.

Both of those are mainly for doing ground related sounds, but there's potentially other applications they would be useful for.

christianjonse
Posts: 215
Joined: Fri Oct 27, 2017 8:36 pm
Team: Privateer

Re: 2019-02-20 snapshot

Postby christianjonse » Fri Mar 15, 2019 6:55 pm

Rider animations would be awesome, can JavaScript do animations for riders?

jlv
Site Admin
Posts: 13206
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2019-02-20 snapshot

Postby jlv » Sat Mar 16, 2019 2:27 am

christianjonse wrote:Rider animations would be awesome, can JavaScript do animations for riders?

Not sure if I'd want to use it for that or not. There'd still need to be code to make it work online.
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.

christianjonse
Posts: 215
Joined: Fri Oct 27, 2017 8:36 pm
Team: Privateer

Re: 2019-02-20 snapshot

Postby christianjonse » Sat Mar 16, 2019 4:25 am

jlv wrote:
christianjonse wrote:Rider animations would be awesome, can JavaScript do animations for riders?

Not sure if I'd want to use it for that or not. There'd still need to be code to make it work online.

Hope to see something in the feature like a tear offs feature. You the man jlv

User avatar
aeffertz
Posts: 3203
Joined: Sat Sep 06, 2014 7:01 am
Team: Malt Liquor Boiz
Location: Wiscansin

Re: 2019-02-20 snapshot

Postby aeffertz » Sat Mar 16, 2019 9:27 pm

Trying to figure out how you mapped the coordinates of the numbers/letters on that scoring tower.

Code: Select all

xoffset: 0,
yoffset: 0,
xscale: 1,
yscale: .25,
width: 1024,
height: 256,
line_height: 64,
overlap: 8,
coords: [ [ 0, 0, 24 ], [ 24, 0, 32 ], [ 56, 0, 48 ], [ 104, 0, 40 ]


What I think I understand is for example, [24, 0, 32] means it makes a cell starting at 24, the top is set at 0, and the other edge is at 32. The cell's height is determined by the line_height: 64, so the box is 64 pixels in height. Is that right?

When I try to reference these points on the scoreboardstuff image, I can't seem to get any of them to match up. I'm assuming it has to do with the X & Y scales. Not sure what overlap or offset numbers do. I was assuming the width and height was the dimensions of the texture, but they are way different.
Image

jlv
Site Admin
Posts: 13206
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: 2019-02-20 snapshot

Postby jlv » Sun Mar 17, 2019 3:00 am

aeffertz wrote:Trying to figure out how you mapped the coordinates of the numbers/letters on that scoring tower.

Code: Select all

xoffset: 0,
yoffset: 0,
xscale: 1,
yscale: .25,
width: 1024,
height: 256,
line_height: 64,
overlap: 8,
coords: [ [ 0, 0, 24 ], [ 24, 0, 32 ], [ 56, 0, 48 ], [ 104, 0, 40 ]


What I think I understand is for example, [24, 0, 32] means it makes a cell starting at 24, the top is set at 0, and the other edge is at 32. The cell's height is determined by the line_height: 64, so the box is 64 pixels in height. Is that right?

When I try to reference these points on the scoreboardstuff image, I can't seem to get any of them to match up. I'm assuming it has to do with the X & Y scales. Not sure what overlap or offset numbers do. I was assuming the width and height was the dimensions of the texture, but they are way different.

It's kind of a mess. The width, height, line_height and coords are generated by a shell script I wrote for chopping up a font and rearranging the cells to fit in different dimensions. The pixel units refer to an intermediate image when the font was created. It'd be better if the coords values were all pre-divided by width or height so it wouldn't be in such random units, but I was trying to avoid doing any more math than I had to in the shell script.

If you want to try to re-use those fonts, don't change anything but the offset, scale or overlap values. If you change the size of the font, you have to change the scale value to reflect that. The yscale of .25 in the scoretower font is because it has been scaled down to 1/4 of the full height of the texture.

The offset values let you change the position of the font in the texture. If you moved the font down so it starts at the middle of the texture you'd use .5 as the yoffset value.

The overlap value sets how far it spaces the characters apart.

I still have the shell script so if you want it let me know. I could also generate a new font image if you want a different aspect ratio or resolution. The scoretower is a really tall aspect ratio so that particular font image is kind of specialized for that usage.
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.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest