Takeover: A Turn-Based Strategy Game
Over the holidays, I had the opportunity to work on a spare time project, and so I sat down and wrote a casual, turn-based strategy game; a variant (you might say: a clone) of the KDE game Konquest.
Bridson's Blue Noise Algorithm Examined
Finding a realistic (or at least, realistic looking) initial configuration of game objects or simulation particles can be a challenge. The desired configuration should appear to be both “random” and at the same time “spatially uniform”, without objects clustering together or overlapping.
Hidden Markov Models
I have started to get interested in Hidden Markov Models (HMM). As a warm-up, I prepared a pure Python implementation of the relevant algorithms (github).
Read Again: The Art of UNIX Programming by Eric S. Raymond
In a moment of nostalgia, I picked up my copy of “The Art of UNIX Programming” by Eric S. Raymond (esr) and flipped through it again. It’s a book I’ve had since when it came out in 2004, and that I’ve always been quite fond of. I was looking forward to a review of “the way the future was”, as viewed from the early 2000s. So, it came as a bit of a surprise to me to find that the book seems to have aged rather poorly.
Command Line Arguments with Python's Argparse Module
Processing command-line arguments in ad-hoc python tools is one of those areas where I tend to just hack it together from scratch — simply because the effort of learning and understanding the relevant library packages not only seems to be more work than it is worth, but also and in particular more effort than “just doing it” by hand. I don’t want anything fancy, after all. I just want to get it done.
A Comparison of Pixel-Art Scalers
I recently got interested in algorithms for scaling pixel art images, such as icons or video game sprites. The Wikipedia page on the topic lists a handful of different algorithms that have been developed for that purpose.
A Look at the HDF5 Format
I occasionally see references to the HDF5 file format, but I have never encountered it in the wild. But a recent project generated multiple data sets simultaneously, in addition to metadata. Was there a better way than maintaining a collection of flat files? This prompted me to look at HDF5.
The Diamond-Square Algorithm for Terrain Generation
The Diamond-Square Algorithm is the natural first stop for generating artificial landscapes. The algorithm itself is beautifully simple (more details below, and on its Wikipedia page). But a casual implementation ended up not working at all, prompting me to look for an existing implementation to learn from. However, most implementations I found looked hideously complicated (or just hideous), not necessarily correct, and/or used out-of-date programming languages and styles. It therefore seemed like a good idea to create a clean, simple “reference” implementation of this algorithm, using a contemporary and widely known programming language and style.
Solving a 1993 Programming Challenge in 2022 (Updated)
I recently came across a collection of old (1990s) “programming challenges”. I thought it might be amusing to tackle one of these challenges using technologies from the period in which they were posed, and compare the solution to one using contemporary techniques. In other words, do the same problem in C and Python.