Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lap and position display
03-04-2007, 02:49 PM,
#21
 
rookie1 Wrote:1.Missing car name - When you create the AI cars, there is an index variable 'i', which starts from value '1'. I think it should start from value '0' as per my original code.
I fixed this, I meant to removed the "i+1" bit below after starting it at 1 instead of 0. Missed it, thanks for catching that. Smile

rookie1 Wrote:2. Error in total time - The total time is only incremented when a car finishes one lap, i.e. the total time = total time to finish lap 1 when the car finishes 1st lap. the total time = total time to finish lap 1 + total time to finish lap 2 when the car finishes 2nd lap. If you stop the game before the car finishes lap 2, the accumulated total time will still reflect only the lap 1 time. To properly handle this, i think we need to have a flag to indicate whether a car has finished the whole race. In GAMESTATE::SortRaceResult(), this flag should be checked so that those cars did not finish the race should remain at the bottom. And in the result screen maybe we should display '+1 lap', '+2 lap', etc instead of the time.
I've started adding a lap counter variable to the timer - this will come in handy with displaying each car's number of laps in the timer too, and seeing if a car has finished all laps at the end (and if not displaying # of laps remaining as you say).

rookie1 Wrote:3. Position display - Did you happen to notice this on Monza? Currently the position display works correctly if there is only 1 road strip defined for the track. The way the race position works is by tracking the relative distance between the current patch the car is on and the patch marked as 'lap sequence 0'. If the current patch is on a different road strip, there is no way to calculate the relative distance between this patch and the 'lap sequence 0' patch. And the position display becomes erratic. Monza is such a case.
Yes, this was on Monza - I've been using this to test since it has 4 start positions and loads quickly. Do you mean that this track has two different track sequences? How can we fix this? Ditch one of the track sequences for now?

rookie1 Wrote:4. One comment on opponent selection - player is allowed to select the opponent car color, but it's ignored in game. Opponent car is still using random color. Either we need to remove the color selection, or add another config variable to hold the opponent color.
Well, I could add a switch for the spinning car widget to turn off the color selector and leave it random. That adds a little surprise to the AI Smile and also if you select several of the same car, you can tell them apart. Most people would probably pick default color AI anyway.


I haven't checked in the changes I mentioned above, I'm going to finish getting the sorting and remaining lap count thing working better first. I'll probably finish it up and check it in tonight.
Reply


Messages In This Thread
Lap and position display - by thelusiv - 02-09-2007, 06:45 PM
[No subject] - by rookie1 - 02-10-2007, 06:28 AM
[No subject] - by thelusiv - 02-11-2007, 01:39 PM
[No subject] - by rookie1 - 02-12-2007, 10:15 AM
[No subject] - by thelusiv - 02-12-2007, 09:39 PM
[No subject] - by rookie1 - 02-15-2007, 11:53 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-18-2007, 02:35 PM
[No subject] - by thelusiv - 02-19-2007, 01:42 AM
[No subject] - by rookie1 - 02-19-2007, 09:14 AM
[No subject] - by rookie1 - 02-19-2007, 11:43 AM
[No subject] - by thelusiv - 02-19-2007, 01:33 PM
[No subject] - by rookie1 - 02-23-2007, 09:15 AM
[No subject] - by thelusiv - 03-01-2007, 03:05 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-01-2007, 11:26 PM
[No subject] - by thelusiv - 03-02-2007, 04:20 AM
[No subject] - by rookie1 - 03-02-2007, 10:07 AM
[No subject] - by thelusiv - 03-02-2007, 03:53 PM
[No subject] - by rookie1 - 03-03-2007, 05:25 AM
[No subject] - by thelusiv - 03-04-2007, 06:55 AM
[No subject] - by rookie1 - 03-04-2007, 09:36 AM
[No subject] - by thelusiv - 03-04-2007, 02:49 PM
[No subject] - by thelusiv - 03-05-2007, 06:46 AM
[No subject] - by thelusiv - 03-06-2007, 02:43 AM
[No subject] - by rookie1 - 03-06-2007, 11:16 AM
[No subject] - by thelusiv - 03-06-2007, 01:18 PM
[No subject] - by rookie1 - 03-07-2007, 05:05 AM
[No subject] - by rookie1 - 03-08-2007, 11:11 AM
[No subject] - by thelusiv - 03-08-2007, 01:36 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)