The day-to-day activities carried out in pursuit of that doctorate. In other words, my PhD diary.

Visualization of thesis word count

I am very close to finishing and submitting my thesis. The write-up phase has been incredible – just a blur, really, as I’ve worked Saturdays and Sundays and have had almost zero down-time.

I only seriously got into the write-up in early July, throwing away a lot of what I had written over the past year or two and starting with about 5,000 words. Then at the start of August all the late nights on the thesis caught up with me and I had horrible gum infections (a wisdom tooth that is half embedded) and a chest infection, both requiring courses of antibiotics – immune system had taken a hammering, I assume.

Then the new semester started and I was just in survival mode. But, then I seemed to get my strength back and got back into the write-up and finishing off my final study.

Just to procrastinate a bit, I went to GitHub where I have been version-controlling my LaTeX thesis document and checked out the different versions for each day, doing a word count in TeXStudio. Then I used Excel to enter the data and create the following time-series chart:

The type of PhD I’ve almost completed meant I needed a minimum of 50,000 words, because of the significant amount of software development – a VR-based game, an API and a web-based analytics dashboard. However, I am just under 60,000 words and still have a few thousand more to go. Citations are approach 230 with another couple of dozen at least to go.

It’s strangely emotional looking at the visualization. In mid-August, when I was suffering badly with a chest infection, I almost felt like giving up, or more likely just taking my time and finishing well into next year. Then the recovery surprised me.

PhD Log 25/11/2016

Concentration on the game continues for the next few days before I return to the thesis. I had a meeting with a subject matter expert (education and physical education), which was really useful – got some good directions to go in terms of theory, etc. and she also gave me the confidence that I am on the right track.

In terms of game development, I continue to concentrate on what is probably the key game mechanic: the gathering of clues and making deductions, which is really a game dynamic because it dictates most of the gameplay and further builds the aesthetics of challenge and discovery. I have now completed the basic mechanics of the deductions user interface – gathered clues and red herrings relevant to each question are displayed and these can be dragged into deduction slots; when a clue is dragged into a deduction slot it disappears from its clue slot; if when all the deduction slots for a question are filled the deduction has not been solved, the player can drag the clue out of the deduction slot, release the mouse button, and the clue will be placed back in a clue slot. The image below shows the player in the middle of solving a question:


The tutorials on drag and drop from Unreal / Epic Games were very useful as a starting point, but there needed to be customization and refactoring, and a lot of additional development. The refactoring has really cut down the amount of code and I can see there are ways to really slim it down further. One major change from the tutorials was to create an interface to apply to all objects containing clue information. All the objects are gathered as they are and later, when they need to be interrogated, the interface is used to ask for the clue data (currently just an image and the clue description). This means that any object in the game can become a clue – I cast the generic object to a clue as required; I store in the underlying data structures as the generic object.

The next step is to give feedback on when a deduction has been made, i.e. the correct clues have been dropped into all of the deduction slots. I also want to have a cascading mechanic whereby only the questions that need to be answered now are enabled and / or visible; some questions will be locked until a prerequisite question has been answered. In addition, it may not have been possible to discover clues for a question yet (it may be in a future room) and so questions should be locked until all the clues are available.

PhD Log 22/11/2016

Busy, busy, busy. I’ve been working every spare hour the past few days on getting the important deduction interface working. It’s getting quite close now to a first fully-working prototype (of that deduction interface, not the full game!). At that point, I can start thinking more about game content, the lesson plans, in effect.


As you can see from the image above, a number of deductions are to be made in the level. Right now, I envisage each deduction requiring 2 to 4 clues to solve it. In the top row of clues will be the clues that solve the question, plus a small number of red herrings, e.g. if 3 clues are required, I might include 2 red herrings. The idea here is to acknowledge who will be playing (not hardcore game players, for the most part) and how to keep them in the zone between frustration and boredom (in the flow channel – based on Csíkszentmihályi‘s theory of flow). If there were too many permutations, e.g. 3 deduction slots to be filled from 10 clues, then it might take too long to solve the deduction if the player is reduced to guessing. On the other hand, if there were 3 deductions slots, but only 4 clues to choose from, then a very quick trial and error process would solve the deduction. Right now, I would tend towards about 50% extra “red herring” clues, but initial play testing will help determine the best ratio (even before a pilot study designed to test transfer of learning, etc.). Red herrings could be clues that are relevant to other deductions, or clues that are not applied to any deductions.

