Please fix UFO sound for custom cars

Feel that something could be improved? Let us know.

Moderators: Huki, jigebren

Please fix UFO sound for custom cars

Kenny
Methanolic
Kenny
Methanolic
Joined: 1 Jun 2010, 04:18 PM

15 Sep 2013, 02:26 PM #1

...or tell me at least why you think it shouldn't be implemented for custom cars to use because this really wasn't hard to figure out.

I can even tell you what you need to fix (assuming you didn't change that part of the code during development):

In ai_init.cpp change

Code: Select all

bool AI_InitPlayerAI(PLAYER *player)
{
//...
	{
  if (CarInfo[player->car.CarID].Class == CAR_CLASS_ELEC) sfx = SFX_ENGINE;
  else sfx = SFX_ENGINE_PETROL;

#ifdef _PC
  if (player->car.CarID == CARID_KEY4) sfx = SFX_ENGINE_CLOCKWORK;
  else if (player->car.CarID == CARID_UFO) sfx = SFX_ENGINE_UFO;
#endif
  //...
	}
//...
}
to

Code: Select all

bool AI_InitPlayerAI(PLAYER *player)
{
//...
	{
  if (CarInfo[player->car.CarID].Class == CAR_CLASS_ELEC) sfx = SFX_ENGINE;
  else if (CarInfo[player->car.CarID].Class == CAR_CLASS_OTHER) sfx = SFX_ENGINE_UFO;
  else sfx = SFX_ENGINE_PETROL;
  
  if (player->car.CarID == CARID_KEY4) sfx = SFX_ENGINE_CLOCKWORK;
//...
	}
//...
}
That way all cars that have class 2 ("Special" or "Other") would have the same engine sound as UFO. And you wouldn't even have to change anything in the UFO parameters, everything would be compatible.

Also if it wasn't for the sound this extra class is moreless useless and merely a name difference.
Quote
Like
Share

Rexreynolds
Regular
Joined: 4 Aug 2013, 01:13 AM

15 Sep 2013, 05:05 PM #2

well I can't tell you exactly what the difference is, but there is a difference in performance between glow & special. was pl-er-testing my cougar wannabe top speed as special 42-43, as glow 44-46 mph. short of getting out a stopwatch that is as much as I can tell at this time.
rex
Quote
Like
Share

Skarma
Everclear-Addict
Skarma
Everclear-Addict
Joined: 20 Jul 2004, 01:05 PM

15 Sep 2013, 05:54 PM #3

As Rex says, there actually is a difference between Glow and Special classes. Special seems to make cars handle slightly differently, like more slippery or something so I don't recommend this.
Quote
Like
Share

Kenny
Methanolic
Kenny
Methanolic
Joined: 1 Jun 2010, 04:18 PM

15 Sep 2013, 06:49 PM #4

1) This modification would only change the car sound to UFO. But alternatively one could also check for the "Flying" parameter in the car's parameters file (would sound better for all those flying cars anyway imo).
The point is, I want custom cars to be able to use more than just the electric and glow engine sounds and this would be an easy and quick way to do it.

2) I didn't notice any difference in the car's behaviour ingame when I change its class from glow to special, neither handling nor speed or slipperiness (tried it with Cougar on Toys in the Hood 1).
Also as far as I can tell by looking at the source code there shouldn't be any difference whatsoever if this class is being used.
Unless they added something during development of course.
Quote
Like
Share

Rexreynolds
Regular
Joined: 4 Aug 2013, 01:13 AM

15 Sep 2013, 07:08 PM #5

right. did a quick batch of tests. the car my 'WOOSH' (rookie, normally electric, slightly modified from what is in my drop folder namely wheel friction up .01 over 'stock' ), track sunset hills. electric 1:00.953*, glow 1:02.437, special 1:01.052. special felt much like a blend of glow + electric with acc. from the line a bit less than electric top end a bit less than glow. the fun bit was when I added flying to the mix...special was more prone to 'flying' than either of the others with glow a close 2nd. of course since the normal top speed is 32mph my results may not match when applied to a faster car.
*I've managed to achieve 1:00.253 with the woosh car...but I had to work at it :), normal best lap times run around 1:01 and change.
rex
Quote
Like
Share

Kenny
Methanolic
Kenny
Methanolic
Joined: 1 Jun 2010, 04:18 PM

15 Sep 2013, 08:50 PM #6

Okay even though this is going offtopic I'll post this here because I was curious about whether there actually is a difference in car behaviour or not.

I did some extensive testing by letting the AI race on time trial with Cougar on Toys in the Hood 1 and Supermarket 2 (using the -gazzasaicar parameter). I let the car race one round, then restarted the level and raced again to be sure that the times are somewhat consistent.

Here are the results:

Toys in the Hood 1
Glow:
1st run - 51:674
2nd run - 51:674
3rd run - 51:673

Special:
1st run - 51:665
2nd run - 51:673
3rd run - 51:673

Supermarket 2 (at the times that are off the car hit the automatic door at the end of the level, I assume the speed of the door seems to vary from time to time so I did more runs to be safe and in those the car wasn't influenced by it)
Glow:
1st run - 28:219
2nd run - 25:669
3rd run - 25:675
4th run - 25:676
5th run - 25:670

Special:
1st run - 25:667
2nd run - 30:295
3rd run - 25:670
4th run - 25:676
5th run - 25:669

You can easily see that the times are all less then 10 milliseconds apart from each other (except the two times on market2 which I already explained why that happened) so I think it is safe to assume that there is no difference in car behaviour.
If there would be any then the times would have a (much) greater difference, even the slightest change in the car affecting parameters causes the AI to behave different and therefore either doing some parts of the tracks better or worse than before.

But you can try for yourself and see if you get any other times (I'm actually curious if they are different, even compared to the ones I recorded).
Note that you shouldn't use window mode for this because the overall game behaves different in that mode compared to normal fullscreen (also I'm using the latest alpha 13.0820).
And I'm sorry if you disagree with me but I rather trust reproducable results than "feelings".
Quote
Like
Share

Rexreynolds
Regular
Joined: 4 Aug 2013, 01:13 AM

16 Sep 2013, 02:27 AM #7

driving is all about 'feel'. and just an observation, the computer is slower than I am, its' time for Col. moss on sunset hills is 2 sec.s slower than mine, likewise for my 'acclaim' retune.
rex
Quote
Like
Share