What I have so far with React and Kotlin is entirely passive; the game just runs and there is no way to control it. Today I thought it was time to get the first bit of user input – selecting the current player action. Design The first step here was a simple design: I wanted
Continue reading User Input – First Steps
Tag: tutorial
Web Workers in Kotlin
Something I’ve known is useful for a web game is using Web Workers – the reason for this is that we need something to run in the background when the page isn’t active, and a page’s timer runs much more slowly when the page isn’t in focus (eg if you go to another tab) Kotlin does
Continue reading Web Workers in Kotlin
Game loop in Kotlin
To start the game, the first thing I need is a game loop. Kotlin’s timers, unfortunately, lack some clear documentation. The first thing I noticed was that the timer functionality is, once again, just a wrapper of Java timer and not available for Javascript. This really makes me think I’m using a second-class version of
Continue reading Game loop in Kotlin