Skip to content

chore: improve firework show performance and ensure synchronization#3

Open
btwlouis wants to merge 1 commit intoCanysLypys:mainfrom
btwlouis:main
Open

chore: improve firework show performance and ensure synchronization#3
btwlouis wants to merge 1 commit intoCanysLypys:mainfrom
btwlouis:main

Conversation

@btwlouis
Copy link

Summary
This pull request improves the firework show system for better performance, more natural delays, and ensures synchronization for all players, including those who rejoin during the show.


Key Changes

  1. Refactored Client-Side Logic

    • Removed redundant TriggerServerEvent calls.
    • Optimized particle asset loading with a centralized function (RequestPtfxAsset).
    • Added natural delays for starting rockets to improve realism.
  2. Improved Server-Side Synchronization

    • Ensured players rejoining during the firework show will automatically sync and start the show.
    • Added a more robust control for stopping and starting the firework show.
  3. New Config

    • Created a centralized configuration (Config) to define particle effects and firework positions, reducing hard-coded values.

Benefits

  • More Performant: Eliminates unnecessary loops and server events.
  • Fully Synced: Players joining late now experience the firework show correctly.
  • More Natural: Adds random delays to firework launches for better visual appeal.

Testing

  • All features have been tested successfully:
    • Firework show starts/stops as expected.
    • Rejoining players sync automatically.
    • Config changes take effect without issues.

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.

1 participant