Big news, everyone! Pinball Spire is coming to Nintendo Switch! 🤩

Climb to the top of a mysterious spire using special abilities and the mechanics of #pinball. Play at your own pace with the handy Focus ability that lets you slow down time and aim your shots! 🧙✨🎯

Check out the trailer:
https://www.youtube.com/watch?v=0LcQEVZvgYE

And pre-order the game with a limited-time discount:
➡️ https://www.nintendo.com/us/store/products/pinball-spire-switch/

(Boosts greatly appreciated!)

#nintendo #switch #gamedev #indiegame #solodev #indiegamedev #games #gaming

Pinball Spire | Nintendo Switch Announcement Trailer | indie.io

YouTube
@apparition I think I found a bug in Arcane Engine where boosting into a spring in the top left area can shoot you out of the map. I fell several maps down and ended up unable to move. Had to restart from save. Switch.

@morten_skaaning Ah, that sucks, sorry! Thanks for reporting the issue. Was it one of these two areas?

I see you're a physics programmer so this is awkward... haha! I have continuous collision detection enabled on the ball so this sort of thing theoretically shouldn't happen. 😆

@morten_skaaning Unless the ball got squeezed through a wall by something... I do wonder whether I need to make some of these channels just a tiny bit wider. 🤔
@morten_skaaning Hmm... I feel like changing the wall colliders to solid polygons might help too. Not sure why I didn't do that before.

@apparition I guess if there's too many contacts around the sphere, or some object/door is teleported on top of the sphere for a single frame, something like this could happen. In other games I've ended up making a "semi-permeable collision priority" for cases where the outer walls needs to be respected much more than casual obstacles.

Anyways, I made some fast bounce near "1" and then the ball went left in the "2" direction.

@morten_skaaning Oh damn... It happened up where the enemy is? That makes sense because the enemy could've teleported on top of the ball as it's orbiting.

Can you tell me more about this semi-permeable collision priority approach? Are you referring to the Collider2D.layerOverridePriority property? If I'm understanding correctly, I want to give the enemy collider a lower priority?

No worries if you don't have time to elaborate. This has already been very helpful!

@morten_skaaning Yeah... Definitely looks like the enemy could push on the ball here. Whoops. 😬

Thanks for the help!

@apparition ah sorry, it's something I hack into the character controller 😊 For rigidbodies it could probably be done doing an extra solver pass on the "high priority" bodies. I don't know if Box2d can do something like that (ping @erin_catto 😅)
@morten_skaaning @apparition Box2D has a "bullet" option I would use for a pinball game. Exists in version 2. I even have a demo of this feature being used for pinball.

@erin_catto @morten_skaaning I can't believe I'm getting help from the developer of Box2D. It's like meeting a celebrity! 😁

I'm using Unity so most of the physics implementation details are hidden from me, but as far as I can tell Unity exposes Box2D's "bullet" option as the "Continuous" collision detection mode:

https://docs.unity3d.com/6000.1/Documentation/ScriptReference/CollisionDetectionMode2D.Continuous.html

I do have this enabled already and I believe it's indeed working reliably!

@erin_catto @morten_skaaning I think the particular issue Morten found here is actually caused by a rigidbody pushing another rigidbody through an edge wall. That's entirely my fault and I'll need to tweak the design to prevent this. 😅

Really appreciate the help from you guys!

@apparition @morten_skaaning Ah, in that case be careful of the mass ratios. Glad you found the bullet option, it was designed for pinball games.
@erin_catto @morten_skaaning Thanks, Erin! That's really cool. Thank you for all your hard work on this framework!

@morten_skaaning This is fixed now! Thanks again for the bug report.

It turned out this could happen if the enemy respawned directly on top of the ball. I already had a physics clearance check in place to prevent this exact issue, but it wasn't working when the ball was on a rail (since this moves the ball to a different physics layer). This gap is now patched! 😄