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

Ghost Racer (featuring new "Record Movements" extension) #595

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

tristanbob
Copy link
Contributor

@tristanbob tristanbob commented Nov 15, 2023

"Ghost Racer" is similar to a 2D Fall Guys game with a completely rewritten RecordMovements extension that will allow asynchronous multiplayer by playing against the movements of yourself or others on the leaderboard!

Features

Recording:

  • Start/stop/pause recording
  • Select which properties to record
  • Set max recording duration (default: 60 seconds)
  • Set recording frequency (default: 20 FPS)
  • Set player name (if not set, will try to use Authenticated user, and fallback to use the object name)
  • Set score (used for sorting best recordings)
  • Save to Firebase (compression enabled by default, but optional)
  • Save to local storage (compression enabled by default, but optional)

Playback:

  • Create objects using shortest recordings (Firebase or local storage)
  • Create objects using highest scores (Firebase or local storage)
  • Start/stop/pause playback
  • Select which properties to playback
  • Interpolation (enable/disable)
  • Set playback speed, reverse direction
  • Move playback frame by a relative amount or go to a specific value

Tasks remaining:

  • Add functionality to save/load recordings locally (currently only works with Firebase)
  • Clean up unused code (including Corner Correction behaviors)
  • Add documentation on proper Firebase permissions (such as: only allow new documents to be created)

@tristanbob tristanbob added the 🚧 Work In Progress This example is a work in progress label Nov 15, 2023
@tristanbob tristanbob self-assigned this Nov 15, 2023
Copy link
Contributor

Preview the game(s) changed or added in this Pull Request


This is an automatic message displaying links to the games in this PR - double check the JSON in case of doubt.

Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 24.6%, saving 235.44 KB.

