It should be cake walk to do that kind of calculations for any CPU at all.
Care to share a bit more of your event sheet ?
Sure
This is the whole function, which runs once every second.
global myindex < object.count
->object.variable= global myindex, do foo
->add 1 to global myindex
Yeah I had hoped to do that, but if one in the middle is destroyed it will fail to do anything on that tick. This is run every second, so at 60fps I would max out at 60 objects (when there are 300 on screen). It also needs to do the calculations in order - farms first, then houses. I could do:
every 0.1 seconds
repeat cell.count / 10 times
...But I don't know, it seems like bad design.
Here's a solution I have thought of which I really want to avoid:
keep a record of how many of each type exist in the world and add/subtract on create and destroy. Then make this go through each of the 6 resources (instead of cells) and calculate the max it can get from that. If disabling resource deficient cells, find the n top cells of that type and disable them. When a new thing is made, recalculate only the disabled ones
In theory this would always only be as laggy as 6 cells being calculated. Trouble is it's a massive pain in the butt to implement. It would mean making it completely, 100% airtight.