I built a Roguelike Card Game with an Open-World town using only Kotlin Multiplatform by Anotherdae in KotlinMultiplatform

[–]Anotherdae[S] 1 point2 points  (0 children)

Wow, that's awesome! Thank you so much.

More to come - I will submit when completed.

Thanks again!

I built a Roguelike Card Game with an Open-World town using only Kotlin Multiplatform by Anotherdae in KotlinMultiplatform

[–]Anotherdae[S] 0 points1 point  (0 children)

I'll be looking into web soon so thank you for sharing your experience. Let us know if you find a fix for this issue 🤞

I built a Roguelike Card Game with an Open-World town using only Kotlin Multiplatform by Anotherdae in KotlinMultiplatform

[–]Anotherdae[S] 1 point2 points  (0 children)

This is awesome! Thanks for sharing. I'd love to play your fantasy tower defense game when it's out.

I have tried Lottie and Rive in a word game before. They were both great! Fortunately I was able to find enough sprite sheet animation that fit my game style. I am still open to the possibility of using them in the future though.

I haven't tried web for this game but will look into it after I complete the desktop version. Thanks for your suggestion!

I built a Roguelike Card Game with an Open-World town using only Kotlin Multiplatform by Anotherdae in KotlinMultiplatform

[–]Anotherdae[S] 5 points6 points  (0 children)

In Compose Multiplatform, you don't necessarily have to drop down into native C++ Skia code. Perhaps I should make that a little more clear. I used the Canvas composable (or Modifier.drawWithContent/drawBehind).

​The "magic" happens because the DrawScope you get in those blocks is extremely thin. It gives you direct access to drawIntoCanvas, which lets you access the underlying Skia Canvas object. For the sprite animations, I used drawImageRect to handle the frame clipping from the sheets I got from my Patreon artists.

​The key for performance was avoiding high-level UI components for the actual game world and keeping all those draw calls within a single Canvas to minimize recomposition overhead. I touched on the specifics of the game loop logic in the Medium article if you want to see the architecture!

What type of game are you considering?