Filename Before After Improvement Visual comparison
examples/ghost-racer/assets/A Button.png 4.62 KB 3.22 KB -30.4% View diff
examples/ghost-racer/assets/Black Decorated Button_Hovered.png 897 bytes 626 bytes -30.2% View diff
examples/ghost-racer/assets/Black Decorated Button_Idle.png 877 bytes 629 bytes -28.3% View diff
examples/ghost-racer/assets/Black Decorated Button_Pressed.png 878 bytes 611 bytes -30.4% View diff
examples/ghost-racer/assets/Black Square Decorated Button_Hovered.png 368 bytes 301 bytes -18.2% View diff
examples/ghost-racer/assets/Black Square Decorated Button_Idle.png 370 bytes 299 bytes -19.2% View diff
examples/ghost-racer/assets/Black Square Decorated Button_Pressed.png 360 bytes 299 bytes -16.9% View diff
examples/ghost-racer/assets/Blue Button With Shadow_Hovered.png 796 bytes 565 bytes -29.0% View diff
examples/ghost-racer/assets/Blue Button With Shadow_Idle.png 807 bytes 575 bytes -28.7% View diff
examples/ghost-racer/assets/Blue Button With Shadow_Pressed.png 791 bytes 558 bytes -29.5% View diff
examples/ghost-racer/assets/Close button.png 502 bytes 466 bytes -7.2% View diff
examples/ghost-racer/assets/GDevelop G logo white.png 4.58 KB 3.34 KB -27.1% View diff
examples/ghost-racer/assets/GreenHero_Climb_1.png 10.29 KB 7.94 KB -22.8% View diff
examples/ghost-racer/assets/GreenHero_Climb_10.png 10.15 KB 7.92 KB -21.9% View diff
examples/ghost-racer/assets/GreenHero_Climb_11.png 9.46 KB 7.36 KB -22.2% View diff
examples/ghost-racer/assets/GreenHero_Climb_12.png 9.46 KB 7.36 KB -22.2% View diff
examples/ghost-racer/assets/GreenHero_Climb_13.png 9.33 KB 6.95 KB -25.5% View diff
examples/ghost-racer/assets/GreenHero_Climb_14.png 9.33 KB 6.95 KB -25.5% View diff
examples/ghost-racer/assets/GreenHero_Climb_15.png 9.57 KB 7.33 KB -23.4% View diff
examples/ghost-racer/assets/GreenHero_Climb_16.png 9.57 KB 7.33 KB -23.4% View diff
examples/ghost-racer/assets/GreenHero_Climb_2.png 10.29 KB 7.94 KB -22.8% View diff
examples/ghost-racer/assets/GreenHero_Climb_3.png 9.57 KB 7.33 KB -23.4% View diff
examples/ghost-racer/assets/GreenHero_Climb_4.png 9.57 KB 7.33 KB -23.4% View diff
examples/ghost-racer/assets/GreenHero_Climb_5.png 9.33 KB 6.95 KB -25.5% View diff
examples/ghost-racer/assets/GreenHero_Climb_6.png 9.33 KB 6.95 KB -25.5% View diff
examples/ghost-racer/assets/GreenHero_Climb_7.png 9.46 KB 7.36 KB -22.2% View diff
examples/ghost-racer/assets/GreenHero_Climb_8.png 9.46 KB 7.36 KB -22.2% View diff
examples/ghost-racer/assets/GreenHero_Climb_9.png 10.15 KB 7.92 KB -21.9% View diff
examples/ghost-racer/assets/GreenHero_Fire_1.png 9.06 KB 7.13 KB -21.3% View diff
examples/ghost-racer/assets/GreenHero_Fire_10.png 9.69 KB 8.07 KB -16.7% View diff
examples/ghost-racer/assets/GreenHero_Fire_11.png 9.68 KB 8.31 KB -14.2% View diff
examples/ghost-racer/assets/GreenHero_Fire_12.png 9.86 KB 8.40 KB -14.8% View diff
examples/ghost-racer/assets/GreenHero_Fire_13.png 9.95 KB 8.50 KB -14.6% View diff
examples/ghost-racer/assets/GreenHero_Fire_14.png 9.95 KB 8.50 KB -14.6% View diff
examples/ghost-racer/assets/GreenHero_Fire_15.png 9.72 KB 8.22 KB -15.4% View diff
examples/ghost-racer/assets/GreenHero_Fire_16.png 9.72 KB 8.22 KB -15.4% View diff
examples/ghost-racer/assets/GreenHero_Fire_17.png 9.47 KB 7.89 KB -16.6% View diff
examples/ghost-racer/assets/GreenHero_Fire_18.png 9.47 KB 7.89 KB -16.6% View diff
examples/ghost-racer/assets/GreenHero_Fire_19.png 8.89 KB 6.75 KB -24.1% View diff
examples/ghost-racer/assets/GreenHero_Fire_2.png 9.26 KB 7.41 KB -20.0% View diff
examples/ghost-racer/assets/GreenHero_Fire_20.png 8.89 KB 6.75 KB -24.1% View diff
examples/ghost-racer/assets/GreenHero_Fire_3.png 9.27 KB 7.34 KB -20.8% View diff
examples/ghost-racer/assets/GreenHero_Fire_4.png 9.76 KB 7.75 KB -20.6% View diff
examples/ghost-racer/assets/GreenHero_Fire_5.png 9.81 KB 7.81 KB -20.4% View diff
examples/ghost-racer/assets/GreenHero_Fire_6.png 9.95 KB 7.93 KB -20.3% View diff
examples/ghost-racer/assets/GreenHero_Fire_7.png 9.95 KB 7.97 KB -19.9% View diff
examples/ghost-racer/assets/GreenHero_Fire_8.png 10.09 KB 8.18 KB -19.0% View diff
examples/ghost-racer/assets/GreenHero_Fire_9.png 9.68 KB 8.07 KB -16.7% View diff
examples/ghost-racer/assets/GreenHero_Idle_1.png 8.29 KB 5.97 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Idle_10.png 8.65 KB 6.30 KB -27.1% View diff
examples/ghost-racer/assets/GreenHero_Idle_11.png 8.72 KB 6.28 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Idle_12.png 8.72 KB 6.28 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Idle_13.png 8.64 KB 6.26 KB -27.5% View diff
examples/ghost-racer/assets/GreenHero_Idle_14.png 8.64 KB 6.26 KB -27.5% View diff
examples/ghost-racer/assets/GreenHero_Idle_15.png 8.50 KB 6.15 KB -27.6% View diff
examples/ghost-racer/assets/GreenHero_Idle_16.png 8.50 KB 6.15 KB -27.6% View diff
examples/ghost-racer/assets/GreenHero_Idle_17.png 8.50 KB 6.15 KB -27.6% View diff
examples/ghost-racer/assets/GreenHero_Idle_18.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_19.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_2.png 8.29 KB 5.97 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Idle_20.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_3.png 8.29 KB 5.97 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Idle_4.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_5.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_6.png 8.40 KB 6.02 KB -28.3% View diff
examples/ghost-racer/assets/GreenHero_Idle_7.png 8.47 KB 6.14 KB -27.5% View diff
examples/ghost-racer/assets/GreenHero_Idle_8.png 8.47 KB 6.14 KB -27.5% View diff
examples/ghost-racer/assets/GreenHero_Idle_9.png 8.65 KB 6.30 KB -27.1% View diff
examples/ghost-racer/assets/GreenHero_Jump_1.png 8.63 KB 6.38 KB -26.0% View diff
examples/ghost-racer/assets/GreenHero_Jump_10.png 8.98 KB 6.83 KB -23.9% View diff
examples/ghost-racer/assets/GreenHero_Jump_11.png 9.06 KB 6.97 KB -23.0% View diff
examples/ghost-racer/assets/GreenHero_Jump_12.png 9.06 KB 6.97 KB -23.0% View diff
examples/ghost-racer/assets/GreenHero_Jump_13.png 9.10 KB 6.85 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Jump_14.png 9.10 KB 6.85 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Jump_15.png 9.10 KB 6.85 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Jump_16.png 9.10 KB 6.85 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Jump_17.png 9.10 KB 6.85 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Jump_2.png 8.63 KB 6.38 KB -26.0% View diff
examples/ghost-racer/assets/GreenHero_Jump_3.png 8.70 KB 6.49 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Jump_4.png 8.70 KB 6.49 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Jump_5.png 8.59 KB 6.31 KB -26.6% View diff
examples/ghost-racer/assets/GreenHero_Jump_6.png 8.59 KB 6.31 KB -26.6% View diff
examples/ghost-racer/assets/GreenHero_Jump_7.png 8.93 KB 6.82 KB -23.6% View diff
examples/ghost-racer/assets/GreenHero_Jump_8.png 8.90 KB 6.71 KB -24.7% View diff
examples/ghost-racer/assets/GreenHero_Jump_9.png 8.98 KB 6.83 KB -23.9% View diff
examples/ghost-racer/assets/GreenHero_Pose1.png 9.93 KB 7.47 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Pose2.png 8.72 KB 6.28 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Punch_1.png 9.15 KB 6.86 KB -25.0% View diff
examples/ghost-racer/assets/GreenHero_Punch_10.png 8.55 KB 6.38 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Punch_11.png 8.55 KB 6.38 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Punch_12.png 8.55 KB 6.38 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Punch_13.png 8.55 KB 6.38 KB -25.4% View diff
examples/ghost-racer/assets/GreenHero_Punch_2.png 9.56 KB 7.29 KB -23.8% View diff
examples/ghost-racer/assets/GreenHero_Punch_3.png 9.56 KB 7.29 KB -23.8% View diff
examples/ghost-racer/assets/GreenHero_Punch_4.png 9.93 KB 7.47 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Punch_5.png 9.93 KB 7.47 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Punch_6.png 9.93 KB 7.47 KB -24.8% View diff
examples/ghost-racer/assets/GreenHero_Punch_7.png 8.67 KB 6.23 KB -28.1% View diff
examples/ghost-racer/assets/GreenHero_Punch_8.png 8.67 KB 6.23 KB -28.1% View diff
examples/ghost-racer/assets/GreenHero_Punch_9.png 8.73 KB 6.36 KB -27.2% View diff
examples/ghost-racer/assets/GreenHero_Run_1.png 8.51 KB 6.04 KB -29.0% View diff
examples/ghost-racer/assets/GreenHero_Run_10.png 8.24 KB 5.72 KB -30.6% View diff
examples/ghost-racer/assets/GreenHero_Run_11.png 9.08 KB 6.54 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Run_12.png 9.08 KB 6.54 KB -28.0% View diff
examples/ghost-racer/assets/GreenHero_Run_13.png 8.90 KB 6.34 KB -28.7% View diff
examples/ghost-racer/assets/GreenHero_Run_14.png 8.90 KB 6.34 KB -28.7% View diff
examples/ghost-racer/assets/GreenHero_Run_2.png 7.99 KB 5.57 KB -30.3% View diff
examples/ghost-racer/assets/GreenHero_Run_3.png 8.58 KB 5.93 KB -30.9% View diff
examples/ghost-racer/assets/GreenHero_Run_4.png 8.82 KB 6.24 KB -29.2% View diff
examples/ghost-racer/assets/GreenHero_Run_5.png 8.79 KB 6.17 KB -29.8% View diff
examples/ghost-racer/assets/GreenHero_Run_6.png 8.79 KB 6.17 KB -29.8% View diff
examples/ghost-racer/assets/GreenHero_Run_7.png 9.07 KB 6.49 KB -28.5% View diff
examples/ghost-racer/assets/GreenHero_Run_8.png 8.33 KB 5.67 KB -32.0% View diff
examples/ghost-racer/assets/GreenHero_Run_9.png 8.06 KB 5.59 KB -30.6% View diff
examples/ghost-racer/assets/Minus Key.png 1.19 KB 856 bytes -30.0% View diff
examples/ghost-racer/assets/Minus Key2.png 1.09 KB 643 bytes -42.6% View diff
examples/ghost-racer/assets/New image.png 138 bytes 130 bytes -5.8% View diff
examples/ghost-racer/assets/NewSprite.png 200 bytes 178 bytes -11.0% View diff
examples/ghost-racer/assets/NewSprite2.png 202 bytes 179 bytes -11.4% View diff
examples/ghost-racer/assets/NewSprite3.png 202 bytes 179 bytes -11.4% View diff
examples/ghost-racer/assets/NewSprite4.png 198 bytes 174 bytes -12.1% View diff
examples/ghost-racer/assets/NewSprite5.png 200 bytes 178 bytes -11.0% View diff
examples/ghost-racer/assets/NewSprite6.png 200 bytes 178 bytes -11.0% View diff
examples/ghost-racer/assets/NewSprite7.png 200 bytes 178 bytes -11.0% View diff
examples/ghost-racer/assets/Pause button.png 557 bytes 521 bytes -6.5% View diff
examples/ghost-racer/assets/Play button.png 391 bytes 355 bytes -9.2% View diff
examples/ghost-racer/assets/Play button2.png 464 bytes 323 bytes -30.4% View diff
examples/ghost-racer/assets/Plus Key.png 1.30 KB 895 bytes -32.7% View diff
examples/ghost-racer/assets/Plus Key2.png 1.15 KB 674 bytes -42.7% View diff
examples/ghost-racer/assets/Rb.png 4.24 KB 2.54 KB -40.1% View diff
examples/ghost-racer/assets/Red Button With Shadow_Hovered.png 776 bytes 566 bytes -27.1% View diff
examples/ghost-racer/assets/Red Button With Shadow_Idle.png 798 bytes 565 bytes -29.2% View diff
examples/ghost-racer/assets/Red Button With Shadow_Pressed.png 775 bytes 560 bytes -27.7% View diff

5606 images did not require optimisation.

Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 5.4%, saving 9.65 KB.

Filename Before After Improvement Visual comparison
examples/ghost-racer/preview.png 180.10 KB 170.46 KB -5.4% View diff

5739 images did not require optimisation.

@tristanbob
Copy link
Contributor Author

I've cleaned this up a lot, but it still needs methods for recording/playback to local storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 Work In Progress This example is a work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant