First, I’d like to notify anyone who is following the blog that I have recently been streaming development of the game over on twitch, so follow the channel there and ask to be notified when it goes live. If you missed the stream, you can find a complete archive of all the development streams on my YouTube channel.
So, at the time of the last entry, I was struck with the problem of resolving the ambiguity between the point-and-click type panels and the walk-around type panels, in that they looked pretty much the same. I was also considering abandoning the point-and-click interface as a solution.
This week, I did some more iteration on the artwork for the snake panels, and I’ve reached something that I’m pretty happy with, overall.
Primarily, It is clearly distinguishable from the point-and-click panels. But it also solves a lot of the other small issues that the panels had: The start tiles are clearly elevated compared to the other tiles, and for panels where the player can start on any tile, the startable tiles subtly depress and show a small highlight, encouraging the player to press a button to activate the panel.
I did some other cool interface readability work, but I won’t post it here because spoilers!
The Nitty Gritty Stuff
Mostly though, this week has been technical work.
I did some general performance optimizations when it comes to the panels. They weren’t running terribly, but it seemed like a good time to clean up a lot of the code because I am close to finished with the new interface and know what I need to keep around. Also, there were just some dead wrong things I was doing with regards to solution validation on panels that were eating up CPU cycles. One of them was a bit of a “how did this ever work?” type issue.
Another nice to have feature, which really doesn’t impact the player’s experience much, is Unity’ live script reloading feature. I had broken it at some point for the puzzle panels, and I took the time to investigate why and fix the problem. It was relatively simple, with the only real issue being that I was storing some gameObject references using multi-dimensional arrays, and (amazingly) Unity does not serialize multi-dim arrays.. In order to fix that, I just replaced the multi-dimensional arrays with single dimensional ones and just use [x+width*y] every time I want to access them. I’m still not super happy with this solution, but it at least got the script reloading working.
There was a minor additional snag when trying to get the script reloading working. Which is that even though it was actually working, I couldn’t tell because part of my code didn’t think the panels were visible on-screen and was disabling them (premature optimization bites me again!) The issue here was again just serialization, although most of the panel was getting serialized properly, the bounding box structures that I use to determine visibility were still getting destroyed on script reloads, so all the panels would fail the visiblity check on script reload. Oops!
The rest of the work that I did this week was just about ensuring that all of the existing puzzles are still solvable using the new interface paradigm. There are currently 138 puzzles in the game, which may not seem like a lot, but it’s enough that it can be a bit hard to remember what features all of them do or didn’t use.
As of now, there are only two more small things on the list to implement and the game will be fully playable again, which is great.
Only major bummer is that I have a cold, and I have to go back to my day job in three days.
You can write custom Property Drawers to serialise multi-dimensional arrays. I am using 2D arrays for my game too, and it was actually really easy for me. I just followed this tutorial – https://www.youtube.com/watch?v=uoHc-Lz9Lsc – and had a 2D grid of checkboxes in the inspector for my 2D array of bools. I’m sure you could easily extend it to be a 2D grid of GameObjects or whatever else, as well as increase the dimensionality and display that somehow if you so desire.
LikeLike
PS: your blog description still says “AN mysterious puzzle game”
LikeLike
PPS: you should post your devlog on TIGsource, you would probably get some followers there. That’s how William Chyr got a lot of his, I believe. (If you want that, that is.)
LikeLike