Dev-Diary: 6

Hello!

The past two weeks have been pretty hectic with both work-life and personal life, so I’m afraid this won’t be too long.

That being said, aside from a few more patches and rooms being completed, the audio optimisation I was discussing last post has been completed! Instead of now updating over-overwhelmingly, the engine will now update individual sounds in a cycle to prevent running too many alterations. Additionally, the update also accounts for when too many sounds are running and decreases the frequency of updating to accommodate the updates, although this is also an option that can be toggled for people noticing the audio causing lag issues.

I look forward to completing more rooms and updates to get this demo and the revised engine fully functioning! Till next time!

Dev-Diary: 5

Sorry I’m a day late!

I’ve been spending a lot of the past 2 weeks just working on the maps, trying to get more done. I’ve been working on the trigger-related rooms, demonstrating how trigger functions work. This also opened up a few situations where I’ve found bugs so I’ve been patching them as well.

The main thing I’ve been working is optimisation! I work on a semi-powerful computer so it doesn’t serve as a good standard-benchmark for how the game engine runs on other machines. I’ve tested the engine before on other devices, but that was when it was bare-bones. The demo has a lot more content; full visuals, more dynamic sound, and more complex triggers. I’ve been running the demo on my laptop I use for note-taking, which, not exactly being a powerful device, I’m using as my benchmark as a standard device. Without any optimisation, there was obvious lag in many rooms! There are a couple of factors for this, but currently the two main reasons are visual rendering and sound complexity.

Visual rendering is actually very easy to fix; while building the rooms I had all the visuals set to constantly render as vectors, which looks nicer but eats away at processing! A more common render process, which I’ve used on my earlier games, is to render only once when the level loads. This process only applies to static visuals though, but it does help out a lot and removed all the lag issues in many of the rooms. Animated visuals have to remain as vectors, though can be exported as much simpler graphics should the need arise.

Sound complexity is a fair bit more difficult, though I believe I’ve managed to get it mostly fixed. There is a sound function in the engine which renders a sound as a positional object, constantly updating it’s position so that it sounds as if it is originating from a specific location. Originally, this updated every single frame, which is a lot, but worked without problem in a bare-bones scenario. However, multiple positional sounds all running in a fully drawn and animated map causes some problems. This has been addressed by making sure the sounds only update every few frames; not enough to be noticeable to the player but enough to ease up on the processing. I’m still working to try and have it regulate between multiple sounds to spread out the processing, but it’s getting there. The aim is to also have this as a quality setting, letting the player chose between more accurate sound rendering or better processing.

Other areas which I thought would cause lag issues are luckily running smoothly! A room that spawns a mass of projectiles, with the intention of causing lag, actually runs a lot smoother than anticipated! I have a lot more to go, and bugs are popping up still, but I’m trying to make sure I can not only have a fun game but a working game. Till next time!