BYTE Devlog 10/6/23: Welp, I tried!

¯\_(ツ)_/¯

Listen, last week, when I said that I wanted to get the entire next week of content into BYTE I did say that I thought it was an unrealistic goal. I knew that it probably wasn’t going to happen.

Unfortunately, I undershot expectations even with those caveats. Largely this had to do with me being so busy trying to get an IGF submission ready for my Capstone project that I didn’t have much time at all to work on BYTE but even so, the progress is not exactly mind-blowing.

In a short summary, this week I made a bookshelf. It has, you know, books. Plural. This is necessary for the player to learn more skills and improve the ones that they already had, and converting everything over was a pretty big task, which is why, really, I can split this into three parts.

The first part was a continuation of my XML system from a previous week. I decided that I wanted the books to be kept in an XML file that I could reference and update as a good way to store the data. I figured out what attributes the books needed, wrote the XML file, and then wrote a script that could populate my bookshelf UI (we’re getting to that) with the data from the file and let the player read books that they hadn’t already read.

Then, when I tried to update the XML from the code, I found out that apparently you can’t modify files in the resources folder. No matter, I’ll just use the application.persistentDataPath to save the XML file instead. Then I decided that I hated this solution because it was tedious and weird and would become hard to manage.

So now we enter part two of this tale, in which I switch the XML data over to a ScriptableObject and just create a Serialized class that I can edit from the editor. Much simpler. This was actually my first time creating a Serialized class, so that was pretty exciting. This part is actually very straightforward but I’m including it because this seems like it will be my approach to data going forward, with a few exceptions. For the bookshelf, I need to track data about objects, which XML just isn’t optimal for in this instance. I’ll still use it where I feel that having a table will be helpful (I decided that SQL does not seem fun), but these classes will be much easier for the most part.

Finally, for part three, I made the actual UI. I actually did this first, I think, but it’s the coolest, prettiest, and the most interesting so I’m saving the best for last. It’s actually just a pretty standard panel with some cells that show available books, but I think it looks pretty clean, so I like it. I was able to use sprites from other UI elements as well, so no new art was needed.

As for next week, the goal remains the same. I’m hoping that I’ll at least be able to create the chapel space and some necessary dialogue scenes. I might leave the battles for the future, but definitely creating the chapel scene and ensuring that the player can access it feels pretty essential to get done for this week if I want to stay more or less on-pace.


Leave a comment