Spellcaster Studios

Make it happen…

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”

Bug fixing: Mac Edition

Still working on finishing the Mac port…

I found some performance issues, and after a lot of work I figured the problem is mainly the ambient occlusion.

The Mac I’m using for testing is an i3 with a Radeon 5670 with 512Mb of RAM, so it’s not totally a surprise it performs terribly when I push the graphics fidelity up.

The ambient occlusion will be an option, though, so Mac users can turn it off (if they don’t have a better iMac than me), and I’m still going to play around with the ambient occlusion shader, see if I can optimize it (less samples, etc).

screen684

I can also make the game run at 30 FPS (that’s the minimum frame rate I’m getting) on the Mac, instead of the 60 FPS.

Also have a nasty crash (which only seems to happen on Mac, although I haven’t run full tests on Windows or Linux to make sure) which I never to address…

Now listening to “Blackwater Park” by “Opeth”

Still on hold…

Well, as you might have surmised from my last post, there was a serious problem in my family, a death to be more exact, and as such I’m not in the state of mind nor I have the time to work on Gateway for a while now…

Hopefully next week I’ll be able to come back to the game, maybe reveal the teaser trailer or something, but for now I’m incapable of working on it…

Stay tuned!