I cannot seem to get my pinball to go off screen and be destroyed. It bounces on the edge of the screen.
My pinball game
It is getting big I know. Here is a screenshot.

Hold “Down” and release to launch the ball.
The reference material says “With a scene that has no tilemap set, make a sprite bounce on the edges of the screen” which I assume mean that if there is a tilemap then it won’t bounce on the edge?
If this is not the case, how can I bounce a sprite on tilemap walls but not on the edge?
When you have a tilemap set, any tiles outside the bounds of the tilemap are treated as walls. That’s why you’re getting the “hits the edge of the screen” behavior, it’s actually hitting the edge of the tilemap.
If you want to have the ball go off the bottom of the screen, you’re going to have to add an extra row of non-wall tiles at the bottom and then do your own camera management instead of using the “camera follow sprite” block. Here’s some sample code that shows what I mean:
2 Likes
BTW that sample uses the arcade-tile-util extension!
2 Likes
it is bouncing because you have bounce on wall enabled
1 Like
Thank you! This extension looks awesome for many reasons. For now, I will probably just create a tiny sprite to kill the ball. But thank you so much!
1 Like