Sign in

Well it had been ten years James thought to himself, a project that he strived to perfect and yet to this day felt as though he had made some crucial errors along the way, while limiting the previous version to the Win32 API was intentional, some of the finer details where a product of the times, some outright bad code, wave table oscillators with for loops (ouch), wav export with jumbled use of bytes, writing 8-bit mono as 16-bit, although none of these problems where particularly evident to those who used the Borg, they where just imperfections that needed to…


Interpolation functions help turn low resolution discretely sampled signals back into their continuous counterparts. In this document we will be benchmarking the performance of a wide range of interpolators from MusicDSP.org, Paul Bourke, and Olli Niemitalo.

Wikipedia
In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave (a continuous signal) to a sequence of samples (a discrete-time signal). A sample is a value or set of values at a point in time and/or space

Essentially a computer will quantize a continuous-time domain signal by sampling…


It is rare that anyone would want to circumvent the sin() function, but, there are a few cases where it would be beneficial. This document benchmarks the regular sin() function against a linearly interpolated wavetable, an aliased wavetable, an infinite impulse response sine wave, and seven polynomial approximations of varying accuracy.

The IIR sine wave is setup with initial parameters and then called on a per tick basis, it is not the kind of function you’d pass parameters to on every call; just on initialisation. These are good for audio applications when you need simple and high-quality sine waves at…


Fast floating-point functions with a good distribution are essential in a number of applications from games to machine learning. In this article, I will be benchmarking the fastest floating-point random implementations for both uniform ranged randoms and Box-Muller normal distributions.

Introducing the random functions I will be testing in uniform 0–1 range:

The classic rand() 15-bit range

If you are benchmarking small single functions that denominate down to only a few lines of instructions or even just functions that complete execution in a very small amount of time then the only way to get an accurate benchmark is using the RDTSC function.

Traditionally when one might decide to performance benchmark segments of code they may choose some timer of varying resolution, the lower the resolution the more iterations the benchmark is run for to get a better approximation.

Traditionally computers all have a second resolution ticker in time.h using the time() function. …


Sometimes you might want a simple database system that uses the OS file system to increment or decrement a balance or score, but in PHP and other web server languages this can be problematic.

Why would you want to avoid using a widely used database system such as MySQL? In some cases a fully-fledged database system may be overkill, say you have a simple web game such as Neopets (oh the cringe of the late ’90s) and you just wish to make sure all player balances are accounted for correctly when handled by a PHP thread spawned by NGINX or…


Korg ER-1 MKII, image sourced from encyclotronic

Prior to beginning my first year at university I was not too interested in sound, to me it was just a means to an end for game concepts that I was working on. I mostly used CD sound effect packs and recorded effects using a Dictaphone to then clean them up in Audacity later on. Although this was all to change when I became friends with another student in the living quarters or halls opposite me. Ewan.

Ewan had a Korg ER-1 MKII and he was absolutely obsessed with audio engineering, particularly sound synthesis and this rubbed off on me…


In this article, I will demonstrate how to set up a Real-Time Neural Style Transfer (NST) pipeline on the open-source game ioQuake3 using the Ubuntu operating system. This is dependent on how much compute power you have available, but if we put it this way, we can do a slide show on a single RTX 2060.

The first thing we need to do is export screen buffers on demand, luckily for us, this is relatively simple using an open-source video game that renders using OpenGL. …


In continuation to Part 5 of “Creating a Machine Learning Auto-shoot bot for CS:GO.” this time around I have worked on perfecting the Keras CNN trained models for both the original 28x28 sample window size and the new 92x192 sample window.

Throughout this entire series there has been one major bottleneck to this project and that has been the speed at which the popular X window manager, commonly used with Linux, can retrieve rectangles of pixels from the CS:GO game. For the 28x28 sample size, this bottleneck tends to average around 50–60 FPS. For the 96x192 sample size, we’re talking…


In continuation to Part 4 of “Creating a Machine Learning Auto-shoot bot for CS:GO.” I have once again used Tensorflow Keras to train the network weights but this time for the CNN version.

It’s not elegant, what I set out to achieve here was to re-use the same TBVGG3 code with minimal modification to load weights trained in Tensoflow Keras using Python. …

Fletch

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store