03 September 2018, 15:31 | #1 |
Registered User
Join Date: Jan 2010
Location: West Yorkshire, UK
Age: 30
Posts: 657
|
How was the time penalty system done in Super Skidmarks 4 player mode?
Hey everyone,
I've been working on a racing game lately, and I was wondering how the developers of Super Skidmarks handled their penalty system in the game? For those that aren't aware, in 4 player, everyone shared the same screen, if a player dropped off the screen, they were teleported alongside 1st place and given a time penalty corresponding to how far behind they were. I've been trying to find an accurate way to recreating that system. The closest I've gotten is this: 1. Every 0.1 seconds the car in 1st place drops a marker. 2. If a car drops off the screen, it checks for the nearest marker and sees how long that marker has been in existence, it then applies that markers lifetime to the players total time, in effect a penalty. 3. That player is then teleported alongside 1st place. 4. Any markers that go off screen are themselves destroyed, to prevent confusion and to optimize the game. However this system has some flaws. Mostly related to cars crashing and the view stopping moving, and then when the view moves on again, a car may get a 10 second penalty, even when it's really not all that far behind, just because the markers have been in existence for a long time. Been trying to logic all this out for a few hours, but been struggling, so any insight into how they achieved what I found to be a reasonably accurate system would be appreciated. |
03 September 2018, 16:31 | #2 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
I can't tell how it's done in actual game.
However, if i had to implement this, i'd use some computer car AI to perform a simulation. Of course this is a lot easier if you actually have computer-driven cars in your racing game |
03 September 2018, 16:41 | #3 |
Registered User
Join Date: Jan 2010
Location: West Yorkshire, UK
Age: 30
Posts: 657
|
Thanks.
I do have AI cars in the game. But I'm not sure how to simulate the time difference in an instant of time. The only way I could think would be to have an invisible AI car drive the path between the car in 1st and the car that's being respawned and return the time it took, but obviously you don't have the time to do that in the middle of a race. I figured having all the cars drop a marker and then when you go off screen, only using the marker of the car currently in first, as he's the one you'll respawn at, and therefore is the most accurate to calculate time difference with. Only logical problem I can see with that, is if all the cars stop moving for a period of time, but that shouldn't really happen, should it??? I'm making the game.... I should know.... But I don't.... :'( |
03 September 2018, 17:40 | #4 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
If the AI is too slow to be used, then some simple path finding should do the trick. You just have to follow the road in some way.
It will give you the distance between the point where the car has gone offscreen and where the 1st car is. With that distance and an average speed, you can compute the time penalty. |
03 September 2018, 17:47 | #5 |
Registered User
Join Date: Jan 2010
Location: West Yorkshire, UK
Age: 30
Posts: 657
|
Ok, thanks.
Will look into trying it that way. |
04 September 2018, 21:42 | #6 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Can't you just do it on distance? Sqrt(x²+y²) where x and y are the pixel distance between 1st place and where the "disappeared" car was at the point of removal. Then convert distance to time penalty via some proportional relationship.
Penalty = k . sqrt(x²+y²) You could probably use a lookup table to speed things up. |
04 September 2018, 21:47 | #7 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Super skidmarks is super fast! | TenLeftFingers | support.FS-UAE | 9 | 08 November 2014 14:13 |
App to update Amiga System time from web time?? | DDNI | request.Apps | 2 | 31 December 2007 07:21 |
Super SkidMarks | guardiansknight | Games images which need to be WHDified | 10 | 18 February 2006 11:38 |
Super Skidmarks HD | killergorilla | request.Old Rare Games | 1 | 02 April 2004 21:11 |
Super Skidmarks / Skidmarks 2 Data Disks | RealaT | request.Old Rare Games | 2 | 04 June 2002 13:47 |
|
|