Right now, the player can click on a question to solve (i.e. to make a deduction). This will make visible 2 to 4 deduction slots in the lower row. The player can drag clues from the upper row (clue slots) into the deduction slots. The player can click through the questions and the clues that were dragged into the deduction slots will still be there when the player clicks on a question again. Currently the clue slots don’t change when you click on a question – however, I have an underlying data structure that links clues and red herrings to deductions to be made and a bit of scripting will make that work too. The next step after that will be to give feedback to the player when a correct clue is in a deduction slot (e.g. green border around the image) and then to let the player know when a clue has been solved, and perhaps what has been unlocked as a result. A final step will be to apply some stylish graphics.

PhD Log 17/11/2016

The pace is definitely picking up now. I have a bit more free time away from teaching and other duties as the semester draws to a close (though I must correct 30 game essays and a number of game group projects, nearly 40 Spring framework assignments and a number of group Spring web / database projects by early January!).

Today I made some progress on the clues / deductions drag and drop user interface. You can now walk around and right-click on objects and those that are clues will add an image to a free clue slot in the UI. Right now I have a maximum of 10 clue slots – maybe I ensure that some deductions are made and clues cleared before moving on to the next section and 10 will be enough. These clues can now be dragged around within the clue slots, dropped into a free slot or swapped with an existing clue image. This might be useful if the player wants to group what he/she thinks might be related clues. The solution involves scripting the drag and drop behaviour of the clue slots in the UI, while maintaining a parallel array of clues; all very old fashioned programming / scripting in some parts. Here is what I have so far:


It’s a bit rough yet, but with some prettifying it will look just fine. In the background, I have scripted the beginnings of the deduction data structure and the management of it. I have decided that in each level, I will create an array of object references (i.e. reference the actual 3D object that was dropped into the level, which will have embedded clue metadata – clue text, clue image, etc.). This is a 2D structure with an array of deductions, each of which has an array of associated clue object references.

To allow for flexibility as to what a clue object is, I created a ClueInterface, which each type of interactive clue object will implement (it simply has a get method that returns clue text and clue image). This means that my base interactive object, and by extension any more specific objects that inherit from it (e.g. newspaper articles, notes, etc.), as well as any other objects like non-player characters or anything else, can be a clue – it just implements the interface and the get method, returning clue text and clue image property values. This avoids the bad cast-fail-cast pattern because you never need to cast to a specific type of object, you just cast to the generic one-size-fits-all ClueInterface type.

Next step is the drag and drop to the deduction slots below, plus being able to select which deduction you are working on.


PhD Log 16/11/2016

General musing

One of the most crucial phases in a thesis is arguably settling on a structure and the chapters within that structure. Put simply, it’s the stage when you know what the hell you are doing. I seem to be at that stage now, meaning that there is a marriage now between project plan and thesis, and thus more focus. And a focal point: getting done in 18 months.

I spent so long settling on a topic … 2.5 years, to be precise: an initial 6 months settling into the PhD, then 2 years working towards a thesis on how publicly-available (released into the wild) cultural heritage metadata was being used in a myriad of ways from the analytical to the artistic. I was going to build a case study around how the Tate Britain metadata had been used. I had the Serious Leisure theoretic framework ready to roll by way of methodological development. The topic is actually a really good, viable one for a PhD, and if anyone ever wants to pursue it, I’ll gladly hand over what I have. Maybe strike that … let me get my PhD finished and then I’ll supervise whoever wants to do it 🙂

The bottom line was that my heart just wasn’t in that topic and I feel I would have drifted for several years before maybe giving up. Sometimes the best course of action is to go back to square zero and start again – be dispassionate about it by answering one question: will whatever I do get me to the end of the PhD faster, even if it means starting all over again?

Now I have confidence in being done in 18 months (but I won’t panic if it takes 6 months longer than that).

Work done since the last post?

Not much that’s functioning in the game – my next focus is on getting a clues / deductions interface working. I think once I have that interface working that I’ll be ready to implement a story containing little lesson plans, e.g. talk to an athlete, look around his/her home as a little case study in choices and their consequences – oh, there’s a newspaper with the guy in the headline winning a gold medal… oh, there another one with the guy in the headline being called a drug cheat… oh, there’s a leaflet about a kids/drugs outreach programme… deduction: successful guy gets caught and is trying to make amends (I’ll actually have more fine-grained clues and deductions than that). Now a line of conversation opens up about the consequences of being caught, or ways that amends can be made, what it’s like trying to make ends meet while banned, etc.

