Skip to content

traitors challenge UI/UX related improvements.#905

Merged
BenLubar merged 6 commits into
ReactiveDrop:reactivedrop_betafrom
ywgATustcbbs:reactivedrop_public
Jun 17, 2025
Merged

traitors challenge UI/UX related improvements.#905
BenLubar merged 6 commits into
ReactiveDrop:reactivedrop_betafrom
ywgATustcbbs:reactivedrop_public

Conversation

@ywgATustcbbs
Copy link
Copy Markdown
Contributor

@ywgATustcbbs ywgATustcbbs commented Jun 8, 2025

  1. Refactored ultra-wide screen mouse restriction code: Moved the main detection logic to asw_hud_master::OnThink() and reduced cpu load. Moved drawing code to asw_hud_master::Paint().

  2. Add two new CVARs:
    2.1 rd_draw_restricted_rectangles_coop (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_NOTIFY)
    2.2 rd_draw_restricted_rectangles_dm (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_NOTIFY)
    2.3 Purpose: Fill extra side FOVs with black on ultra-wide resolutions in coop / DM mode.

  3. Move marine / weapon icons into the 16:9 area.

  4. Move mission objectives into the 16:9 area.

  5. Adapt 3D marine labels for ultra-wide screens accroding to different CVAR settings.

@ywgATustcbbs
Copy link
Copy Markdown
Contributor Author

Couldn't find a way to move minimap into 16:9 area. I can't figure out how it's drawn. Sad

@ywgATustcbbs
Copy link
Copy Markdown
Contributor Author

ywgATustcbbs commented Jun 10, 2025

Previous 3 commits

  1. Update Traitors challenge: Added a new convar to insert player slot Index before player name. This will help to distinguish players. There were players renaming names to a string very much similar to another player. It had confused others and was unfair.
  2. Renamed traitors files and folders so that they shared the same prefix.
  3. Minor fix: Added .ValidateScriptScope() to some codes, hoping this will fix some index not found errors.
  4. Added 5 VScript functions to get High Quality Random Numbers using MT19937 algorithm.
    4.1. void RandomHQSetSeed(int seed). This function is used to set a specific seed value for reproducibility.
    4.2. void RandomHQSetRandomDevice(). This function is useful to reset the generator to a non-deterministic state.
    4.3By default, you don't need to call these functions, as it will automatically seed the generator to a non-deterministic state upon game initialization.
    4.4. int RandomHQUniformIntDistribution(int min, int max). Returns a uniformly distributed random integer in the range [min, max]. If min > max, the values are swapped.
    4.5. float RandomHQUniformFloatDistribution(float min, float max). Returns a uniformly distributed random float in the range [min, max]. If min > max, the values are swapped.
    4.6. float RandomHQNormalDistribution(float mean, float std_dev). Returns a normally(Gaussian) distributed random float with the specified mean and standard deviation. If std_dev <= 0.0f, it sets stddev to 1.0f.
  5. Updated Traitors challenge to use c++ versions of RNG.

@ywgATustcbbs
Copy link
Copy Markdown
Contributor Author

ywgATustcbbs commented Jun 10, 2025

Everything goes well on my pc.
Tested on listen server, including all intended changes.

Ready for review

@ywgATustcbbs ywgATustcbbs force-pushed the reactivedrop_public branch from 2b10983 to 218f3de Compare June 11, 2025 10:53
@ywgATustcbbs ywgATustcbbs changed the title Ultra wide screen restriction code refactoring and improvements: traitors challenge UI/UX related improvements. Jun 13, 2025
1. Refactored ultra-wide screen mouse restriction code: Moved the main detection logic to asw_hud_master::OnThink() and reduced cpu load. Moved drawing code to asw_hud_master::Paint().

2. Add two new CVARs:
2.1 rd_draw_restricted_rectangles_coop (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_NOTIFY)
2.2 rd_draw_restricted_rectangles_dm (FCVAR_ARCHIVE | FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_NOTIFY)
2.3 Purpose: Fill extra side FOVs with black on ultra-wide resolutions in coop / DM mode.

3. Move marine / weapon icons into the 16:9 area.

4. Move mission objectives into the 16:9 area.

5. Adapt 3D marine labels for ultra-wide screens accroding to different CVAR settings.
…ndex before player name. This will help to specify players.
… Minor fix, add .ValidateScriptScope() to some code, hope this will fix some index not found error.
…19937 algorithm.

1. void RandomHQSetSeed(int seed). This function is used to set a specific seed value for reproducibility.
2. void RandomHQSetRandomDevice(). This function is useful to reset the generator to a non-deterministic state.
By default, you don't need to call these functions, as it will automatically seed the generator to a non-deterministic state upon game initialization.

3. int RandomHQUniformIntDistribution(int min, int max). Returns a uniformly distributed random integer in the range [min, max]. If min > max, the values are swapped.
4. float RandomHQUniformFloatDistribution(float min, float max). Returns a uniformly distributed random float in the range [min, max]. If min > max, the values are swapped.
5. float RandomHQNormalDistribution(float mean, float std_dev). Returns a normally(Gaussian) distributed random float with the specified mean and standard deviation. If std_dev <= 0.0f, it sets stddev to 1.0f.

Updated Traitors challenge to use c++ versions of RNG.
@ywgATustcbbs ywgATustcbbs force-pushed the reactivedrop_public branch from 218f3de to 05f11a1 Compare June 15, 2025 03:18
@BenLubar BenLubar merged commit 7863db0 into ReactiveDrop:reactivedrop_beta Jun 17, 2025
2 checks passed
@BenLubar
Copy link
Copy Markdown
Contributor

If you want to update the https://developer.valvesoftware.com/wiki/Alien_Swarm:_Reactive_Drop/Scripting/Script_Functions page with the script functions you added, go ahead.

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