Building a Sliding Puzzle Game in .NET MAUI - Part 7
A working game is one thing; one that feels good to play is another. This instalment adds motion in two places.
On the level selection page, items start off screen using TranslationY and then TranslateTo brings them in with a small bounce, with each item staggered slightly so the list feels fluid. It’s triggered from the CollectionView ChildAdded event.
The more interesting part is the tile grid, which is drawn with .NET MAUI Graphics. Shaun shows that you can still use the Animation class there: an AreAnimationsEnabled property switches animations on for the level page only, tiles slide out over 750 milliseconds with Easing.SpringOut once a level loads, and tapped tiles slide into the empty space.
If you’ve wondered how to animate a custom-drawn control, the approach here is easy to adapt to your own projects.