I ran a few tests myself and there is a definite impact on frame rate when a lot of lights are involved. It was odd though, the impact seemed to be non-linear. 1-10 really had no impact at all. 10-30 had a steady impact. 50+ tanked the frame rate in a hurry. I don't know how hardware dependent this is either.
The most important thing I learned is that you can have 10,000 lights on your map with no impact as long as they are not all being drawn at the same time. I will try to keep the light's on screen count under 10. I will also have to make sure the "detail" lights can be turned of on low spec machines.
I Got it!
I had to change the side motions
--Rightward Motion
if self.entity:GetAirborne()==false and (window:KeyDown(Key.W) or window:KeyDown(Key.S))== false then
if window:KeyDown(Key.Shift) and (window:KeyDown(Key.D) then
newmode = "sr_run"
self.entity:PlayAnimation("sr_jog_civ",0.03,100)
elseif
(window:KeyDown(Key.D)
newmode = "sr_walk"
self.entity:PlayAnimation("sr_walk_civ",0.02,100)
else
end
end
--Leftward Motion
if self.entity:GetAirborne()==false and (window:KeyDown(Key.W) or window:KeyDown(Key.S))== false then
if window:KeyDown(Key.Shift) and (window:KeyDown(Key.A) then
newmode = "sl_run"
self.entity:PlayAnimation("sl_jog_civ",0.03,100)
elseif
(window:KeyDown(Key.A)
newmode = "sl_walk"
self.entity:PlayAnimation("sl_walk_civ",0.02,100)
else
end
end
I don't know if this is the right way to do it. Heck, it might cause blue screens after 15 mins, but it works.