trzy / Supermodel

Official repository of the Sega Model 3 arcade emulator.
https://supermodel3.com
234 stars 35 forks source link

Racing games are unplayable #157

Open reignerdeustcher opened 1 month ago

reignerdeustcher commented 1 month ago

I'm with an xbox one series s controller and the control of racing games is soo sensitive that i cannot play anything properly, i move 1 milimeter the analog and the car turns the wheel 100%, how can i fix this?

jaoxford commented 3 weeks ago

I'm not sure on the exact specifics, but if you look in the README you should see different configuration options.

Turn down sensitivity, deadzone up, etc, until you find something that works for you!

reignerdeustcher commented 3 weeks ago

I'm not sure on the exact specifics, but if you look in the README you should see different configuration options.

Turn down sensitivity, deadzone up, etc, until you find something that works for you!

there's the joystick saturation but doesn't improve much

trzy commented 3 weeks ago

At some point I would like to implement some sort of non-linear scheme but I’m not sure what the right approach is. Not sure how racing games built for consoles handle this. If anyone can dig up an article or example, it would be helpful.

For example, should it be driven not only by joystick position but speed? Move the joystick gradually all the way to the left and the steering wheel only turns 50-75% and then continues turning as you hold the joystick, but if you jerk it quickly, it yanks the wheel all the way? Or vice versa? What would the thresholds be? Is a simple non-linear mapping better? Restrict steering wheel to 50-75% range and then turn more if held? It’s unclear and would take quite a bit of experimentation.

On Jun 21, 2024, at 12:10 PM, reignerdeustcher @.***> wrote:

I'm not sure on the exact specifics, but if you look in the README https://github.com/trzy/Supermodel/blob/master/Docs/README.txt you should see different configuration options.

Turn down sensitivity, deadzone up, etc, until you find something that works for you!

there's the joystick saturation but doesn't improve much

— Reply to this email directly, view it on GitHub https://github.com/trzy/Supermodel/issues/157#issuecomment-2183309772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJZ3RMZK3CGJBGFXKFSC7TZIR3ATAVCNFSM6AAAAABJLIREM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBTGMYDSNZXGI. You are receiving this because you are subscribed to this thread.

WarpedPolygon commented 1 week ago

All the Sega Model 3 racing games except Sega Rally 2 use 1:1 steering. Meaning the steering wheel tracks exactly to where you have the stick, this is not how console racers operate. Outward steering isn't really the issue, as most modern racers implement the same analog system these days, but only for outward steering.

The issue here is centre return. Because the analog steering is following the stick 1:1, it's also matching the speed in which the stick is being moved. So, when the stick is released after a corner as you would do with any normal racer, the steering snaps back at the speed of the stick moving, which is really fast. This again is not how console racers operate. Their centre return is a set value by the dev and operates quite differently.

To double down on how the analog behaviour operates especially with Daytona, it's also speed movement & directional dependant. So, when you release the stick and it snaps back to centre, it registers as an input in the other direction due to the speed of it moving.

Sega Rally 2 has a centre return system like a console racer. This may be something to take a look at.

I set the analog saturation to 165% for most racers, which for sure stops the twitchy outward steering, but doesn't help the centre return issue.

I tried using the digital inputs but these aren't a good solution, as if the analog isn't centred before the opposite steering direction is registered, it'll go mental lol.

You have to imagine the stick is an analog steering wheel and ease it back to centre. I don't think even MAME have a workaround for this when it's 1:1 analog steering.

I have no idea where to start to fix this without fundamentally changing some game code.

trzy commented 1 week ago

Is the center return performed at a constant velocity or does it depend on how far you turned before releasing? For example, if I turn all the way to the left and release, does the game automatically turn the wheel right at a faster rate than if I only slightly turn and release? Does it attempt to re-center within a constant amount of time regardless of how far turned the wheel was?

Also, what about turning itself? Let's say we set the saturation really high, as you do. That also means that you can't turn as far as the game allows. But what we could do is implement some sort of time-based turning at the extremes. For example, let's say we constrained the range of the analog sticks to 50% of the actual steering range and you turn all the way left. The steering wheel is then turned 50% left. If you continue to hold, we could increment the turn frame by frame at some rate until it reaches 100%.

Alternatively, an even simple solution might be to allow the joystick to represent the full range of steering but with a simple delay. That is, limit how fast the wheel can actually turn and then the joystick just indicates the "target steering wheel position" and we try to catch up to it.

This could maybe be made dynamic, so that the speed at which the wheel tries to follow the joystick depends on how quickly you moved the joystick. If you casually push all the way left, the wheel turns at R rads/sec. But if you jerk it really fast to the left, maybe it then moves at up to 2*R? Maybe the behavior should be the inverse of that (slow and deliberate movement behaves closer to 1:1 mapping, for precision, fast, jerky movement -> slower wheel turn to avoid frustration)?

If no one else gets to it, I would like to try these at some point. The more I think about it, the more the last solution seems most reasonable.

WarpedPolygon commented 1 week ago

Ahh man, this is a can of worms. A matrix "what if I told you moment".

What if I told you that 165% is the actual full range of steering for Daytona? There is a hell of a lot of 'dead zone' at the edges of the steering, despite the analog test menu giving you values within the entire analog range. After testing (a lot) I kinda determined that the test menu was lying and there is a dead zone that can just be snipped off with the AnalogSaturation set to 165%.

I understand this will need verifying and is just conjecture at the moment. And I totally eyeballed it. But if that is the case the outward steering is already as good as it's gonna get as the full 'actual in game analog range' has already been stretched across the entire analog stick range. Please do check this out as I felt like I was going insane lol.

As for the velocity of the centre return, it kinda doesn't work that way. It's following the sticks speed and position 1:1 like an analog steering wheel, trying to line up with the stick position at all times. EDIT: It's not registering an input in the opposite direction like I had previously stated, it's just physics due to speed of the steering. Its simply just trying to line up to exactly where you have the analog stick as fast as it can.

If the analog saturation is correct at 165% or whatever the game needs, the only thing would be to ramp down the speed of the centre return, without having the snapping issue (aka the analog input isn't in the centre when an opposite input is registered).

WarpedPolygon commented 1 week ago

After looking into how console games centre return, it seems that it ignores any analog input in the opposing direction, but only between the the direction the car is being steered in and the centre position of the stick, so releasing the stick doesn't register as an input at all, from either direction to centre.

It seems that it's only outward movements from centre are registered for steering. However some centre returning is programmed in otherwise you'd just forever steer in that direction, and it's this that is handled completely differently to arcade games. Often differently depending on the dev.

This is like doing a rubix cube but its all one colour.

negative1ne commented 1 day ago

i am using the same xbox controller for all the games.

no, i can't come in first (yet) in the racing games.

but every single one works fine for me, when i tried them. at least the main ones. daytona 2 sega rally 2 le mans 24 scud race

no issues at all. you just have to get used to the way each car handles, and controls. they all have different drift characteristics too.

i do have a logitech racing wheel, but haven't bothered to try it.

i will also say, i capped the frame rate at 60fps, because otherwise all the games would run way too fast on an i7 laptop that i'm using.

i haven't even adjusted any of the parameters, just using the defaults.

later | || | || | || | ne gat ive 1