Unity and JSON


Introduction

This first sprint involved a decent bit of reacquainting myself with Unity and C#. Creating a project that could be accessed from bitbucket was also on the to do list. My task this week alongside my classmate Ryley was to create a method of storing data such as player statistics that could be called upon in game. He determined that a JSON file would work best, to which I used a YouTube guide to start creating a C# script that would generate one that could store data and respond to input. This example would then be able to be used to track all sorts of data sets in future, larger scripts.

Goals

  1. Reacquaint myself with Unity, C# and Bitbucket
  2. Create JSON script

Personnel

  • Primary - Jed May
  • Secondary - Ryley Delaney

Technologies, tools, and resources used

JSON guide https://www.youtube.com/watch?v=4oRVMCRCvN0&feature=youtu.be

Unity API https://docs.unity3d.com/530/Documentation/ScriptReference/index.html

Udemy C# course https://www.udemy.com/unitycourse/

Tasks undertaken

  1. Completed the first two modules of the online Unity course (2 hours)
  2. Check that all the correct engines and development environments were installed and working (10 mins)
  3. Created an empty Unity project that could be used to create our assigned task within the sprint (10 mins)
  4. Made Bitbucket cooperate (eventually) (30 mins)
  5. Read through Ryley’s report (10 mins)
  6. Watch JSON guide and create basic script that would generate a JSON file (30 mins)
  7. Adjust script to be able to react to direct input through the arrow keys to change the value of 2 variables, health and mana (1 hour)
  8. Create dev log update (1 hour)

What we found out

While nervous at first, I found that the online course greatly helped my confident and competence within C#. Plus, many of the things learned in those first few sections were like the method I used to implement input into the script. I found this first sprint to be a good warm up for what more there will be to come.

Open issues/ risks

The guide used had to be altered to make changing the data work as we wanted it. This left me chopping up the saving and writing of the JSON file in such a way that it doesn’t save the player’s stats between play sessions.

Recommendations

This feature will either need to be fixed or removed if deemed unnecessary.

Leave a comment

Log in with itch.io to leave a comment.