-
Couldn't load subscription status.
- Fork 234
Analog control #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Analog control #77
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
working analog control
add global for analog controls
can we have a default view option
no more else if's
|
Thanks for this PR and continually refining it! I finally took a look today and implemented your idea. I also added a menu option to configure the analog response curve, because the linear behavior still felt a bit too wobbly for me. |
|
Good to see the project receiving updates. Keep it up. Thanks. |
tjrileywisc
added a commit
to tjrileywisc/wipeout-rewrite
that referenced
this pull request
Jun 22, 2025
* clear weapon_target in ship_init (fixes phoboslab#141) * clear `expected` state in `input_bind` so remapped controls actually work (fixes phoboslab#132) * `vec3_is_on_face` angle value test updated to match original code. * remove erroneous division by 64 in `magnitude` calculation for nose collision this makes ship nose swing back out toward center of track again (noticeably) * remove erroneous division by 16 in `magnitude` calculation (wing collision) this restores the behavior of ship rolling on wing collision with side of track there may still be other code to tweak as this seems more sensitive than PSX behavior * use reciprocal multiply as seen in many other lines of rewrite * another place where angle comparison to 30000 was converted differently * angular z component computation did not match original source DYNAM.C * 2 * pi, I also messed up * scale face normal contribution consistently in floor collision code * reimplement camera shake * mistake, messed up roll * LONG/SHORT_SHAKE -> CAMERA_SHAKE_LONG/SHORT * fix indentation * adjust face->normal scaling constant for collision with floor * another fixed point scaling issue? * restore original attract mode/demo behavior With a very small reordering, the original PSX demo behavior is restored (countdown at starting line). Gets rid of the need for the "FIXME" part in the ship loop as well. * Adjust scaling values in ship to ship collision code * Update QOA lib * Add menu option for screen shake * Allow A_MENU_START for highscore entry; close phoboslab#133 * Better analog controls; thanks @mickski56; close phoboslab#77 * add wipegame.exe to .gitignore * Use sdl2-config for L_FLAGS_SDL Additional flags passed by 'sdl2-config --libs' fix an undefined reference to WinMain that prevents the target from successfully linking. * Correct L_FLAGS_SOKOL for MSYS2 libdl and libasound don't exist on Windows. The Sokol build needs gdi32 and ole32 to successfully link. * Remove unnecessary MSYS define '__MSYS__' is pre-defined by the MSYS2 environment's toolchains, and should NOT be defined for MINGW32/64, UCRT64, etc. * Rename client com file for consistency with server com * Tidy up tests a little * Address some minor warnings * Remove unused param * Add unit tests * Move away from custom network structs * Add test for connecting client and too many clients * Account for forgetting to init client array somehow * Remove header * Forward declare server info type * Grab server address in discovery loop * Fix data (server index) * Comment this out for now * Send and receive connect status on client side --------- Co-authored-by: jnmartin84 <[email protected]> Co-authored-by: Dominic Szablewski <[email protected]> Co-authored-by: J.Ingram <[email protected]>
tjrileywisc
added a commit
to tjrileywisc/wipeout-rewrite
that referenced
this pull request
Jun 22, 2025
* clear weapon_target in ship_init (fixes phoboslab#141) * clear `expected` state in `input_bind` so remapped controls actually work (fixes phoboslab#132) * `vec3_is_on_face` angle value test updated to match original code. * remove erroneous division by 64 in `magnitude` calculation for nose collision this makes ship nose swing back out toward center of track again (noticeably) * remove erroneous division by 16 in `magnitude` calculation (wing collision) this restores the behavior of ship rolling on wing collision with side of track there may still be other code to tweak as this seems more sensitive than PSX behavior * use reciprocal multiply as seen in many other lines of rewrite * another place where angle comparison to 30000 was converted differently * angular z component computation did not match original source DYNAM.C * 2 * pi, I also messed up * scale face normal contribution consistently in floor collision code * reimplement camera shake * mistake, messed up roll * LONG/SHORT_SHAKE -> CAMERA_SHAKE_LONG/SHORT * fix indentation * adjust face->normal scaling constant for collision with floor * another fixed point scaling issue? * restore original attract mode/demo behavior With a very small reordering, the original PSX demo behavior is restored (countdown at starting line). Gets rid of the need for the "FIXME" part in the ship loop as well. * Adjust scaling values in ship to ship collision code * Update QOA lib * Add menu option for screen shake * Allow A_MENU_START for highscore entry; close phoboslab#133 * Better analog controls; thanks @mickski56; close phoboslab#77 * add wipegame.exe to .gitignore * Use sdl2-config for L_FLAGS_SDL Additional flags passed by 'sdl2-config --libs' fix an undefined reference to WinMain that prevents the target from successfully linking. * Correct L_FLAGS_SOKOL for MSYS2 libdl and libasound don't exist on Windows. The Sokol build needs gdi32 and ole32 to successfully link. * Remove unnecessary MSYS define '__MSYS__' is pre-defined by the MSYS2 environment's toolchains, and should NOT be defined for MINGW32/64, UCRT64, etc. * Add controller vibration support --------- Co-authored-by: jnmartin84 <[email protected]> Co-authored-by: Dominic Szablewski <[email protected]> Co-authored-by: J.Ingram <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An issue with using an analog controller with the game as is, is that if you hold the controller at a constant non zero position an angular acceleration is applied every time the ship update function is run. Resulting in an ever increasing rate of turn.
This pull request addresses that by introducing a turn rate target (which can be thought of as a measure of the desired rate of turn). This is compared to the current rate of turn and a positive or negative angular acceleration is applied according to the result. This results in being able to hold a constant radius turn by keeping the control at a constant angle.
The pow() in the turn rate target calculation is just introducing a little non linear response to the inputRemoved as unnecessaryCures the "balancing an egg" thing too.