How can I create a "Ghost" racer for my race game?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey Clickteam,

    In Mario Kart, after the player finishes the race and wants to beat their own score, there is the players ghost that races along with them when the level is played again. How could I create a "Ghost" racer for my own race game? Thanks!

  • Hello,

    I would store the X, Y and angle values once every 25 units (a quarter of a second - it's the 4th scale in Fusion's timer window).
    - have an alterable value which will be increased by 1 each time
    - save the X, Y values (and angle if your game has rotating actives)
    - use an array with 2 dimensions - the X dimension will hold the alterable value/counter and the Y dimension will hold the coordinates and angle
    - example array values:

    • [0, 0] - active's X at game start
    • [0, 1] - active's Y at game start
    • [0 ,2] - active's angle at game start


    - save the array
    - load the array when you want your ghost to move and read from it once every 25 units

    I used 25 units just as an example. You can switch this to be faster or slower but be careful. If the data is saved/played at a faster rate the game will be more demanding resources wise.
    Also increasing this time might make the ghost movement seem choppy or jittery.
    Feel free to experiment with different values.

    Games, frameworks, code & graphics - Please login to see this link.

  • Hey Emerson,

    see this example I made yesterday for a platform "ghost" character:
    Please login to see this link.

    approach could be very similar for a top-view-racing game
    (and similar to what DMike suggested)
    just a matter of starting-stopping "recording" on beginning-end of race

    a selection of my Fusion examples can be found Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!