On another note, is there a way to have the same task spit out objects of different names which depend on a parameter so that you'd need only one task for all these interacting bullets? Something that involves converting stuff into strings with a command? Or the other way round? It could save pages of code and time.
Arrays. I don't wanna wrap my brain around that right now, too busy enjoying Uwabami Breakers.
If you check in
my scripts thread, you can check out Random Sign 「Entropy」 ...
This spellcard was made to demonstrate using arrays to keep track of several object shots (and give a glimpse of what truely random danmaku could look like :V ). I tried to comment it heavily enough that it can help you learn how to handle it.
If not, feel free to ask and I can give a more in-depth explaination.
BTW - you don't need a task to handle this. Like I did in the above spellcard, it can be all handled in
@MainLoop. That's my preferred style, but either way will work fine.
On the bouncing, I've done a spellcard where three objects bounce inside a cage, it's not that difficult. Bullets bouncing off of each other, well, as has been said you'd need to have all the bullets be on seperate IDs, which is troublesome if you want a high amount of bullets. The real problem though would be to make the bullets bounce in a realistic fashion. I've thought about it, and to really emulate a bounce that feels "right", providing that all bullets move at the same speed, a real bounce is imitated by setting the angle of both bullets to the angle of the other one. To do that, You have to store the angle of one bullet in a variable, then copy the other bullet's angle, than change the other bullet's angle to the value of the variable. One has to be careful, though. If both bullets have this ability, they will cancel each other out. Thus every bullet pair must have only one instance of this check. Which one it is bound to is obsolete. Hell, as you probably need different tasks for each bullet, you sould be just fine putting all the bounce controllers in the main loop!
I did "bullets bouncing off of lasers" in another spellcard in my post, Light Sign 「Reflection/Refraction」.
It's not commented as well as Entropy, but hopefully you can get something useful out of it. It handles object-to-object collision detection, and determines the angle of the bullet being reflected off of the laser.
(It also, by the way, refracts the same bullets through the lasers when they collide)
Its not exactly what you're referring to, but it might give some help.