There isn’t much choice in terms of Unreal Engine 4 tutorials on the subject. The main one, which is a series of 3 recorded live streams by an Epic Games employee, are quite detailed and easy to follow, but what is being developed is a rather more complicated inventory systems with two floating widgets, with icons being dragged and dropped between them. What I need is there, but in the midst of dragging and dropping entire widgets, which make s it more difficult to pick out what is relevant. What I have right now merely does the following: displays available clues slots and deduction slots to drag them into; you can drag a clue image over a deduction slot, but it won’t drop in there yet. Very rough and not dynamic, but I’m only half way through the tutorials. I’ll need to add a lot more to the GUI, like clue descriptions, deduction text, make it all dynamic based on what is discovered in the game, etc. The following image doesn’t say much:


On the writing side, did a bit more on serious games, MDA framework. Next step is to try and complete the Lit Review (at least the first full draft of it). This will include some fundamentals on education / pedagogy – the kind of stuff that is foundational to any thesis featuring education of some kind; also some foundational stuff on games and game design. That’ll lay the groundwork for when I get more specific in later chapters.

PhD Log 03/11/2016

Over the past 4 weeks I’ve worked on the design of the game and written maybe 1,500 words towards the thesis.

With regard to the game design, I have made a fairly big shift away from first-person perspective as can be seen on this previous post. I spent some time playing games, waiting for inspiration to hit me. I’ve been hoping to achieve a detective feel to the game. I experimented with third-person, over the shoulder perspective, but was never satisfied with the results. Then I played Agatha Christie – The ABC Murders and I knew the perspective had to be from a spectator / fixed rotating camera point of view. Each room will have a camera set up which constantly looks at the player character. The mouse is used to point and click at a destination (click on the floor and the protagonist walks there) and to point and right-click on objects to view / interact with. I also threw out the dialogue plugin I was using – it did not seem to be supported any more by the developer and I did not have source code to allow me to continue upgrading Unreal Engine. I had spent many hours integrating that plugin into my project, but I don’t regret switching to a new dialogue plugin which is future proofed as I have access to all code / components. Below is a screenshot showing the new point of view.


Note the speech bubble above the non-player character, which is a nice little touch that I coded. Also, when the mouse hovers over an object that can be examined, a magnifying glass icon is superimposed, with a similar icon for articles / notes. These suggest affordances that I will document briefly in the thesis. The dialogue has a new look too:20161103b

That smiley face will be replaced by a headshot of the non-player character. The headshot will be particularly useful when my protagonist is talking on the phone to someone.

Another addition is obviously the protagonist 3D model. If you get a close look at him, you’ll see he is at least 50 years old and looks like he’s been around the block a bit, maybe reported on a war or two.

In terms of game design and development, I need to develop some kind of clues and deduction mechanism. The Agatha Christie and Sherlock Holmes (Crime and Punishments) games have good solutions that I can draw inspiration from (there is a newer Sherlock Holmes game, but I can’t justify forking out €45 for it). I want my protagonist to be able to examine objects, read notes, etc. and then allow the player to combine these clues together to make deductions – some clues will be red herrings and won’t combine with other clues. When a deduction is made, some action will be unlocked, such as a line of questioning through dialogue. There is a bit of GUI work to do in the game to allow the player to drag and drop, combining clues, but it’s very doable.

Once I test that out in the one scene I have, it will be time to begin the implementation of the first fully functioning prototype, with more scenes and characters, for initial user testing.

I need to write up all of these design decisions to get some word count into my thesis, though.

PhD Log 05/10/2016

Interesting bit of news in the last couple of days with Sharapova’s ban being reduced from 2 years to 15 months and how it has been spun by Sharapova’s PR team. It just adds to the context for the game.

With respect to the game design, I purchased a pretty nifty 70s-style office environment that gives my investigative journalist a really gritty home in between levels. Being of a 70s style just adds character, I think. Gives it that “All the president’s men” type of aesthetic. I will intersperse the environment with more up-to-date props like a laptop and smartphone. I think it adds to the backstory of the freelance journalist as someone of a set of principles of a bygone age – i.e legwork your way to the bottom of a story rather than relying on social media, press releases, public opinion to purely guide the story.


