Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

It all started this thursday when Phaze Pyre, one of the friends I've sent a test build to, told me the game was freezing his whole computer when he booted it up. That is a big problem and I couldn't reproduce in my machines, however my machines are pretty powerful so it's hard for me to find those kind of issues.

I started profiling it, and as I was in fact doing a lot of the scene's setup right on Start there was a huge spike on the first frame. I was also reading and parsing all of the XMLs for the levels in that first frame as well, which in retrospect was a bad idea.

So I went on to change the way the level serializer works to make it read the XMLs over several frames, spacing it out. I also changed the way the first scene works so it adds one element at a time over several frames, which should also mitigate that initial spike. After that the game started loading way faster than it was loading for me. I wasn't seeing it hanging before, but there was some delay between starting and "actually starting".

Another point that could be problematic is actually loading the gameplay level, as a lot starts at the same frame. I remember seeing a loading screen in Skyhook so I asked WaseQazi about it and he pointed me towards this gamasutra article about it

image

After several hours, I got the game working with a loading screen and starting potentially heavy stuff over several frames, and even though I wasn't having hanging problems before, the whole thing felt more responsive and lighter! I then ping my friend again and send him a new build. He then tries it and… It's still hanging. At this point I'm starting to get desperate, it doesn't make sense that it's hanging, after slamming my head against the wall a few times I decided to do what I always do when debugging something, turn things off one at a time until I find the culprit. My first suspect was the XML level serializer, and when my friend confirmed that it was still hanging without it, I was a bit relieved. However when I turned off the inputmanager (which interacts with the gamepads) he wasn't seeing hanging anymore. D: That could be a big problem since A LOT of my code relies on that. He told me that he was using DInputMapper to use a PS4 controller on his pc, so I asked him to turn that off and try it without it. No more hanging. He then turned it on again and… NO MORE HANGING!

So… In the end… All of this was made to solve something that wasn't actually a problem on my part, but on some third-party stuff that just needed a restart or something. Well, at least the new loading system and the spaced out start calls did make the game lighter and more responsive, which will be specially good for the consoles :)

This actually caused a lot of other problems in other parts of the code, since a lot of it was relying that certain things would happen on the start and when a certain thing started the other would already be there… I believe I have fixed all the bugs that caused, but it did take quite a while, according to toggl I've spent about 12 hours on this.

image

Other than that, which took a lot of time to deal with, I added a little "invisible powerup" which is really cool ^^ it will make you and your fist invisible, so you can potentially surprise an unsuspecting player.

Well that's it for now :) Next up I should be working more on the singleplayer. I need to make new enemy art, so the enemies can look different, then make some more enemy behavioral variations for it.