What I did in 2021?

ยท 304 words ยท 2 minute read

Here I’m going over what I did in 2021.

Built a Raspberry Pi Cluster #

  • Yes it’s all networked and in a PC case.
  • Did not really use it for anything yet.

Wrote a ray tracer in C++. #

I bought The Ray Tracer Challenge book.

  • I wrote a custom unit testing library and a python script to translate Gherkin to C++ tests.
  • Created spheres, cubes, CSGs, OBJ shapes from triangles.
  • Matrix multiplication, vectors.
  • I optimized matrix multiplication (of two 4x4) to be basically O(1), then I realized I could’ve just cached it.
  • Played around with gprof to make it fast as I can.
  • Creates a small UI for this.
  • Added Lua scripting with LuaJIT.
  • I learned a lot from this project, but I feel it can be improved a lot.
    • Use GPU instead using CPU, Rewrite in OpenCL, HIP, Cuda? (It can at the moment use all CPU cores).
  • I still did not put this to a git repo, and I should do so.

๐Ÿ“ CSG means Constructive Solid Geometry. Basically allows you to combine primitive shapes such as spheres, to come up with complex shapes by doing set-like operations (intersect, union).


Started working on a game project #

  • This is still in progress, and I have not got to this again as I was focusing more on the new programming language.
  • It’s immensely harder than I thought to squeeze out heavy processing under few milliseconds.
  • SFML is easy to use.

Started working on a new programming language #

  • Goal here is to create a language with Python like syntax that complies to C99. Statically typed and manual memory managed.
  • Strings will be special as the language will copy and free strings it will behave like any other value type like int to the user.

๐Ÿ“ Will be using SDS library for Strings.