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.
Plotting Financial Data With Python: Comparing ReturnsOctober 11, 2018
It’s hard to compare the returns on the given securities just by looking at their price history in absolute terms so we need to find a better way of comparing historical returns. One of the possible solutions is to adjust the whole data series in such a way that the first data point would be equal to some predefined number.
Plotting Financial Data With Python: VarianceOctober 6, 2018
Variance is an important indicator if you want to know the level of risk associated with a given security. It’s important to understand that past variance might not be a good predictor of future variance but most of the time it works and we don’t have other options anyway. Let’s create a script for displaying returns distribution, variance and standard deviation of any given security.
Plotting Financial Data With Python: HistorySeptember 30, 2018
Sometimes I need to plot some financial data and it might be tricky because most of the financial websites do not offer enough customization or they have a usage limitations unless you subscribe. So, I’ve decided to find a reliable data source and plot this data myself. Here are the basic steps that are necessary to do that.
How to Stay in Thailand Long-TermSeptember 4, 2018
I’ve been living in Thailand for a few years and these are reflections on what options foreigners have to stay in Thailand long term. How long is long-term? Most of the foreigners don’t even need a visa to stay in Thailand for 30 days or less and if you wish to stay for up to 3 months you can make a tourist visa before your arrival to Thailand.
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: