Spellcaster Studios

Make it happen…

New home office…

Well, no time to work on the game today… First, I was setting up my new “home office”, which involved a lot of moving around and clearing stuff from my desk…

This is still not final (missing all the computers I need, and this desk is too small), but for now it will have to make due…

IMG_0148

Also, need to prepare a lot of stuff for some interviews next week, rewrite some CVs and other such stuff, so time is really short at the moment… I can’t even find enough time to play with my new PS4! Sad smile

And my keyboard seems to be breaking down as well… When it rains, it pours…

Now listening to “The Black Flower” by “Diabolique”

Link of the Day: Because everything is better with some Star Wars in it:

Happy birthday to me

Well, it’s my birthday today, and that means no work… It’s one of my general rules that I never work on my birthday, and I’ve been faithful to it for the last 20 years or so! Smile

So, have a beer and toast to my good health, on this day of my 38th birthday!

Shader quality

Just added a shader quality system to the game, so that some shaders can be customized for less-powerfull GPUs (like the one I have on my Mac).

Currently, only the ambient occlusion stuff is affected by it (since the Mac seems to be sampling-limited). So, without AO:

screen693

Maximum shader quality:

screen694

Minimum shader quality:

screen695

Not amazing, but still looks better than no ambient occlusion (especially from far away).

Now listening to “Keeper of the Seven Keys, Part 1” by “Helloween”

Link of the Day: Amazing opening cinematic… Too bad I just bought a PS4 (and I’m very happy with it!):

More stippled alpha

Still working on the occlusion shader, trying to decide what looks better…

So, we have two options: using alphas (left) or using a stipple pattern (right):

screen691

screen692

I prefer the right side, but based on some informal research on Twitter and on my Facebook friends, everyone seems to prefer the left side… So, left side it is!

Just need to add a few sound effects in the first area and add the shader quality on the ambient occlusion shader to be able to make a decent Mac build.

Now listening to “Skin and Bones” by “Lyriel”

Link of the Day: This was awesome, I laughed so hard:

Occlusion on water

Still working on the occlusion on the water…

The major problem is that this is very render-pipeline dependent. I have to render the water in the depth/normal pass, or else I won’t have decals, so I’m kind of stuck with what I can do with it…

So, I decided to try a different approach: use stippled alpha to show the occlusion, hoping it will make more evident that the player is immersed in the water. The results are not very good, but I think they’re promising:

screen688

It flickers a lot when the player moves, but that’s probably the way I’m doing the stippling in the shader, and I think the stipple pattern is not very good (it renders only on odd pixels). I might need to use a stipple texture to modulate this… I can also use full-blown alpha on this step:

screen689

It might also work for the intended purpose, and doesn’t require much tweaking, unlike stipple alpha which I think shows a bit better the occlusion but needs some tweaks to get right (especially in low resolutions).

Anyway, I’m still going to play a bit more with this before moving on the shader quality stuff (especially for AO on the Mac), and why the loader doesn’t show up in OpenGL/Release build… Then I’ll probably be ready to send over this to the artist so he can play with the game a bit and get a feel so he can work on the UI, which comprises most of the remaining work on the game (maybe being out of work can really push the game forward)…

Now listening to “Absolute Dissent” by “Killing Joke”

Cache issue fixed

So the bug I found yesterday was cache related… The planet (including the flow map) was being regenerated when I went back to the ship, but the associated areas weren’t, so they were still drawing the old data…

Took me a bit to figure out, because I couldn’t do any debugging in debug mode, because the water courses are not generated in debug mode (it takes too long, and I don’t want to optimize it just because of debug mode and STL).

screen687

Now, I found another smallish issue (not a bug, a feature). Because of the occlusion stuff I’ve added (so we can see the player through walls), it displays the player’s legs when he’s in water (which I don’t want to).

The easy way to fix it would be to not render the water in the normal/depth buffer, but that makes me loose the decals I have when raindrops and the player moves… So I need to find something smarter to get around this…

Now listening to “Vine” by “The Man-Eating Tree”

Not much time…

This is recurring nowadays…

With my current work situation, and other personal issues, my time is pretty much limited to one hour or so of development per day, and that’s terrible, since that’s mostly the time I take to get “in the zone”.

So I usually start development on a day, late at night, find a bug (because in the current stage of the game development, that’s most of the work, while doing testing), and it takes me about 45 minutes to sort it, and then it’s time to finish up development for the day…

screen686

Now I’m having a problem with the water flow shader and multi-threaded generation… When I get to a planet first time it works, when I go back to it, the flow texture isn’t there… No idea why yet, but I just found this one about halfway in the development for today and I haven’t got the time to track it down…

Now listening to “Far From the Sun” by “Amorphis”

Crash analysis

Well, the crash I thought was gone wasn’t that gone…

Took me a bit to track it down, but finally I got it down…

At first, it seemed to be a memory corruption somewhere, but it only manifested itself on the Mac build. Activating memory guard and other helper debugging tools didn’t show any memory corruption, but the problem persisted…

Tons of logging later, I finally tracked it down to a glBindVertexArray(0) call, which seemed very odd, so I thought that maybe the pointer to glBindVertexArray was getting corrupted, but the logging didn’t support that…

As usual, it ended up being something simple… I was just calling glBindVertexArray from the wrong thread, instead of the OpenGL thread… And it only happened on Mac because apparently the driver is a bit more picky (under Linux and Windows, I can apparently do that, even if it is incorrect)…

So now, no more crashes and I can start finishing the polish of the Mac version so that I can send it over to the UI artist…

On other news, I’ve been working on getting a new job, got some nice leads (including a couple of ones in game development), but nothing concrete so far… So, if someone has a job for me, just let me know! Smile

Now listening to “Swallow” by “Heavenwood”

Link of the Day: Fractals are soooo pretty: https://vimeo.com/136642732

More static analysis

Finished up the static analysis and fixed all of the issues, except a real no-issue with an external library…

The crash I was getting on Mac seems to be gone as well, but I need more testing to make sure…

screen685

As I’ve mentioned, my life has taken a bit of turn in the last couple of months, so don’t be surprised if updates are a bit erratic for the coming month or so… I’ll be working on the game as much as I can, just not sure how much time I can dedicate… I also have a logistics problem, since the machine I use for Mac and Linux porting belongs to the company I currently work for and is closing down… I’m going to try to buy it from them (they’re old machines), but if I can’t, I’ll have to figure out some other solution for this problem…

Now I’m just fixing the initial part of the game, improving the sounds and adding a “shader quality” option on the game so I can get a working Mac build to the artist…

Now listening to “Vocalo Zanmai” by “Wagakki Band”

Link of the Day: An amazing presentation from Guerrila Games regarding the cloud system of Horizon Zero… Really neat stuff there: http://www.guerrilla-games.com/publications.html

Static analysis

I just found a neat tool on XCode, a static analysis tool, which provides me a list of potential problems in the code (null pointers, unused code paths, etc), so I’m cleaning up the code to address these issues…

There’s a lot of “false positives” (well, they aren’t exactly false positives, the problems might exist from a code perspective, but other pieces of code either handle this, or if they reach that state I have more serious problems than a crash), but they’re easy enough to clear…

So, that’s my day…

Now listening to “New Blood” by “Peter Gabriel”