A look at various simple dithering algorithms in C++ [shorts #3]

The previous short article investigated a simple method for scaling images using standard C++. In that article, I mentioned that I was working on a way to shrink images for displaying them on the Mac Classic CRT. I also mentioned that, to display the images on the Mac’s CRT, I’d also need to employ a dithering algorithm to prevent losing too much detail. Therefore, this article takes a look at three simple and popular dithering algorithms implemented in C++.

Continue reading A look at various simple dithering algorithms in C++ [shorts #3]

How to resize bitmap images using C++ [shorts #2]

Since 2016, I’ve always returned back to my Macintosh Classic CRT build, constantly trying to refine the project and make it easier to reproduce my results. In my latest attempt, I used a Raspberry Pi to communicate with the monitor. While that method worked like a charm for me, others have reported a few problems they’ve encountered and possible solutions. In my next attempt to finally get this project right, I decided to go down another path. Without going into too much detail here, the new method required me to implement a simple scaling and dithering algorithm in C++. This short article discusses my image scaling solution in C++.

Continue reading How to resize bitmap images using C++ [shorts #2]

Use genetic algorithms to improve enemy AI over time in video games

I’ve played my fair share of video games in the past twenty years, and ever since I played for the first time, I was fascinated with how someone could make these games work. More often than not, a special mechanic in a game left me wondering how the programmers could implement a certain feature. However, i often notice patterns in enemy behavior. Therefore, it is way too easy for the player to predict how enemies might react to certain situations. While this might have to do with limited AI design, I recently had the idea to experiment with genetic algorithms to make enemies adopt to the player’s style over time to make it more difficult for the player to achieve his goals. My theory is that this way, enemies will adapt to the player over time, and this, in turn, forces the player to try different strategies to succeed. This article summarizes my experiments and discusses the results and how they could be applied in game development.

Continue reading Use genetic algorithms to improve enemy AI over time in video games

Simple collision avoidance AI in Unity3D

I’m currently working on a small 3D arcade game inspired by classical top down races in Unity3D. The game will feature enemy opponents, which means that they have to have at least some kind of AI. This AI consists of simple collision avoidance algorithm, so that the enemies don’t crash into walls constantly, and a very simple path following algorithm so that the opponents can find their way around the racetrack. I’ve built a quick prototype with simple boxes and a path. Continue reading Simple collision avoidance AI in Unity3D