2014-04-11

bug findin' & fixin'

I decided to do some work on the quality of the code and discovered a bunch of random little problems. First I setup some unit tests... a year into the project, but hey better late than never. The majority of things seemed to work as I expected as I was writing tests, but I found myself refactoring quite a few classes along the way. I made some changes to a few storage classes to pass tests, then ran into a critical issue with json importing/exporting. The library I'm using to handle json isn't unit tested (by me anyway) and I was lost with a silent error that I couldn't for the life of me find. I resisted the urge to throw my computer out the window and found the issue by randomly reverting all my changes so all in all, good progress.

I also worked on the tools for designing games. Here is Next Door Girl April imported into Unity.


That is something like 300 passages in total. The conversion makes 300 rules and 300 responses, then each response has a text piece along with options and context so around 1000 game objects all together give or take a hundred. The editor runs a little sluggish with everything labeled but without labels it speeds back to normal.


Here you can see how options (magenta boxes) point to rules. 



I would like to write some kind of code to automatically sort passages in a pretty way on import, but I have more important things to do right now. My hacky Twine code doesn't parse nicely, so all of these passages need to be cleaned up a lot. Still without changing anything after an import it at least tries to run.


 Testing this out to see how far I could get lead me to another issue that I hadn't thought of.


I want to have all the text in the game be viewable in a big ass scrollable list ©. So far I had no reason to believe that this wasn't working, but after playing through NDGA I ran into an issue with the vertex count within the main panel view. I'm using NGUI to do the interface and the way it handles text is to create meshes. Normally this isn't a problem and it's actually an optimization over the built in OnGUI system (I think). Thing is once you get to like 60k vertices on a single mesh you have a big ass problem ©.

label
label under x ray vision

I'm hoping that the solution will be to just break apart the big ass scrollable list © into separate labels per passage and per command. Then just have them clipped when off screen. If that solution doesn't work, then I guess I'll have only one passage displayed at a time or some kind of limited amount of text. The good news is that this is the last major bug that I know of and now I have pretty much everything I need to make stuff.

No comments:

Post a Comment