I am trying a space invader tape app. the only difference is the aliens (15 image sprites total, may add more in different screens later), and the space ship is flung rather than just moving left and right horizontally.
Trying to use the “when Any ImageSprite collided with” event handler, rather than dealing with each which i did and seem to work. The reason I said it seem to work is that my old phone has the AI Companion loaded slows down so much that it freezes up. I suspect is the method it communicates to the APP Inventor via browser, rather than the phone processing power.
Anyway, below is a block I have so far. What is missing is that I want to move the bullet to the current location of the space ship. But space ship only reports location when flung or touched (currently events handlers updating space ship locations (x, y). Have seen a few posts using Clock to manage space ship locations updates. Since I am using Clock to time the alien spawns, putting the bullet ImageSprite update in clock seems to delay the bullet update and create more issues.
Appreciate any suggestions and recommendations with example.
You test other and component against your predefined Sprite components
to see what kind of collision happened, bullet against enemy vs enemy against enemy, etc.
A Built app runs faster than one in the Ompanion.
Setting a Sprite’s Speed and direction give you faster movement than
nudging things within a Clock Timer.
Thanks ABG. Increasing the speed of space ship and bullet make sense, and are easy to do. I can play around with the imagesprite.speed. Let me understand your “bullet against enemy vs enemy against enemy” approach. I would put the interaction at each invader imagesprite? That should be straight forward, but now I would have the same for each invader imagesprite. And, that can be like over 30 on the next screen (representing different levels). That’s there is an easy way or “list” method to this approach like when initializing them in the beginning.
This still doesn’t resolve the bullet returning to the space ship location. Any suggestions there in terms of where I would put the blocks? I have seen in this forum or similar to the “Ladybug Chase” example, that one would create a Procedure to update heading and speed of the ladybug in Clock.
The following block seems to work well with when any invader imagesprites reach an edge.
Trying to do the same when these invader imagesprites collided with bullet ImageSprites