Summary
- Responsibilities
- Create, develop, and maintain the Unity project.
- Develop new games for the project (e.g. Busy Barista, Sound Seeker, etc.) as part of a small team (two developers, one sound designer, one manager).
- Coordinate and work with the company’s Flutter developer to integrate the Unity app.
- Coordinate with data and research leads to ensure the Unity application captures meaningful data on the product’s efficacy.
- Maintain the GitHub repository, merge contributions from other teammates in, and resolve merge conflicts.
- Contribute towards design discussions.
- Skills Developed and Technologies Used
- Unity 2D development.
- C# programming.
- Visual Studio Community, GitHub, Firestore, Slack, Miro.
- Developing for and testing: WebGL, iOS, Android.
- Developing user interfaces based on mock-ups.
- Unity Addressables.
Back in August last year I took part in a 1 month internship for a small games studio based in London, primarily as one of two game designers. After I finished my degree at Goldsmiths, I was offered a three month contract with eargym followed by a subsequent one. In that time, my role has shifted over from design to development, and I’m currently working as the games team’s main programmer and one of its main Unity developers.
I’ve primarily been responsible for setting up and managing our GitHub repositories to allow for remote collaboration, designing and writing our games’ main logic and feedback scripts, implementing audio and visual assets, creating custom data types to store information (structs, scriptable objects, etc.), setting up saving systems, rapidly developing and testing mechanics through WebGL prototypes, integrating analytics, and porting our games to native Android and iOS apps.
If we face a design problem or concern, I do my best to generate solutions for us to consider — weighing up the costs and benefits — and thinking about what’s feasible in the time we have and what’s appropriate for the game as a whole. We organise discussions, particularly on some of the more troubling questions we’re faced with, and I take notes and feedback to them with my thoughts on how I might approach implementing what we want.
Another underlying but substantial part of my role within the team is in seeing how I can minimize the manual, time-consuming work our team needs to do by designing and implementing programmatical solutions. I need to do what I can to anticipate the difficulties our game’s current setup will cause the team, and review how I can best mitigate these from an earlier stage. If I can see that a particular feature will need a lot of manual setting-up and would be time-consuming and error-prone to adjust, I do what I can to implement some code that’ll let us make those kinds of adjustments in bulk everywhere we need (and ideally only need to specified in one place). And as far as possible, I try to design systems which non-programmers on the team can tweak and edit in the inspector to get the results and game feel they want.
While I wasn’t initially sure I’d enjoy it, I found planning, structuring, and documenting my code quite satisfying. I particularly like thinking about how we might organise and offload code to dedicated game objects, creating, for instance, a ‘FeedbackController’, ‘GameLogic’, and ‘PersistentData’ objects to store and run parts of the game’s code (although I appreciate this can create a lot of dependencies, which I’ll return to at a later date). I’ve also enjoyed putting into practice some of what I’ve learnt from advanced programming: structs, arrays, lists, loops, switch statements, custom return type functions, etc. I also do my best to follow some of the practices I was taught, namely to never repeat yourself in your code, and to create functions which handle a specific thing you need to achieve and nothing else (for example, a single, dedicated function for moving a specified GameObject from one position to another over a length of time).
This has been and continues to be an incredible learning experience for me, and getting to work for a company that sincerely believes in the good that games and technology can do for the world makes this all the more a pleasure. For the sake of confidentiality I shan’t go into the specifics of the games I’ve worked on with them, but you can read more about the company’s mission statement, the team, and its games up on their website.
Some Learning Milestones
I’ve had to pick up a fair bit in order to keep up with the needs of my current team, and while these learnings might be obvious to more experienced programmers some of them have been significant milestones in the learning process for me.
ScriptableObjects
ScriptableObjects have become invaluable for the work I’ve needed to do, namely in that they allow me to create templates for objects we want variations of in our projects. For instance, rather than creating dedicated scenes to contain the audio and visuals assets we might need for different locations, we can simply set up and load in the location-specific elements from a scriptable object (backgrounds, colours, text, audio, etc.). These save a lot of time, but I also hope they create some more transparency in the work I do for my teammates. I walk them through on how to create these objects in the asset menu, the values which need to go in, and I try to give the objects headers, tooltips, and sliders to make them more accessible to non-programmers. Another benefit of these is that they allow us to uniformly make additions to our games. Let’s say every location now needs a unique UI image in a given spot on the screen: all we need to do is add a sprite variable to the scriptable object script, add these images in to the instances via the inspector, and then tell the main scene to read from the template and load in that image after a null check.
Resources.Load()
The main problem I started running into with our projects was increasingly long load times, particularly into and out of the scene selection. I specifically noticed this in one of the games I worked on a couple months ago, where I was using scriptable objects to store the structure and assets for each of four stories. These were all located in the scene selection, and one of them would follow the player into the main scene to give them the illusion of opening up a dedicated scene for the story they’d picked. This was all well and good until I found loading the scene selection crashed my phone. Too much was technically being loaded in at a given time — all of the audio and visuals assets for all four stories. After doing a couple searches, I came across the ‘Resources.Load()’ function, which would allow us to store assets (including custom ScriptableObjects) in a Resources folder for us to then draw on via a file path. By switching us over to a system which uses this function, the scene selection would then only need to store file path references and only ever need to load in one story at a time. This drastically sped up performance in the games while enabling us to continue using the scriptable objects system we had for creating and loading levels/locations.
Structs and Enums
The ability to create custom data types by using structs has been incredibly useful in a variety of settings across that games I’ve worked on. Namely, structs have allowed me to package up what the game needs to know about rounds and levels in order to generate end-of-level feedback for the player. What’s more, being able to save these via a binary formatter means we can easily store and load in information about the player’s overall progress (in a way we couldn’t quite do with ScriptableObjects).
On a similar note, creating and using enums has also been useful, particularly in conjunction with switch statements. We can create, for instance, three different ‘modes’ an object might be in, specify it for the object instance, then reliability read from it and perform appropriate logic. We can also make these visible in the inspector, meaning non-programmers on the team can click to select one of the specified options rather than needing to type them out (and risk misspelling them in the process). Admittedly I tend to need to convert these to strings in order to serialise them, but in practice these can are particularly useful.
In both cases, I prefer to declare the majority of my custom data types in a single location, generally a ‘VariableContainer’ class, so that I have a consistent reference point to hand in order to access them.
Lists and Loops
While I touched on some of this during my masters degree, I’ve finally been able to make extensive use of lists and various loops in the projects I’ve been working on recently. Being able to add and remove elements from a list, creating temporary lists, randomizing their order, combining them, and iterating through them have all been invaluable in a wide variety of contexts.
I’ve had chance to use for, foreach, and while loops in particular, predominantly using the latter for getting the program to wait for a user to perform an action (changing a boolean from false to true within a coroutine). I’ve made a few mistakes along the way with some of these, but learning to use the ‘Attach to Unity’ feature in Visual Studio Community has really helped me follow my code along and see exactly where it’s getting stuck in order to fix it.
Events
I use a fair few scriptable objects and one or two singletons in most of the projects I’ve been working on, which is all well and good until, inevitably, the number of dependencies gets a bit unwieldy. I’ve only recently learnt about how I can use events to mitigate dependencies within my project, having various methods subscribe to custom events without ever needing a direct reference to most of the games other scripts and managers. The idea of being able to have it so that my GameLogic controller doesn’t necessarily need a direct link to some of the game’s other systems, such the FeedbackController, is quite new and exciting to me. This, along with finally learning to add listeners to some of my UI elements, is beginning to allow me to determine a lot more of the game from within the scripts than within the editor. I do need to get the balance right with this so that our team’s main designers can still jump in and edit some public variables, but generally I think this is one of the next main steps I need to make in improving my practice.
