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

chore: improve firework show performance and ensure synchronization #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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