Programming Blog 06 – The Dawn of Stairkind
Good afternoon/morning/day/night, whenever you are reading this, everybody. It’s been a pleasant Christmas holiday for everyone at Junkfish, and, after a brief writing break, Jaime has got us back to writing these blogs again for the interest of you all! So, us programmers will flex our minds and reflect on the key features we have accomplished throughout the past month or so.
That brings us to the primary feature that was implemented over the past month: multiple levels! Before, our ship was over a single level; flat and dull, kinda like those maze things where you roll the ball around. About a week after we returned to work, yours truly used a primitive stair model to identify where changes in the floor of the ship occur and joined the corresponding connections back to the main bulk of the ship. It took some tweaking to eliminate all the bugs, but the result was a wonderful mess of corridors and rooms spanning multiple levels. I loved it. It has turned what was a reasonably straightforward gather-items-run-to-victory-point game into a labyrinth of confusion and tension.
Lots of darkness because we’re super myterious people
That isn’t to say this feature didn’t introduce its fair share of problems. The key items that spawn throughout the game were suddenly sparse and it could take player an unreasonable length of time to find all of them. Gary suffered from the introduction of these levels as the monster could suddenly attempt to climb stairs and had to find the player across different floors.
Oh the anger that spouted from him when this happened. The first bout of fixing this was to allow the pathfinding of the monster to travel vertically, instead of just horizontally. This was sound in theory, and worked to a certain extent for the stairs (he was able to travel down them), but it also meant he could run outside the ship. We had the monster falling away to infinity, running across rooftops, and just generally avoiding the player instead of homing in on the player.
After much adjustment by Gary and Bean of where the monster is allowed to walk, how his vertical navigation worked, and how fast his path was calculated, the monster was finally capable of moving up and down the ramp-like stairs we had added. Just as they managed to get this working, our resident artists provided a fully-fledged stair model to replace the grey ramp nonsense we had before.
Real stairs for real boys!
… And there wasn’t actually a problem. The monster is still capable of climbing stairs, although he can be a bit jerky. The new model also provides extra connections to lead off to corridors, allowing for a more varied ship and extra choices for the player when trying to escape the monster. The addition of extra stairs per level, instead of the initial amount of one on each level, further aided the monster’s pathfinding by providing extra options for it to get between levels. Design have also had us shrink the level size for now, to keep test builds simple, meaning the monster has an even easier time hunting the player. Good luck, players!
Steph has been working on a procedural lighting system, in part with Bean, to place lights throughout the corridor in a way that creates the atmosphere we desire for the game whilst retaining the random elements we desire. Lights vary between on, off, and flickering, and are positioned and chosen based on their proximity to one-another. A clever system, and it seems to work the vast majority of the time. Once our artists have played with the light values it’ll work even better!
As for Grant, he has been working more on the player, however he received a promotion to Designer! So he has been spending most of his time designing various features and aspects of the game, rather than coding. Nothing more to say on this enigma of a man.
Our head of local state, Bean, apart from working on the systems I mentioned above, has been attempting to optimize the game by having less lights and objects appear at any one time, and reducing the performance cost of physics in the game. It is, unfortunately, a difficult task and it is taking him some work. As far as I am currently aware, his systems are going well, but are not fully ready for proper implementation to the game. When they are ready, however, they will hopefully allow our game to include all these wonderful modern technologies like shadows and post-processing effects, without sinking the performance of the game.
Having heavily racked our brains, I believe that encompasses the main features and tasks we have been working on over the past couple of weeks. Jaime says our blogs (the codey blog) is going to be bi-weekly now, so we won’t be talking to you again for a wee while. Hopefully we’ll have something interesting to say/show, but we make no promises. Our medium is a tricky one to visualise. And so I bid you adieu, dear Junkfish followers, on behalf of all the programmers of Junkfish for 2 more weeks. BYE.
– Peter and the Programmers