Author Topic: Server ghost mode.  (Read 3100 times)

0 Members and 1 Guest are viewing this topic.

Offline Demiveil

  • Administrator
  • Nub
  • *****
  • Posts: 257
  • Yay or Nay +7/-2
    • View Profile
    • Speed is King
Server ghost mode.
« on: November 15, 2010, 09:46:31 PM »
Ok I've officially finished the first iteration of a ghost mode script. I've outlined in the suggestions board but I'll put it here too.
At current the system will count down 15 seconds, and then each vehicle will check to see if any other vehicle is within 5 metres of itself, and if there is none it will turn ghostmode off for itself. However if there is it will keep ghost mode on and the car will blink its alpha to indicated that ghost mode is trying to turn off.

I've tested it as much as I can but really I'm certain there will plenty of little issues with it, so I'm hoping that over the next few days you can all just let me know if you have any difficulties with it, or any suggestions to improve it. That'd be great.
Cheers
« Last Edit: May 24, 2011, 07:45:17 AM by Demiveil »

Offline Full_Metal

  • OM
  • [SiK] Member
  • Semi-Pro
  • ***
  • Posts: 819
  • Yay or Nay +9/-1
  • Awesome One
    • View Profile
Re: Server ghost mode.
« Reply #1 on: November 16, 2010, 12:28:59 AM »
awesome, ill have to drop in and check it out

From the mutilated burnt carcass of PHS, SiK arose from the ashes to conquer, destroy and decimate any opposing opposition that came in it's way.
This reign of terror has lasted for 10 glorious years.
And will continue to do so for many more.

Offline DemonSeed

  • Facts don't care about your feelings.
  • Administrator
  • A God
  • *****
  • Posts: 2282
  • Yay or Nay +4382/-4074
  • Don't try to force your PC dick down my throat.
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #2 on: November 16, 2010, 01:05:47 AM »
nice work man, but i was on xfire and msn all day and i never saw you, i wanted to test it :(
Created by 1thwonder

Offline PacMaan

  • [MgC] Member
  • Nooblit
  • *
  • Posts: 117
  • Yay or Nay +14/-0
  • /o\
    • View Profile
Re: Server ghost mode.
« Reply #3 on: November 16, 2010, 02:18:02 PM »
Sounds like a great system - if it works! lol

Offline asablic

  • Nub
  • **
  • Posts: 328
  • Yay or Nay +3/-0
    • View Profile
Re: Server ghost mode.
« Reply #4 on: November 16, 2010, 03:55:52 PM »
Nice work comrade!  ;)

Offline DemonSeed

  • Facts don't care about your feelings.
  • Administrator
  • A God
  • *****
  • Posts: 2282
  • Yay or Nay +4382/-4074
  • Don't try to force your PC dick down my throat.
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #5 on: November 17, 2010, 12:47:55 AM »
It works great, me and demi tested it and it works perfectly :)
Created by 1thwonder

Offline foshizzler

  • [MgC] Member
  • Nooblit
  • *
  • Posts: 35
  • Yay or Nay +0/-0
  • YOU ARE NOT COOL
    • View Profile
Re: Server ghost mode.
« Reply #6 on: November 17, 2010, 12:27:48 PM »
is the ghost bar case closed?

Offline Demiveil

  • Administrator
  • Nub
  • *****
  • Posts: 257
  • Yay or Nay +7/-2
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #7 on: November 17, 2010, 06:21:37 PM »
Ah what do ye mean by that exactly?

Offline AcidbRain

  • -]alw[- Member
  • Nooblit
  • *
  • Posts: 5
  • Yay or Nay +0/-0
    • View Profile
Re: Server ghost mode.
« Reply #8 on: November 18, 2010, 06:39:28 AM »
This is actually a cool script, and the one thing I'd change would be the method used to determine the distances between vehicles; you can find an improved method within the race script itself, on util_client.lua:
Code: [Select]
-- Calculate the gap between element bounding spheres
function getGapBetweenElements( elemA, elemB )
if not isElement( elemA ) or not isElement( elemB ) then
return false
end
local x,y,z = getElementPosition( elemA )
local distance = getDistanceBetweenPoints3D( x, y, z, getElementPosition( elemB ) )
distance = distance - ( getElementRadius( elemA ) or 0 )
distance = distance - ( getElementRadius( elemB ) or 0 )
return math.max( 0, distance )
end
This will get you the distance between the outer edges of the vehicles bounding spheres, instead of the distance between their centers. This may improve accuracy when you're dealing with vehicles larger than 5 units -- it's a rare occurence, but it's good to be prepared. ;)

Offline Demiveil

  • Administrator
  • Nub
  • *****
  • Posts: 257
  • Yay or Nay +7/-2
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #9 on: November 18, 2010, 07:11:05 AM »
Well actually my script does account for that, infact I actually pretty much wrote that quoted function myself, using the getElementRadius. Obviously I wasn't aware that that function already existed, but yes mine does compare the radius of each vehicle in the calculation thus ensuring the gap between vehicles is over 5.
 ;)
« Last Edit: November 18, 2010, 07:14:52 AM by Demiveil »

Offline Grim_Reeper

  • Semi-Pro
  • ***
  • Posts: 583
  • Yay or Nay +65535/-22
    • View Profile
Re: Server ghost mode.
« Reply #10 on: November 18, 2010, 11:35:16 PM »
Well done Demi

Would like to see this work in action :>

-------------------------------------------------------

Offline Demiveil

  • Administrator
  • Nub
  • *****
  • Posts: 257
  • Yay or Nay +7/-2
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #11 on: January 11, 2011, 08:44:28 PM »
Well whilst the system does work more or less flawlessly its reception hasn't been as positive as I would of hoped.
As such I'm opting to remove the system and go back to the good old SiK style of full ghost mode.

Offline DemonSeed

  • Facts don't care about your feelings.
  • Administrator
  • A God
  • *****
  • Posts: 2282
  • Yay or Nay +4382/-4074
  • Don't try to force your PC dick down my throat.
    • View Profile
    • Speed is King
Re: Server ghost mode.
« Reply #12 on: January 11, 2011, 09:44:07 PM »
Yeah everyone is clamoring for the old ghost to come back, the main reason we did this is to get more players, i did not see that.

So i'm down with going back.
Created by 1thwonder

Offline Blacky

  • Administrator
  • All Pro
  • *****
  • Posts: 1062
  • Yay or Nay +14/-2
    • View Profile
Re: Server ghost mode.
« Reply #13 on: January 13, 2011, 06:26:10 PM »
Yes, nice idea, I prefer the old ghostmode, and it's better for me now, because my ping increased a lot now. And I'm very dangerous  when I'm racing with high ping.


 

anything