F1 track analyser

This is a discussion on F1 track analyser within the Game Programming forums, part of the General Programming Boards category; Hi all, I am really stuck on where to begin my project. I am doing a track analyser. Basically a ...

  1. #1
    Unregistered
    Guest

    Question F1 track analyser

    Hi all,
    I am really stuck on where to begin my project. I am doing a track analyser. Basically a user can enter in settings for the car, select a track and the output will be the time it takes to complete a lap with those settings. My program doesn't involve graphics like in a game. The user can enter data in either by clicking a status bar or entering a number for different settings on a F1 car. Example the front downforce will be on a scale of 1 to 20, 1 being a completly flat angle and 20 a 90 degrees angle to apply the down force. They can also select tail, again 1 to 20, the weight of the driver and fuel, the tyre type and gear ratio etc... and all these numbers will be calculated along with the length of straights, the length of bends ( i.e. the max speed they can corner at etc ) and these will calculate the speed around the track. An example of where I am coming from is :a car with the perfect set up on a straight line, not moving, is zero on a scale from 0-100, and at flat out speed is 100 on the scale. Now if I change the setup in anyway the car max on the scale drops to 95(for example) and then it is calculated over the entire track accordingly. I hope I make sense??? My problem to begin with is how should I store these numbers to be able to access them for a number of different tracks or for even track that the user can enter themselves? I know what I have to do but I can't get over this! If you can help that would be great.
    THank you for your help,
    Colin.

  2. #2
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    that is a hell of a lot of physics programming - rather you than me

    the easiest way is to probably store them in a data file or create a mini-database, you can load this data into memory on program startup if speed is important.

    but a simple text file (not great bu would work )

    your file

    could be

    100
    4
    220
    190


    and in your code you read ints in after you open it

    datafile<<max speed;
    datafile<<gears
    datafile<<elephants-on-track;
    datafile<<cost-of-doorhandle


    this is by no means a great way of doing it but try it
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linked List Part 2
    By Nish in forum C Programming
    Replies: 18
    Last Post: 03-09-2005, 04:05 PM
  2. MD5 hashing problems =(
    By Uncle Rico in forum C Programming
    Replies: 4
    Last Post: 02-28-2005, 09:31 AM
  3. MD5 Algorithm
    By Inquirer in forum C Programming
    Replies: 2
    Last Post: 12-28-2003, 10:55 PM
  4. Keeping track of static external structure
    By pwilfred in forum C Programming
    Replies: 6
    Last Post: 03-13-2003, 05:23 PM
  5. Re: F1 games community!
    By marCplusplus in forum Game Programming
    Replies: 14
    Last Post: 06-21-2002, 10:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21