Andy, shouldn't it be Disappearing animation instead of Appearing? Objects are destroyed after Disappearing animation.







Andy, shouldn't it be Disappearing animation instead of Appearing? Objects are destroyed after Disappearing animation.
"If an object is static you can turn off "Save background". This is only if the object never moves or changes layers (or goes from visible to invisible or vice versa)
You can also turn off transparency on objects that don't have any use for it. (like solid square active objects that don't use the transparency channel at all)"
Had no idea about this! How much performance could be saved by turning off these for everything possible?
"Try to use short names for loops - MMF looks through list of all active loops letter by letter"
Is this something to keep in mind even if you are only enabling the groups with loops that you currently want to use?
(activate group, run loop, deactive group)
"it plays out the Disappearing animation automatically and when that finishes as there are not other animation categories, MMF will destroy it."
How come this so much faster then having an event to destroy the object when animation stopped is over? (apart from being very convinient)
It definitely can't hurt! :p
It's not as important.Is this something to keep in mind even if you are only enabling the groups with loops that you currently want to use?
(activate group, run loop, deactive group)
I can't imagine it's much faster, if at all... I think it's just more convenient.How come this so much faster then having an event to destroy the object when animation stopped is over? (apart from being very convinient)
![]()

Quick question: Say you have a few events that have the same conditions, but each has an extra one that differs between them. Is it faster to have those checks on each one, or is it faster to enable/disable a group containing them?
e.g.:
if A = 1
if B = 0
-- do a thing
if A = 1
if B = 1
-- do a thing
if A = 1
if B = 2
-- do a thing
as opposed to
if A = 1
-- activate group A=1
A=1
- if B = 0
--- do a thing
- if B = 1
--- do a thing
- if B = 2
--- do a thing
- always
--- deactivate group A=1
The group method would be more efficient because MMF is having to look at fewer conditions if A isn't equal to 1. Without the groups MMF has to look at each condition to compare the A value.

Is activating/deactivating groups a quick process though? How far can you go in optimization by abusing groups?
One thing I have read about when developing games is Object Pooling. Is this something that would be a good idea to use in mmf applications as well?
For example say you are developing a bullet hell game where there can often be 100:eds of bullets on the screen at the same time flying around. Instead of creating these bullets when they are fired and destroying them after they have hit something or left the screen, they are added to the "Pool".
So say you fire a gun that spits out 20 bullets, instead of creating those 20 bullets you retrieve them from outside the screen where they are lying dormant, position them at the gun and then activate their movement. When they have hit an enemy their movement are stopped and they are placed outside the screen again. It would look the same as if they where created and destroyed on impact.
What do you think about this? Could this be used to speed up a game that uses many objects like these, particles, bullets or whatever?
http://en.wikipedia.org/wiki/Object_pool_pattern
Outcast, I can't give you a definitive answer, but my guess would be yes it's better to pool the objects since creating them and destroying them would seem to require more processing than just having them always be there inactive off screen.
I know I've done this before for effects like rain where the rain drops exit the bottom of the screen and then just reposition themselves at the top of the screen at a random x position instead of destroying at bottom of screen and recreating them again at the top.
I'm working on optimizing my game, and I was wondering about collision with a group.
Such as: Active1 collides with group "good"
Is this less efficient than:
Active1 collides with Active3
Active1 collides with Active4
Active1 collides with Active4
etc.
I have a lot of actives (64) on screen at all times, and it's much easier to just check against the group than each of the different objects.
Which is more efficient, 1 event checking a group, or half a dozen or so events checking all the individual objects?
Also related to collision:
Is an event like "Object1 is overlapping Object2" inefficient if Object 2 only exists briefly in the game? Would the runtime be checking for collision regarldess?
Also, how efficient is the event " number of objects (Active1)=0"?
-Thanks