Revisiting old code


So, before I got a job last year I was working on a little OpenGL project to try and learn how to use modern OpenGL. My goal was/is to recreate, in modern OpenGL, all the assignments I did at uni in “old” OpenGL. The first assignment I ever did was to create a little spaceship fighting game. You can read about my work up until March here.

Coming back to this code after a year of programming professionally -hoo boy. After opening it the first time I thought I’d forgotten all the OpenGL I’d taught myself last year. And while rereading it all to get reacquainted with my old knowledge I frequently cringed at my bulky and clumsy classes.

Despite the flaws I thought I should finish this project off and tidy it up a bit before moving on to something else.

So in the last week I’ve added health to both the player and the enemies and, consequently, “power” to the bullets. The enemies now get smaller as they are shot (mostly because I wanted to make sure I could scale stuff properly) and the player will get progressively more red as their health moves towards zero.

Now when the player dies the game will return to the start screen so you can play again. I should really add this ability for the scenario where the player defeats all of the enemies too. I’d also like to add a “winner” and “loser” screens to make this feel a bit more like a game. Maybe also a timer or score so that players can record their best scores – this would give me practice with saving.

After messing around with health and “power” though, it has become super clear that my old classes are really quite awful. I don’t want to rewrite the whole thing, but a small refactor to create a “spaceship” class would be a good idea. Maybe after some thought I could clean up the Gamescreen class too.

Feel free to check out my code – though the latest updates have really all been gameplay rather than engine or graphics code.

2015 – lessons learned.

Well, what an abysmal blog this has been so far. No posts for almost 10 months! What have I been doing?

Well, I did start blogging with the intention of having somewhere to show off my skills to potential employers. I successfully got a job less than two weeks after my first website post, so I guess that was successful. Returning to full time work in a country on the other side of the world after more than two months off was a bit of a shock to the system. I also moved house around this time, and picked up more work from League of Geeks for Armello. So, not so much time to blog.

For the last 9 months or so I’ve been working for a game company called Weird Beard Games. It’s been a huge learning experience for me – this is the first time I’ve been programming full time for real projects and the first time I’ve had my code so strictly code reviewed by very experienced programmers. I’ve learned so much!

I’m not sure what the biggest thing I’ve learnt is. Possibly how much I didn’t know about OOP or, rather, separation of concerns. Looking back on my old OpenGL practice project I cringe at my clumsy, bulky classes and repetitive code. Learning when to break a class down into smaller parts and which objects should be responsible for certain functionality is something I am still learning a lot about. I’m actually rather horrified about the thought that I passed on my terrible skills and habits to all the students I taught. I hope they’ll forgive me – I taught them as best I knew how.

Also – learning some confidence. I had believed myself to be a fairly confident person – especially after speaking in front of crowds at PAX and television cameras while I was in charge of IGDA Sydney. However it was a lot easier to be confident about skills I didn’t care a lot about (“herding developers”, “event organiser” and “being a woman in games” have all not made it into my resume). However when it came to confidence in my programming skill – suddenly I was very shy. Too shy to ask questions, too embarrassed/stubborn to admit when I didn’t know something. (I actually also have this problem with learning languages – I am very shy in Spanish because it’s such an important language for me, but more confident in Dutch despite knowing far, far less. There’s a research paper in there somewhere).

I also think, after having been in a position of superiority as a teacher, my confidence took a real hit by working with three other programmers who were all better coders than I. Thankfully I have mostly overcome that – special thanks to my awesome colleagues who are super patient with me. I now am confident enough to ask for help when I need it – though I could probably still work on bouncing my ideas off others before jumping in to implement a feature.

Closely related to this last lesson – my time management skills. I’ve learned how to tell when I’m spending too much time on a feature – to catch myself when I’m going too deep into the *why* of something. As much as I enjoy trying to solve a problem, or to dig into the engine to find out exactly what’s going on – that isn’t my job, and the tasks I’m asked to solve don’t need that kind of depth. The game needs to ship on time – my curiosity can be sated in my own time, not my employers’. Having said that, my bosses are great and do sometimes give me time to experiment or learn more about something.

Lastly – in 2015 I think I learned how to relax. I was running myself into the ground in Australia, doing way too much and wearing myself out. Since I’ve moved to the Netherlands I’ve found time to finish games (Dragon Age 1, 2 and 3 and The Witcher 1 and (almost) 2), explore Amsterdam, and improve my Spanish and my cooking skills. And play way too many hours of The Sims.

So – onwards to 2016. This year I want to pick up my C++ and OpenGL skills (mostly because I miss C++, we’re working with Unity at work). I’ve already added to my old project, but I’ll expand on that in another post. I’d really like to revisit my 3D maths knowledge and make it a bit more concrete. At some point perhaps I would like to try working on an open source project to really test my new-found collaborative skills.

So, that’s the end of my rambly reflection on 2015. Possibly not super interesting for anyone, but it sure helped me to write it down. If you have any time left after reading this please go and vote for the game I’m working on to be Greenlit on Steam- Tricky Towers.