Oh, right basically I'm just cutting down on resource usage from the built in for each loops and appending each item to a manual loop iterator (using globals combined with a param in each function (note: only one function))
but simply put it goes like
call function loops:
1-20
add 1 to a value sort 1_20 (a list of sorts)
20-40
add 1 to a value sort 20_40 (you will always want to reset the counter once over 40 to the base 20 and then add 1, never counting 20 of course)
etc etc each are loops.
Each loop ends with one group of SpriteObject Variables (well, UIDs) being tested per loop, and with those being chosen, pass their param via one CENTRAL function with CentralFunc(Param0: SpriteObject.UID) its a way ive been creating class built in functions because I cant actual create classes in construct 2 which can inherent scripts within them and choose themselves. Atleast thats what is capable within game maker.
Now I despise game Maker studio, not only is it buggy but their EULA is restrictive and they themselves say they will enforce it any time of their choosing. (Anyone know of an engine much like game maker with scripts? )
So, Ive got issues, right now if you do stuff like
Every "dt * value" seconds--->
For each object ---->
pass object to a function(param0: object.UID) and then in the function test to see if it is equal to function.param(0) it works,
my problem stems from, yes I can do it instead like:
pick object with a param/variable ---->
test another condition or even overlap of a sensor object ---->
pass object to a function(param0: object.UID) and then in the function test to see if it is equal to function.param(0) it works,
The bad thing baout this, right now I got about 1000+ instances and the CPU usage is manageable, HOWEVER, if I dont create like 3 or 4 of these individual functions that only scope a certain about of objects each time (I.E. a range of objects with a unique variable, or objects onto a list (not sure how this is done in construct 2 tbh)) then I get TERRRIBLE bottle neck issues where some AI dont even get picked for over 50 seconds or more.
I was wondering like what are some ways to go about managing these bottlenecks with the manageable way besides calling separate scoping loops ruining each tick in tandem with one another?
GlobalVar1_1to100: 0
add to GlobalVar1_1to100: 1
On Loop 1-100>>
ID > 0 <= 100>>
pick if ID == GlobalVar1_1to100>>
call function func(param0: UID)
then function with matching UID as normal, make 4or 5 of these with blocks of 101-200, 201-300, etc etcetc
seems to be the fastest way when dealing with instances over 1000+