Optimisation Thread - getting more FPS, every known trick
Post anything you know about getting more FPS (especially in big projects), and I'll add your stuff to the thread. If you can give numbers of FPS you got from various tricks that'd be even better.
Added 15 tricks I know, (was 8) roughly ranked by efficacy. Many were suggested by SortaCore in GwerdyChat, who offers a service of speeding up your MMF project.
THE TRICKS!
-------------
#1 Reduce colour depth - if possible
Sebaceous - HUGE savings, brought my game to max FPS - Clickteam is there a way to choose a certain colour palette?
Konidias - I don't really see a noticeable difference, but I guess this is definitely a case by case basis
#2 Destroy objects off screen - recreate them as needed
Konidias - this might actually be worse than just disabling the object
#3 Use box-collision checks instead of fine
Konidias - In the RunTime Options for an object you just turn off "use fine detection" and then it will use box collision detection.
#4 Minimise collision checks, especially fine type, eg by putting the collision-check condition after a condition which is likely to evaluate false
Sebaceous - makes a difference!
Konidias - this totally depends on how many events MMF has to run through each frame... if you have like 10 events, this step will maybe save you 1fps... but if you have hundreds of events, it is good practice to order them by which condition is most likely to stop the need to continue checking that condition list
#5 Put most-likely-to-be-false conditions at the top of your events, BUT put costly checks like collision detections and calculations at the bottom
Sebaceous - this makes the most sense and seemed to save FPS for me
#6 Remove/rethink as many 'always-being-done' checks as possible, and try run them only when needed.
Sebaceous - Count objects only as needed, e.g. if you can only shoot when there are a certain number of objects on the screen, don't "Always" put how many objects there are into a counter. Just do the count at the bottom of the conditions for the firing event. This will make a big difference.
#7 Minimise use of fast loops
Sebaceous - makes quite a big difference
Konidias - this tip really depends on the fast loops and what they are doing. some fast loops are relatively harmless to framerate. it's good to try and put fastloops inside of groups that you can disable or enable when needed
#8 Don't use really big actives - eg instead of using a really big plain-colour active, set the colour of the frame.
Sebaceous - I don't have a working MMF at the moment but I think it's some method like "Set Frame Colour" of the Frame object.
#9 Do it with less objects - Crunch down the number of objects you use as low as possible.
#10 Use HWA (hardware acceleration) or minimise use of ink effects and transitions
#11 Minimise per-frame colour-swapping
Sebaecous - I don't have hwa but swapping about 6 colours every frame knocks about 6fps off my game. Use animations instead if possible.
#12 Disable groups of events when not needed
Sebaceous - didn't make much difference for me, maybe 1FPS
Konidias - depends on what's in the groups
#13 Minimise use of divisions (especially of precise numbers) or at least reduce the precision of your numbers if you are doing a lot of these every frame.
Sebaceous - Probably not an issue for most games. The Computer Science for the interested - http://en.wikipedia.org/wiki/Computa...cal_operations
#14 Remove 'Always' if its not the only condition of an event, and put all your always-actions in one always-event if possible
Sebaceous - People have said this makes a difference, I'm not sure.
#15 Remove all events with 'Never'
Sebaceous - probably makes no difference but its tidier
Konidias - I believe MMF removes these at build time anyway
Run through all these steps and you should notice a whopping great improvement in FPS.
Clickteam - a way of profiling MMF events for performance would be awesome. Oh and, sticky pweez? ^^