What did my vote do? is a tool written by by Roy Ward to explore the counting of the most recent local body election for the Dunedin City Council that was run using STV ( Single Transferrable Vote ). In particular, it lets you enter your vote, and then shows how this vote affected the counting process. It also has a mode where the counting can be stepped though on iteration at a time to explore…
Introduction A little over a year ago, I wrote a post Why I Wrote a Game Rendering Engine (and Why You Probably Shouldn’t) . This post is a short update on what I have learned about a couple of options mentioned in that post: Unreal Engine and Rust. Contents Introduction Contents Unreal Engine Rust Conclusion Unreal Engine I wrote: However, Unreal is huge and known to not be particularly…
Introduction This post describes a reasonably performant Prolog to C compiler prototype written in Prolog. It only compiles a the subset of Prolog, but it does include unification and backtracking, which is enough to demonstrate: N-queens , which is good for testing the performance of backtracking. the append predicate, which is an excellent example for demonstrating unification, backtracking and…
Introduction A little over three years ago, I had an idea - wouldn’t it be fun to have a whole procedurally generated universe on my phone, and have an open game where I can explore parts of it with no combat? This post describes some of the design decisions that I went through to start turning this idea into reality , and some of the consequences of those decisions. I’m writing this…
I’ve taken a break from blogging on optimization topics for a bit to get the Galaxy Generator into a releasable state - it is nowhere near feature complete, but the parts that I have done work fairly well. I’ve now got the rendering part somewhere close to my vision, and version 0.1.2 is available for download here for Android, Linux and Windows (Android will give some warnings about side-loading…
This blog is focused on software engineering topics of interest to me - mostly software optimization, number representation and compilers. Typically I will take a problem that I’m working on or worked on in the past, and describe the problem and the (somewhat sanitized) steps I took to solve it, including some of the thought processes that led me there. Criteria for blog posts: It has to be based…
Introduction I had a problem. The Galaxy Generator worked fine when I was moving around inside the Galaxy, but it seems important that I should be able to move outside it, turn the brightness up, and see the whole thing at once. When I tried that, the frame rate would drop to nearly zero and the machine would then run out of memory. Here was the sort of image that I was looking for:
Introduction While building my Galaxy Generator , one of the performance bottlenecks was in the generation of Poisson random variates to determine how many stars should be placed inside a voxel. This post looks at how to write a fast cross-platform Poisson random variate generator. First I motivate this by writing about why use Poisson random variates at all, then I explore the floating point case…
Introduction I have been working for some time on a Galaxy Generator project that procedurally generates and allows navigation in a 400 billion star galaxy. Stars are generated/removed as they enter/leave visual range. One of the performance bottlenecks is generating that data (which can be millions of stars per second) and getting it to the GPU for rendering. This post investigates doing that…
Introduction This post continues documenting the process of optimizing a small problem - generating images of the Mandelbrot Set. This builds on what I wrote in part 1 and gets to speeds of up to 130x the naive case. Again, this is mostly meant as an exercise to demonstrate how I go about using my knowledge of software design and computer architecture to optimize software. This post will be…
Introduction This post documents the process of optimizing a small problem - generating images of the Mandelbrot Set . Although I will show a speedup of ~8x over the naive implementation (there is a part 2 that will bring this to ~100x in some cases), this is mostly meant as an example of how I go about using my knowledge of software design and computer architecture to optimize software. This post…
In the News The post Optimization Example Mandelbrot Part 1 briefly made the front page of Hacker News . General Software Engineering A plea for Lean Software by Nikolaus Wirth (1995). This is still very valid today. Modern C++ Core Guidelines . Numeric Stuff What Every Computer Scientist Should Know About Floating-Point Arithmetic by David Goldberg (ACM Computing Surveys 23 issue 1, 1991) should…
Notes for downloading Galaxy*.exe If you are running something like Windows Defender Smartscreen, you may get a message suggesting to block running this because of “Unknown Publisher”. This is because I don’t yet have a Windows Code Signing Certificate, but if you have downloaded it from www.orange-kiwi.com , this is the same executable that was generated from my development machine as described…
If you want to be informed of Galaxy Generator updates, please contact me and I will add you to the notifications list. Android Linux Windows Changelog Android Hardware requrements: Android with ARMv8-A or later Software requirements: Android Version 7.0 (Nougat, API version 24) or later. Galaxy Generator 0.1.0 (Android) This will give some side-loading and self-signing warnings. Contact me if you…
Generate and navigate around a procedurally generated 400 billion star galaxy, on Android, Linux and Windows. This is being written using C++, Vulkan and Dear ImGui. More details coming soon, but here are some screenshots. Pre-alpha (a demo of the star rendering engine) now have Windows and Linux versions available for download . If you want to be informed of Galaxy Generator updates, please…
Contact Me Fill up the form below to send me a message or sign up for a (low volume) announcement email list. Name/email data will be kept securely and not be used for any other purpose and will not be shared with third parties. Name: Email: Message (optional) Email me when you post a new blog entry (usually related to optimization) Email me with Galaxy Project updates Invite me to be an internal…