Writing a game the hard way - from scratch using C - Part 2

Join me on a journey as I attempt to write a game for my Agon Light using nothing but raw C programming. In this second episode I figure out how to make a very basic 2D rigid body physics system work.

Watch the video


It doesn’t matter if you don’t have an Agon Light, I’m bringing you along for the ride. We’ll be looking at how games deal with the objects they manipulate, and how to detect and resolve collisions in 2D.

The code for my game library that I’m building is available on Github
https://github.com/ncot-tech/agon-template

This video contains an example of how I implemented a very basic 2D rigid body physics system with collision detection and resolution.

The 2D physics uses basic Euler Integration and Newton’s laws of motion, as explained in many places online. Here are a few resources I came across

It also makes use of fixed point maths since the eZ80 in the Agon Light that I am using does not have an FPU.

Subscribe

Related Content

  • Helios 1 Title Here January 3, 2025

    thumbnail image

Recent Content

  • Helios 1 Title Here January 3, 2025

    ...
  • About Me January 3, 2025

    thumbnail
  • Let's recreate a 90's PC BIOS Boot Screen December 13, 2024

    ...