Error in time compare

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I developed a game about racing cars (http://fuscaextreme.clay.io) and im having a trouble with the timecompare.

    The system: When the green light in semaphore is turned on the time since the beginning of game is registered in a variable. When each car cross the final line (on collision with the final line sprite) the system subtract the time from the variable from the actual time. This is the time of race of each car and it is showed in a score screen. A screenshot of the final race shows the difference between the cars in the final line.

    The problem: The difference of time of the cars dont match with the image. Sometimes the screenshot shows the cars in different position and same time of racing. It happens when the difference between the cars is short.

    Why it happens and how can i to solve this problem?

    (Sorry my bad english. I dont speak english)

    Anderson Paulino Perraro

    perraroqir@pbpropaganda.com.br

    Ararangu� - SC - Brazil

  • Search the manual and the forums and do a pretty decent study of how "dt" works within Construct 2. You will have to use "dt" in all of your values. Simply, "dt" (delta-time, aka change-in-time) gives you the real-time system clock that is independent of the frame-rate. It took me a while to get it, but once I did, boy did things get a lot easier.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I will learn about it. Its my second game and im still a rookie.

    Thank you.

  • I used dt but still have the same error.

    Pls, play the game in fuscaextreme.clay.io and look the error in the end of race. The cars are in different position but the time calculated is the same.

    I use TIME to get the initial time when the last lamp of semaphore is turned on and TIME to each car when they across the final line. The time of racing is the final time less the initial time.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)