Skip to content

Conversation

@Nomagno
Copy link

@Nomagno Nomagno commented Aug 22, 2025

  • ItemPolicy is a system for determining the rules of a race, as pertaining to which collectibles can spawn, and several types of automatic item "dispensation" upon pass by the start/finish line
  • It also includes a system to forbid lappings and lappers from hitting each other, and a virtual pace car/virtual safety car system
  • It allows to set different rules for different sections of a race, each section defined by the lap its start
  • The current implementation is adapted from STK TME to STK 1.0+command manager, hence only doing the server side business
  • Known current issues as of initial implementation commit:
    • IMPORTANT: in the current implementation, each collectible "voluntarily despawns itself" after checking the current itempolicy section in its ::update(). This needs to be force synced to the client somehow in 1.0. for item boxes and nitro, this doesn't cause basically any lag even if it's strange, but for bananas it does cause lag so it should be fixed BEFORE MERGING.
    • a pit stop slowdown is applied in TME when a virtual pace car restart is underway. This penalty type doesn't exist in 1.0, so it's replaced with a bubblegum slowdown. However, it's not really synced properly even though it should be synced properly. The slowdown is slow enough it doesn't cause any serious lag, so fine for now.

Agreement

By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.

This includes your previous contribution(s) under the same name of contributor.

Keep the above statement in the pull request comment for agreement.

- ItemPolicy is a system for determining the rules of a race, as pertaining to which collectibles can spawn, and several types of automatic item "dispensation" upon pass by the start/finish line
- It also includes a system to forbid lappings and lappers from hitting each other, and a virtual pace car/virtual safety car system
- It allows to set different rules for different sections of a race, each section defined by the lap its start
- The current implementation is adapted from STK TME to STK 1.0+command manager, hence only doing the server side business
- Known current issues as of initial implementation commit:
- - IMPORTANT: in the current implementation, each collectible "voluntarily despawns itself" after checking the current itempolicy section in its ::update(). This needs to be force synced to the client
    somehow in 1.0. for item boxes and nitro, this doesn't cause basically any lag even if it's strange, but for bananas it does cause lag so it should be fixed BEFORE MERGING.
- - a pit stop slowdown is applied in TME when a virtual pace car restart is underway. This penalty type doesn't exist in 1.0, so it's replaced with a bubblegum slowdown.
    However, it's not really synced properly even though it should be synced properly. The slowdown is slow enough it doesn't cause any serious lag, so fine for now.
Copy link
Owner

@kimden kimden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly stylistic comments and things I noticed without opening IDE

Nomagno added a commit to Nomagno/stk-code that referenced this pull request Aug 23, 2025
@kimden
Copy link
Owner

kimden commented Aug 28, 2025

Please adhere to code style.

Nomagno added a commit to Nomagno/stk-code that referenced this pull request Sep 14, 2025
matahina pushed a commit to matahina/stk-code-emt-fixed that referenced this pull request Sep 21, 2025
matahina pushed a commit to matahina/stk-code-emt-fixed that referenced this pull request Sep 21, 2025
Nomagno added a commit to Nomagno/stk-code that referenced this pull request Oct 26, 2025
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