In between levels, I can image stories breaking via a wire service (Reuters / AFP style) and these will direct the interviews in certain directions. The rotary dial phone will ring with a call from the commissioning editor – the tone of the conversation will be dictated by the articles submitted in previous weeks – e.g. if the editor is worried about litigation, public opinion, etc., he will voice concerns and this will challenge the player’s integrity and choices about what to write. Just adds to the moral complexity of the game – PEDs are a moral minefield in their own right, never mind journalistic ethics and integrity.

PhD Log 30/09/2016

Not a lot done today. Just added some new options in the game relating to opening up new lines of conversation through object discovery. When a new article or object is discovered and examined, part of the popup text will indicate if the object has unlocked new dialogue. The challenge then is to be able to skip directly to new dialogue when re-engaging in conversation with a character (rather than going through all the old stuff) – I have a bit of that done, but it may need a more flexible solution.


Otherwise just added some thumbnails to a character and an object within the achievement/notes popup.


PhD Log 29/09/2016

I’m going to keep an online public log of my PhD activities from now on. I’ll document major game design decisions, research done, etc.

Today I had a quick look at the game Elegy for a Dead World, which I picked up cheaply as part of a Humble Bundle. There’s something in it that intrigues me – in my serious game, I expect my main protagonist (a freelance investigative journalist) will “write” weekly articles for a magazine. In the Elegy game, the player does literally write some of the words. Can I incorporate that kind of mechanic into the game? Or will the words in my game be predetermined and more like jigsaw pieces. Just more food for thought.

In practical terms, I’ve started to think about some proper text for the objects and articles in my game. I added the following to a cola can based on information from the WADA website:

Cola contains caffeine, which is a stimulant. According to the 2016 WADA Monitoring Program, it is not a banned substance, but one which is being monitored by WADA to determine if it being misused overall.

This means that athletes can use it, but WADA may add it to the list of banned in-competition substances if it is being abused.

The World Anti-Doping Code (Article 4.5) states: “WADA, in consultation with Signatories and governments, shall establish a monitoring program regarding substances which are not on the Prohibited List, but which WADA wishes to monitor in order to detect patterns of misuse in sport.”

I suppose it is educational, fulfilling one goal of the game, which is to transfer knowledge about the rules and regulations of doping… but it’s a bit expository or “tell not show”. Would it sink in with the player? Some pre- and post-testing of the players’ knowledge would of course determine that.

I also added a newspaper article (player “examines” newspapers and magazines left lying around in the game):

Eddie Gorman joins the Pantheon of great runners, timing his late kick to perfection as he captures a rare World Championship gold medal for Ireland.

Written off by many as over the hill and by others as a nearly man, Gorman confounded his critics with a run of such assured tactical brilliance that it would make Sun Tzu look positively unprepared.

“I always knew I had it in me. I just needed to prove it on the big stage. And I did!” said a jubilant Gorman, in the full knowledge that a party awaits on his arrival home in Tullamore next Tuesday.

These articles are a backstory device showing, in this case, the rise and fall of an athlete. Reading some of the articles will trigger questions to ask the NPCs (non-player characters) in the game.

Scrivener + Zotero for Thesis Writing

I really like the writing tool, Scrivener. I finished my first novel, The Murk Beneath (not published… yet!), using it and it was just fantastic. I only used a fraction of its features, but one of the big ones is being able to organise chapters and the scenes within chapters. Others include the performance as the overall word count ticks over 50,000 – Word just creaks and finding your way around from chapter to chapter is a pain; not an issue with Scrivener, which treats a book / thesis like it’s a filesystem.

My thoughts are turning to the larger thesis writing part of my PhD. It’s very early days, but I can at times be a prolific writer, so why not get some drafts down on virtual paper even at this stage? My main worry was citations and the bibliography. There is no native integration between Scrivener and my preferred bibliography management tool, Zotero. Help was at hand from this blog post. Zotero’s RTF (and ODT) scan tool works, plain and simple. The only minor drawback is not being able to click on a little icon and start typing a name or a title, like you can with the LibreOffice and Word plugins. Otherwise, though, the “Scannable Cite” works very well; it’s very straightforward to add a minus in front of the author to suppress it, and also to add some custom text (e.g. adding the word “see” before the citation within the brackets).

I think over the course of my PhD, the combination of Scrivener and Zotero will save me weeks of effort.