-
Saving CPU
My last project lagged. I just had too much stuff going on. And since Im gonna start all over again, Im gonna save as much as possible.
A revolusion for me last time was replacing my fastloops with ForEach loops. Is this object better for other stuff too? And do anyone have any other tips about common stuff to save CPU use?
-
Can you explain me in with way you use the code about ForEach loops?
I not understand where is this ForEach loop functionality.
Thanks
-
Are you sure you need to restart? You can just try to cut fat and optimize what you already have. E.g. keep events in groups and activate/deactivate according to what you need. Also make sure you keep your fast loops as light as possible. For example if there is a value that is a sin conversion that is the same for 1000 loops, instead of calculating it 1000 times, just do it once and then keep it in a global value to retrieve from.
-
I did not plan it through last time, I got so many new ideas :P And I learned from a lot of mistakes. I have changed a lot, so in many ways its a new game.
And the ForEach loop can be used for.. something.. I think in my previous project, at the beginning, I had all the monsters moving with a fastloop. This made the game run slow as sh*t. By replacing these events with ForEach loops, it ran smoother than ever again.
-
Someone has an example with ForEach loop?
-
There are two examples that are supplied with the For Each Object. They are located in the example folder in the MMF Folder.
Marv
-
My company hosts an UltraCode service, where a user will optimise your MMF2 code for you, if you want to try that out send your mfa to ultracode@dark-wire.com
-
Oh, that sounds cool! :) But you arent doing that for free?
-
Depending on the number of optimisations, it's free or very cheap :)
-
Cool :D Ill remember it :D