Elm or Suck-less front-end

Ok, so, I’m going to talk about Elm, but to understand what follows, there is
two things I might just tell you upfront:

Firstly, I really enjoy functional programming. When I’m not using Java for
school assessments (which I only use because I have to), I mostly use Haskell,
and I’m having a great time with it

Secondly, I’ve always be frustrated with Web front-end. HTML feels clumsy,
JavaScript allows so much in term of paradigms it does not even feel
consistent with itself, and CSS is such a pain for me to write that it does
not take long before I go back writing some terminal user interfaces.

Or at least it was like that until I stumbled upon Elm.

Continue reading “Elm or Suck-less front-end”

Unpopular Opinion #2: Open World Games Suck

The premise of living an alternate life in a different universe is enthralling. It’s what as gamers, we all desire. Those of us of a certain age used our imaginations (self constructed images and thoughts in your head) to try and make the best of what was available to us, in the hope that some day, just maybe, we will be able to actually inhabit the game. Oh it was exciting! As the years passed, we saw glimpses into the future, and it was happening! Finally, our dreams were coming true! Then, it happened, open world games arrived…

Continue reading “Unpopular Opinion #2: Open World Games Suck”

Unpopular Opinion #1: Teach Raw Pointers First

Being the administrator of a large programming Discord server, and the owner of a YouTube channel with a large audience of programming beginners, it is with some frequency that questions about the basics of programming are asked. In fact, it’s often the same questions. This is perfectly fine, after all, the ethos of One Lone Coder can be encapsulated in the phrase:

Continue reading “Unpopular Opinion #1: Teach Raw Pointers First”

Separating Axis Theorem Refinements and Expansion

intent

In this video, javidx9 explores two techniques for collision detection and static resolution for convex polygons. While his collision detection using the Separating Axis Theorem is just as robust as his diagonals approach, his static resolution for SAT is slightly naïve. His implementation assumes the smallest possible displacement to resolve the collision is along the vector between the centers of the colliding polygon and the collided polygon, with a magnitude of the smallest displacement. This assumption is not always correct, and can lead to incorrect resolution with large overlaps. The correct resolution vector is along the normal of the axis with the smallest overlap.

Continue reading “Separating Axis Theorem Refinements and Expansion”

Programming and The Art of War

A few days ago on the Discord, there was a question asked about whether you could teach programming through the medium of ‘philosophical text’. An example was how Sun Tzu’s classic, The Art of War, is used to teach business practices.

This got me thinking… Can The Art of War be applied to programming and software development in general… Turns out that, with a little bit of twisting and wild interpretation, that it can! I shared a few on the Discord server, but thought I’d give the idea a more permanent presence here on the blog.

Continue reading “Programming and The Art of War”

The olcPixelGameEngine for Retro Platforms Part I

I’m very found of the Atari 8-bit machines and the Atari ST. When I saw the PixelGameEngine (PGE for the rest of this text) i thought why not port it? I started to look at the Atari ST. Using my own 520 STM as a the target machine.

I soon realised that a regular port wouldn’t cut it. My first attempt was to remove a lot of stuff just to get it to compile. The first PGE binary needed a 4 MB machine. Not even close for my 512kB target machine. In the test program all graphics routines is written from scratch and that is because of the bit plane situation, more on that below.

Before we dig deeper let’s look at the hardware.

Continue reading “The olcPixelGameEngine for Retro Platforms Part I”