So I’m a newb and don’t know anything about anything so if you were me and when you checked your performance profile and your logic was at an astounding 55% what kinds of things would you look for to reduce that?
I know without looking at everything answers will be generalities but generalities will help me a good bit at this point
Thanks for the heads up. I will try those changes. Nothing in particular is bad. I assumed it was laggy because my models were too high poly but then I saw the logic being so crazy high. A lot of things are being checked at the same time so i’ll make adjustments.
have a “collector” that updates a list every 60 frames, the other objects grab a list from,
always 60---------------python
import bge
cont=bge.logic.getCurrentController()
Collector['EnemyList']=[]
for item in bge.logic.getCurrentScene().objects:
if 'enemy' in item:
add to enemy list
this way, each unit can grab the list collector’s object id on the first frame,
if 'Collector' not in own:
own['Collector']=bge.logic.getCurrentScene().objects['Collector']
And then it’s already stored the list location so you can get at it later