Kotlin 1.3 Features: CoroutinesFebruary 1, 2019
Coroutines have been available since Kotlin 1.1 but Kotlin 1.3 has lifted them out of experimental mode which means that Coroutines API is finalized and it’s ready to be used in production environments. There are many brave souls who’ve started using coroutines since the early days although the API has been changed with the release of Kotlin 1.
Kotlin 1.3 Features: ContractsDecember 3, 2018
The Kotlin compiler is pretty smart when it comes to static analysis but there are still cases when the code looks perfectly obvious to a programmer but it’s very difficult to understand for the compiler. Contracts were introduced in Kotlin 1.3 and their sole purpose is to improve the static analysis by letting programmers provide an additional information on what to expect from each particular function.
Kotlin Game Development: Finalizing The GameOctober 20, 2018
This is the last part of the “Kotlin Game Development” series and we are going to add the “game over” scene to our snake game and also reflect on the whole process. It might be helpful to read the previous posts first in order to understand what’s going on.
Kotlin Game Development: Game SceneOctober 19, 2018
Now that we have all of the required components we can start working on the actual game mechanics. In this post we’re going to create the GameScene class, the main scene where most of the action happens. This is the eighth part of the “Kotlin Game Development” series and it’s better if you read it in chronological order:
Kotlin Game Development: ModelOctober 18, 2018
We need a model layer to define what objects will exist within our game. We can define any object but since we’re working on the snake game it makes sense to start with the essentials: snake and apple. Feel free to add more objects such as bonuses if you think it would make the game more interesting.
Kotlin Game Development: Main MenuMay 30, 2018
Most of the games have a main menu because we might not always know what the user wants to do when he launches a game. He might want to start a new game, load the saved game data or modify the game settings but we will have a very simple menu in the Snake game which will have only one option: start a new game.
Kotlin Game Development: Game FactoryMay 15, 2018
We already have a set of components for controlling the game loop, drawing on a screen and processing the input events so why do we need something else? There are two key things that are still missing: We need a place to instantiate our game Our game needs a window so we have to provide it This is the fifth part of the “Kotlin Game Development” series and it’s better if you read it in chronological order:
Kotlin Game Development: Game LoopMay 9, 2018
Every game has a game loop. It is a simple loop that should be familiar to every programmer. We can think of a game as a sequence of static images changing fast enough to create an illusion of motion. The purpose of the game loop is to keep generating new frames as long as the loop lasts and, as with any loop, it should not last forever so we must have some way of breaking the loop, usually when a player decides to quit the game.
Kotlin Game Development: Controller InputMay 2, 2018
Controllers are devices that can register players’ actions and we want our players to be able to affect the course of a game, otherwise it’s just a fancy movie. In more technical terms it means that every game has a state and the game controllers are devices that can be used to alter that state.
Kotlin Game Development: Creating a SceneMay 2, 2018
Every game is different but, luckily for us, all video games share a common set of components and patterns. There are things that may be specific to a certain genre but on a high level all games are more or less the same and they all have the following components:
Kotlin Game Development: IntroductionMay 2, 2018
I’ve always been interested in game development since I’ve got my first video game console: Dendy, that was a hardware clone of the Nintendo Entertainment System. I’ve enjoyed playing video games but I was also interested in how those games worked under the hood. I knew nothing about programming and even computers in general but I was sure that game development is a lot of fun.