Error in time compare

Get help using Construct 2

Post » Tue Nov 13, 2012 9:13 pm

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
perraro@pbpropaganda.com.br
Ararangu - SC - Brazil
B
6
S
1
Posts: 5
Reputation: 1,405

Post » Wed Nov 14, 2012 5:34 am

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.
B
14
S
5
G
4
Posts: 121
Reputation: 3,938

Post » Fri Nov 16, 2012 3:07 am

I will learn about it. Its my second game and im still a rookie.
Thank you.
B
6
S
1
Posts: 5
Reputation: 1,405

Post » Sun Nov 25, 2012 4:46 am

I used dt but still have the same error.
Pls, play the game in http://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.
B
6
S
1
Posts: 5
Reputation: 1,405


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 21 guests