Logic/Physics vs Framerate (includes teaser JPG of new game)

I’m planning on adding some laser turrets (like in Star Wars) to my game, but I’m experiencing a heavy drop in framerate when I add radar sensors to them to detect targets. Each turret increases the Physics with 15%! Is this because distance and angle of the target needs to be calculated by the radar sensor? Is Python better for such a thing?

edit: it seems indeed that the Physics rate increases when the radar cone is bigger. 1 radar with a cone of 180 degrees is ‘heavier’ than 2 radars with 90 degrees each. This means that a radar DOES increase the Physics.

I assumed Physics was only increased when you are simulating physics, with gravity, dynamic actors, etc.

Teaser screenshot of my new game:

Earth Commando


Radar sensors are incredibly slow and should be avoided if at all possible. This is something I quickly discovered whilst developing AI. Using an animated empty to fire rays across an arc is a more efficient method of faking a radar cone.

The way I usually do it (unless it doesn’t meet current needs) is to make a long cube and turn on ghost and turn off visible attribute and use it to detect line of vision. You can also turn on the plyheader collision detection to make it more specific if need be.


Thank you for the tips.

I think I will stick to using the radar-sensor, but less and more precisely.
By now I managed to have 4 realistic laser-turrets on screen simultanously without a drop in framerate, so this will be the maximum I’ll use.

The difference between radar and the 2 suggestions mentioned is that radar uses a cone, which scans in 3 dimensions, not just 2.

I’m making a space-sim, so I need a 3-dimensional radar sensor.


i was making a space game too, i found out radars DONT work on added objects, as in a bot that is added that uses a radar,

i found out that u can similate a radar quite nicely by making a huge triangle, the size of your radar cone, and turning it on the correct axis so that it revolves into a cone shape… although u may expreince some delay in detection and uncontrollable pulses.