Author Topic: Calculating lap times  (Read 663 times)

Offline Gwynei

  • Level 1
  • *
  • Posts: 1
  • Reputation: +0/-0
    • View Profile
Calculating lap times
« on: October 18, 2009, 06:43:54 AM »
Hello!,

I'm working on a online text-based racing game, and I recently finished a drag race system. Two cars compete, and based on their weight/hp proportion one of them will win, and the system will calculate a realistic 1/00 dragtime using a common calcation method (http://www.hotrodpitstop.com/tools.html)

At this point I really like to implement another race type: Track racing. The idea is that users can join a planned track race, on a certain track with different pro's and con's. Like, some tracks have more corners, and so on.

How can I calculate the lap (and split) times the best way? I got the following values: HP, Nm, weight and drag.

I appreciate any support! :)


Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Calculating lap times
« Reply #1 on: October 18, 2009, 08:35:54 AM »
I think it would be a good idea to post this on other forums more specialised in math and physics too. People here will try to help you but it's not really our speciality I guess... I think that the people on physics forums etc would love the challenge to create a good and balanced formula (but I could be wrong).

Anyway it doesn't hurt to post it there and see what happens...

Offline Glenugie

  • Level 10
  • *
  • Posts: 64
  • Reputation: +0/-0
    • View Profile
    • The Land of Ennui
Re: Calculating lap times
« Reply #2 on: October 18, 2009, 08:57:30 AM »
I'd offer to help, but this is probably one of my weak-points, writing formula's that are balanced. I think it has something to do with taking math in school last year. My head is screaming Spped = Distance / Time right now. Not much help, sorry :P

Offline 133794m3r

  • Level 22
  • *
  • Posts: 265
  • Reputation: +2/-0
    • View Profile
Re: Calculating lap times
« Reply #3 on: November 19, 2009, 10:22:03 AM »
well do you know how fast the cars are going to go? I don't see that anywhere on your current values unless i'm missing something. So you'd first have to figure how fast a car could be going. That's one thing you'll have to figure out. Then from that you could have the cars all moving at a set speed or something similar. And as you already have weight figure out something that makes x more weight and x drag reduce the car's speed by this much. But to do something like that you'd first off have to have more information. If you wouldn't mind helping me out a bit with this information i'd be more than happy to help you figure this out.  Well hmm looking over that other information. I'll attempt to use my powers of deriving to come up with a balanced formula for you. It'll take awhile so please don't hold your breath.

Also a simple question for you. How much drag are we talking about here? I need to know what units that you're currently using as this site doesn't give me any formulas to calculate drag times. And i'm also imagining you're not going to have players using "drag cars" during these laps as that'd be quite silly. But if you are then i'll need to know that too. Please respond to my questions so i can help you with this formula.

edit:Seems all of those math classes and those two years of physics are going to pay off now.
« Last Edit: November 19, 2009, 10:24:41 AM by 133794m3r »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal