Friday, June 12, 2020

The Wolf in the Woods Android app

After several weekends of work I'm pleased to announce that the Wolf in the Woods trick taking card game is available as an Android app.

The bot is slightly improved from the website version of the game which is still available at https://wolfinthewoods.playagame.app. When determining who "won" a hand it considers the overall score differential rather than whoever received the 6 point payout as I described in my earlier post.

This is the first game I've implemented that uses animations where elements move between different areas. After switching to React and similar solutions for the frontends of my games I've found it to be very difficult to add animations and I didn't want to go backwards to technologies where I had to deal with more manual state management given how hard it is to get right. I did a lot of research into how much work it would be to add animation using Flutter and a variety of Javascript frameworks and eventually decided to try Svelte. Svelte is similar to React in many ways but the implementation is totally different. Instead of having a virtual DOM Svelte compiles your Javascript source and adds additional code to directly modify the DOM.

My previous apps have been written in a variety of different languages (Flutter, Java, and Kotlin compiled to JS). This app is a hybrid where the game logic and bot are written in Kotlin so it can be relatively fast and the "frontend" is implemented in HTML and Javascript and displayed in a webview. This led to some very annoying bugs (which I think I fixed but if not please drop me a line). I'm not sure I will make another app this way and I'm already considering a rewrite in Dart/Flutter so I can have the frontend and backend written in the same language. That would also make it easier to port to iOS.

Let me know what you think!


No comments:

Post a Comment