Focus! A VR Game About Writer’s Block – Part 5: Conclusion

I’m writing this part IN the actual unit presentation, having cut things very close overall.

This was honestly a fun project to work on. I believe my core gameplay loop is there, and with more time, I think this could be a really fun game, and if its not fun, why bother?

All the issues that arose simply came about from me trying to learn too many brand new systems at the same time. Trying to learn the functions of TextMeshPro, flocking systems, hinge joints, and more all at once was far too tricky for me as a beginner coder.

I am very thankful for the help I got from my peers, and the lecturers (especially Sokol’s 1 to 1 sessions). With their help, I was able to learn a lot of useful techniques of troubleshooting code, such as shifting elements to already functioning areas to discern whether the overall function is not working, or its the specific code lines. I think that even not being able to finish all my elements, I learned a lot regarding coding, and there are definitely some elements of this project I can see myself using in other works down the line.

So yeah, I enjoyed working on this a lot, and even outside of this module, I will probably keep trying to improve it in my free time into something even better.

Focus! A VR Game About Writer’s Block – Part 4: Distracting Distractions

So in hindsight, some of the systems I had ideas for regarding distractions proved a lot more complex than I first imagined. I am 100% a fledgling coder, and half the time I don’t even understand the code I am writing, so I did my best to create the distractions I could.

One that I got fully working was the vibrating phone. I had the object situated right next to the player, and created a script using elements of one Sokol taught us during one of his classes. The phone was given a randomized timer, and whenever it reached zero, it would begin to emit an audio source(which I later turned ambisonic) and change it texture to show on the screen that someone was calling.

From there, the player would need to pick it up, and hit the trigger to silence it, with its continued presence increasing the global timescale to make the concentration go away faster.

The next, and much more challenging distraction, was the flies.

In conclusion, I was unable to make it work on time.

Initially, I was hoping to get it working by creating my own flocking system for the fly, allowing it to move in a random pattern around the player so then they could swat it out of the air.

I did try implementing this for a time, despite it being very complicated for me. However, all of that was lost when I got a critical error and my computer was made unresponsive.

After a restart, I had lost all the progress I had made towards it, and given how difficult it had been to code to begin with, I decided to scrap it for time. Currently, the flies are emitted through the use of a particle system, the particles being swattable. I tried to code a system to close off the particle system after a certain amount of particles were killed, and then respawning it at a different position, but was unable to get it working. I did however get the ambisonic sounds working, and it may be working TOO well as the sound of flies buzzing in one ear is actually distracting in game.

Finally, was the temperature system.

I was able with minimal complications to get the window in my scene openable, using an XR Grab Interactor, and a hinge joint.

The system is rather finicky, glitching out due to collisions rather often. Beyond that, I wasn’t able to find much regarding coding with the use of hinge joints, so the thermometer idea itself was eventually scrapped.

I kept the window function in however, as I thought it was a nice immersive touch, even without the distraction feature.

So yes, overall, I was only able to get one of my three distractions working properly. However, as said, I was very happy with how the phone functions as a distraction method, and with more time and experience coding, I believe I could have gotten the other two functions working properly.

Focus! A VR Game About Writer’s Block – Part 4: Making a Keyboard

This video was a big help when it came to creating my functional keyboard.

Initially, I was able to find some documentation that instructed how to create a working VR keyboard using hinge joints in each key, however this method proved time consuming and heavily buggy in its execution. In its place, I was able to follow the instructions on this video, linking up the keys to the display on the monitor. Now whenever a key is pressed, it adds text to the canvas on the screen, simulating writing on it.

Now with a functioning computer setup, I linked up the score system next to it, and created the concentration bar UI element above the PC itself to allow the player to keep track of the time they had left.

Focus! A VR Game About Writer’s Block – Part 3: Creating the Room

I spent a bit of time doing a combination of 3D modeling my own assets, as well as looking for useable ones of the Unity Asset Store. After a bit of time, I had my base room/play area created.

In hindsight, its a very spacious room, and could have probably been slimmed down to try for a more cozy aesthetic. Using URP, I got the light of the scene looking a lot better, and had plenty of useable objects to base some of the game around.

Above is one of the most helpful free assets I was able to find: a functioning computer screen with an editable text canvas to view text on the screen. This saved a lot of time as I was able to use this as a primary component for the writing system the game was based around.

I created a few useable items myself as well however, such as the phone, a fly swatter, the desk, and a few other items. Amongst all of this, I also set up the XR rig for the player, giving them stylistic block arms for their representation.

Focus! A VR Game About Writer’s Block – Part 2: Setup

With the rather lengthy process of coming up with an idea now over, I began planning the elements of my game.

The primary scoring system would be based on how much you can write. In front of the player there would be a functional computer I would need to code, and with each button press on a keyboard, the screen would fill with text and the score would rise.

The gameplay aspect would come from the concentration system. As you type away, a bar at the top of your screen acts as your health, slowly being eaten away as you play. The ‘distractions’ that could occur around you would cause this gauge to be eaten away faster unless they are dealt with. Finally, if the player was able to reach certain score goals before they ran out of concentration, the bar would reset, and the gap to the next reset would become larger.

This would be the key gameplay loop, where you would need to balance typing on the keyboard, dealing with distractions, and hoping you were fast enough to make it to the next concentration boost.

I had 3 main distractions in mind the begin:

• Flies buzzing around the player and bugging them until they are swatted away

• A phone going off which you would need to turn off

• The room getting too hot or too cold which was affected by the use of a nearby window

With the ideas for mechanics out of the way, I began thinking about the environment for the game to be in, deciding the base it in a dorm room, taking inspiration from ‘lofi’ artistical choices.

I collected all my ideas and references together in a padlet, which can be found here:

https://padlet.com/jackiflame/n9msw8n6ph1jbim5

Focus! A VR Game About Writer’s Block – Part 1: Idea Creation

Initially, when I was told the brief for this project was to “design a game about a serious issue”, I honestly had zero idea where to start. In theory, any idea could be made serious if presented in a certain way/context. Thankfully, after voicing my concerns, we were given a bit more prompt and instructed to possibly try basing a game off issues we have personal experiences with.

I’m thankful to not have been born with many lasting issues, the largest being my eyesight which was recently corrected with surgery, so even with the updated prompt, it took me time to concoct an idea. In the end, I based my game off of one of my larger ongoing hobbies: writing.

I do a lot of writing in my spare time, having amassed a following that I am very proud of online, and one of the main issues I have writing is to do with the concept of ‘writers block’.

It’s a rather broad term, and can apply to many different concepts for many different people. To me, it is the ongoing irritant of being unable to concentrate on my writing due to present distractions in my environment. Even small things like the room being too hot, getting distracted by phone messages, and many more things can throw me off my writing far easier than I’d like to admit.

And so, with an idea of the ‘issue’ I would be looking into, I began planning for my game, eventually naming it – Focus!