See the previous or best lap?

I wanna make a kind of race game and how can i do that: see my best or previous lap.
Like in car race games...
I new here so please write the solution step by step. :smile:

Comments

  • ChunkypixelsChunkypixels Member Posts: 1,114
    edited April 2016

    its a big job your asking for.... no ones going to give you a step by step walkthrough.

    I'd work on getting the basic racing game together first, then work on the best lap/replay stuff once you've got the racing part sorted.

    If your having trouble figuring things out, theres a couple of good racing templates over on GSHelper that are worth looking at, DeepBlueApps did a couple of good ones, also Pinkio has one too.

    But yup, a working racing game, with lap playback, which is what I think your asking for, isn't a small project, and not something that your going to get a step by step solution to here on the forums.

    You'll need to work on it, and then break down any issues into smaller parts that you can then put to the forum, to see if people can help out on more specific problems.

  • IceboxIcebox Member Posts: 1,485

    I think you should understand the logic of GS first and how things work, then think about making your game (Even if you find a template or a step by step solution). If you add something later on to the game and it causes bugs , you have to know your code to be able to fix it.Since your new, I'd recommend you start by watching GS logic series on youtube and watch several tutorials try making simple game demos then when you get the hang of it you will be able to make your racing game.

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited April 2016

    I think the original poster is asking how to show the best lap not make the race game in full.

    If that's the case then you just need to store the best time for the lap in an attribute and at the end of each lap check the current lap time against that attribute and if the time is better overwrite the attribute.

    Something like this rule:

    If game.currentLapTime < game.bestLapTime
    ... Change Attribute: game.bestLapTime = game.currentLapTime

    Check this rule everytime the car crosses the lap line.

    You would need a way to update the game.currentLapTime while the car is going around the track. Something simple like this:

    Timer: Every 0.001 seconds
    ... Change Attribute: game.currentLapTime = game.currentLapTime + 0.001

    You can then show the game.bestLapTime anywhere you want in the game.

    These attributes will need to be set up as reals.

    One other thing you will need to do is reset the game.currentLapTime everytime they cross the lap line (but do it after you've checked the best time rule above)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited April 2016

    @rozsa.jatekfejlesztes said:
    I wanna make a kind of race game and how can i do that: see my best or previous lap.
    Like in car race games...
    I new here so please write the solution step by step. :smile:

    Nope see bold text, he wants to know how to make the game and how to do the lap times.

    No one is going to build a game for you. The idea here is to learn how to make games. It will take a few months to learn the software well enough to make that type of game. watch tutorials, try making some simpler games first. Go to http://learn.gamesalad.com and try a few of the create a simple game follow alongs first.

  • UtopianGamesUtopianGames Member Posts: 5,692

    Sent you a pm with a link to our GS Racerz template if it helps.

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited April 2016

    @Lost_Oasis_Games said:

    @rozsa.jatekfejlesztes said:
    I wanna make a kind of race game and how can i do that: see my best or previous lap.
    Like in car race games...
    I new here so please write the solution step by step. :smile:

    Nope see bold text, he wants to know how to make the game and how to do the lap times.

    You can read it like that or you can read it that the person wanted help with storing the best lap times. Seems strange to ask how to make a whole game and only mention best laps and title the post best laps...

Sign In or Register to comment.