I have been challenged by a friend of mine who believes it is easier to make a realistic bouncing ball in flash than it is in MMF2. I want to show him that it can be done just as well in MMF2. I have got some guidelines to work with:
Affected by gravity
Should bounce off pins correctly just like the coin pusher games when you drop your coin in
Correct direction of spin relative to bounce
Should eventually stop bouncing
those four conditions have to be met in order for me to get this to work. can anyone help?
Can they really be compared, just like that? Flash uses a C-style scripting language to do stuff. But whatever, I might just give it a try tomorrow. I can't code things at 2:00 in the morning.
Detection of ball collision can be made good ONLY if you have walls as vectors.
There are always some neat other options, but they will not work correctly in every situation. Most of them will give you a very big angle calculation errors (for example: 40-60degree).
Your friend is absolutely right. It seems you haven't ever tried to make such movement.
Flash is quite a bit easier. MMF 2 is not conductive to something that has a large amount of variables and calculations. Also the whole inability to get the normal of a surface is a real problem.
If that wasn't enough Flash also has a number of things to make tweening easier and it even has a few open source physics engines for it: http://www.cove.org/ape/demo1.htm
Now I have been working for the past year or so on an MMF 2 physics extension but vectors are better for displaying the results then bitmap graphics . The main thing that currently chokes up the MMF 2 engine is rotating active objects as it is slowww. Hopefully with HW acceleration this will improve.
So I hate to say it, but your friend is right. Not only that but I made that ball toy example .