Skip to content
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

[In Testing / WiP] Add support for multiple profiles and Non-Forza Games #37

Merged
merged 8 commits into from
Dec 30, 2023

Conversation

patmagauran
Copy link
Collaborator

Introduction

This PR implements two major features which are detailed below. I believe these features will be of great value to the community and should be presented to the whole user base rather than re creating as a new fork(Again...).

Multiple Profiles

  • I added functionality to allow for multiple profiles to be created, allowing for different settings for different games.
  • [Breaking Change] The config structure has been converted to a JSON structure
  • The UI has been reworked to accommodate for profile selection
  • Profiles are automatically engaged based on their associated executable names(Which are user configurable)
  • Users can override the active profile and set a default profile for if they opt to disable the app check
  • Functionality built in to automatically add the default profiles in as the app updates to support new games

The UI Change can be seen the following screenshot:
image

Non-Forza Games

  • Many games support a UDP protocol similar to Forza
  • I refactored out the code that parses the byte packets and generates the trigger instructions into a new Abstract Parser class
  • Individual games will have their own parser class. It just needs to parse the byte packets appropriately(see the DirtParser for an example)
  • Games can also override how the triggers/light bar/ or menu instructions work by overriding those methods(See Forza parser)
  • I implemented a POC parser for DiRT Rally 1 / 2, which should share a common UDP protocol. It still needs some tuning in the tire slip calculation(as they only provide the contact patch speed, not the full tire slip ratio).

Summary of important changes

  • UI reworking
  • Major code refactoring
  • Switch to JSON config (Breaking Change)

Work to be done

I view this PR as feature complete, although testing is still needed as it adds multiple major features. However, a few extensions that should be considered are the ability to copy values(preferably selectively) from one profile to another and the ability for a gameParser to take in custom settings that are editable using the UI. Since the config uses the Microsoft JSON library, the DSX packets should probably be reworked to use that instead of Newtonsoft.

@patmagauran
Copy link
Collaborator Author

Added Preview Release executable to my Repo along with Directions for DiRT

@cosmii02
Copy link
Owner

Just commenting that dsx v3 does not have a mod/udp interface as of now. It is planned for the near future if all goes well

@cosmii02 cosmii02 changed the base branch from main to v0.6.0 December 30, 2023 17:10
@cosmii02 cosmii02 self-assigned this Dec 30, 2023
@cosmii02 cosmii02 merged commit 2c3b32f into cosmii02:v0.6.0 Dec 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants