Another post mortem, but on me :O

So throughout the trimester of Studio 2. I've done numerous things that I reckon express the quality of code I write and more importantly who I am as a programmer. The Killbots tournament was the start with jumping back into C++ which I last tinkered around with back in Trimester 2 in MDU118 where we did numerous things like create a game in C++. Then we moved over to small demos such as Spatial Partitioning and Flocking. Implemented an API (numerous ones actually), made a tool, and some small other things...

But let's start of Killbots, I really enjoyed it. I was kind of wishing for a competitive scene with our code to see how people can adapt, it was no surprise that I lost and the same person won both the first tournament with shooting prediction and then the second with their pathfinding... But I took 4th place in the first and 5th in the second, so I'm happy with that...

Implementing A* into C++ was a fun experience, even if for around 3 days, I had no clue why my pathfinding was jenky and generally screwed... Until somebody pointed out I was checking for greater than rather than less than in an if statement. Reversing that just magically fixed everything ...

auto latestIt = nodelist.begin();  
for(auto it = nodelist.begin(); it != nodelist.end(); it++) {  
    if(map.getNode(*it).f <= map.getNode(*latestIt).f) latestIt = it;
    //Used to show ">" rather than what it does now

That one if statement... (╯°□°)╯︵ ┻━┻

Then came along Spatial Partitioning and Flocking, I had some fun times with both but more frustration on flocking because my initial attempts at it with HTML5 Canvas and Unity. Spatial partitioning, which you can find here, was an interesting concept for me since I never looked into it or Quadtrees, simply because I never had to implement a rendering method of my own into an engine or for some other use. But nonetheless, it's a cool concept and makes me think more about the efficiency of my code, especially for large complex operations.
Flocking was an interesting one, here if you're curious, my unity method simply fell apart when I was working on Cohesion, since everything was pointing to the centre of the world. That has since been fixed thanks to the help of my lecturer but I abandoned it prior to that and went about a method of using Processing.js. But without further ado, here's what it looks like...

Now for the part where I probably had the most fun, the API. Not only did I find joy in restricting anonymous access to some of my sensitive data. I was able to also use to improve my discord bot, so rather than having to pull data by querying the database. It just makes a request to the API and the data is there all neatly formatted.
On another sort of fun note, I also made a tool, this time using Electron, Node and Javascript. Because .NET or C++ desktop apps are simply bad, it's already past 2005 so we need more modern looking programs.

And to wrap up, the final project was a game we made for designers. Myself and two other programmers created a VR game which was quite the experience since we didn't know anything about how Unity handled VR, we got to explore the VRTK that some awesome people had made for Unity to extend the functionality. More can read up on it here.
As a programmer, I think I've progressed. I learned about Spatial Partitioning, Flocking, more about APIs than I previously did and got to make a VR game, all which were fun experiences and very worth while.

Hopefully I get to do the same in the next trimesters and further on...

Tom Lynn

Read more posts by this author.