Spellcaster Studios

Make it happen…

Savegames done…

New version of the savegames, now in binary, is complete…

Used to take 2 to 9 seconds to make a save in XML, now it takes 50 ms… So, that’s a win!

screen672

Next step, load the savegame, which should be the easy part… Would have been done by now, if I wasn’t still sorting some stuff in my DayJob™ and RealLife™… :\

Now listening to “Live Consternation” by “Katatonia”

Savegames, revisited…

The savegames on Gateway are taking a bit too long to execute (about 2 secs)… This is not a big issue, but it causes some stalls before and after a cutscene, and I dislike it…

Besides, the first save I save, it takes 2 seconds, but the second (and the rest) takes 9 seconds, which is super-weird… Since I had already planned to switch over to binary files, I’m going to switch first and see if the problem goes away or not…

The current savegame system uses XML to store (because I can edit it by hand and play around with it), so it had a really loose structure, but now I need to make it more rigid, so it can load/save faster and in a platform independent way…

First step was creating a data buffer that could resize at will…

screen671

I had such a buffer class in other projects, just had to cannibalize it… Why not std::vector<char>? Well, my main reason is historical… I never got used to using that in the past because using them in debug mode is so slow (I can turn it off, but in Visual Studio this leads to such head aches combined with other libraries, that I kind of gave up on it), and this way I can add functions to handle indieness in the future if I want…

Still, on my next project, I should definitely look into boost… Everybody uses it anyway…

Now listening to “Murder_4_Hire” by “Body Count”

New assets…

What should be just 15 minutes of my time ended up being a couple of hours today…

The artist provided me some new props for the labs, and I was putting them into the game, but I couldn’t get them to display!

After a lot of time of fruitless debugging, the issue ended up being super-simple: the pivot point of the objects was wrong!

screen670

From the game perspective, that table is in the middle of the map… Disappointed smile

I think I must have been tired to have missed this one (and the current uncertainty of my life doesn’t help as well)… I just feel annoyed I spent 2 whole hours on this, instead of adding this to the maps…

Now listening to “Heavy Metal Breakdown” by “Gravedigger”

Link of the Day: It’s really impressive what you can achieve in 4k:

Selection

Don’t have much time for game development, since today is actually my wedding anniversary…

So I just added the selection capability to the action mapper and UI map…

screen669

Unfortunately, just remembered I still have a very complex component to make for the UI Map system: the scrolling components… That one will be tricky to add on top of the existing framework…

I’m also having some problems with my Subversion repository… At home I use a Raspberry PI with an external HD to act as SFTP and SVN server, but lately, as soon as I start transferring stuff to it, the mount gets dropped and I have to restart it to get access to the hard drive again… Not sure if this is a power problem (the USB ports on the RPI are notoriously weak), or if the hard drive is dying, so I’m going to buy a powered USB hub to see if it’s a power issue…

Now listening to “Wild Honey” by “Tiamat”

Mapping actions…

Most of the major code of the action mapper is done, now I need to convert the existing code to use the action mapper instead of the previous systems…

On some cases this might prove tricky (the email viewer, for example), since it was one of the first things I’ve created, so it’s a bit hard coded…

screen668

On the main menu it already works! Open-mouthed smile

Now listening to “Summer’s End” by “Autumn”

Link of the Day: This is so totally awesome… Hint: click and drag on the video… Surprised smile

The action mapper

Two things I was still missing from the core tech was the ability to redefine keys (not everyone likes my layout, of course, and people with keyboards different from QWERTY might have some difficulty using WASD), and controller support.

For both of these, I need to build an action mapper.

This is an abstraction layer that allows to say that the key associated with the action UP is ‘W’, and that moving the left analogue stick forward also has the same effect.

So today I spent it building the basis of this…

There’s still some problems to solve, especially regarding aiming… In the current game state, the mouse aims the shots… With a controller, I’d need to use the right analogue stick to aim, but then the player looses the verticality, which might be complicated in certain environments… Need to think this one through…

screen667

Also finished making my portfolio, if you want to take a look: http://www.shadowcovenant.com/portfolio. If you are interested in a game developer or software engineer, just give me a shout! Smile

Now listening to “Skills in Pills” by “Lindemann”

Link of the Day: This demo is pretty sweet, considering it’s done in a ZX Spectrum Enhanced:

Particle bugs…

Not much time for game development today… Since my professional life is a bit undecided at the moment, I’m taking some time to work on a portfolio and my CV, and see what’s out there…

Anyway, I did some work on a weird bug that I noticed on the Mac build (although it’s present on all builds):

screen665

The most attentive amongst you will notice that the particles are running behind the player, instead of the right position (in front of him)…

My first thought was a problem on the new inverse-Z pass, but the particles don’t use it, and the player won’t fail the Z test there (the particles don’t write to the Z-buffer)…

Then I thought it may be a problem with sorting (since the particles don’t get drawn on the Z-buffer, the player was being drawn afterwards and messing up the render)… Disabling the alpha pass from the player, solved the issue, but that’s no solution… So it looks like sorting, even if it didn’t make sense looking at the code, so time to fire up the debugger and confirm if my theory about the ordering…

And… I was wrong… The object is sent to the scene graph earlier, as I saw, but it gets queued on the blitter, which means that it actually gets drawn at the end!

Simple solution, force a flush that forces the pipeline to flush after a change of “type” of rendering (mesh to blit, or vice-versa), but only for the alpha-pass. It was on my list to alpha-sort things anyway, so that flags can be used for that as well…

screen666

And there, problem solved! Smile

Now listening to “The Battle” by “Allen/Lande”

Link of the Day: I love the visuals on this demo:

A lot of bug-fixing…

Today was the time for a lot of bug-fixing (you remember the list from yesterday?!):

– Bounding boxes now correct (they were screwing up on some tall objects, which led them to disappear before they should, instead of only off-screen).

– Sound issues were solved (including the combat music rolling in and out properly… Also added the menu music).

– Some tweaks on the cutscenes (ugly popping on some of them, taking too long to start).

– Invisible enemies no longer show up as occluded.

– Particles on the portal no longer disappear when overlapping the portal in screen space.

– Tweaked the first boss fight to make it a bit more interesting

– Fixed bug with animation selection based on camera orientation.

Still have plenty to fix, including a Mac-only issue, probably going through them tomorrow…

screen664

Now listening to “Star Rover” by “The Loveless”

Link of the Day: This looks like a nice Kickstarter… Cyberpunk adventure with a lot of minigames going around, that’s certainly my cup of tea: https://www.kickstarter.com/projects/syncbuildrun/vnext

Mac playthrough

Started the Mac playthrough, and it was glorious…

…in the sense that it lasted one cutscene, until I found a bug in the system and had to track it down!

It ended up being a multithreading bug (which didn’t show up on Windows due to the fact that Windows allows for locking a mutex twice from the same thread, but not referencing counting the mutex (so you can lock twice, but release only once, which can lead to weird behavior)).

After that was fixed, I started playing…

screen662

And this is the list of issues I’ve found (the handwritten stuff):

screen663

Most of it is quite simple, though, it’s real polish stuff…

The only one that kind of worries me is that SSAO looks terrible at a quarter resolution, but the Mac video card can’t take more resolution than that without becoming very slow… And removing the the SSAO is not an option, it looks terrible!

Anyway, in general it worked fine, so I’m relatively happy about the game…

Can’t say the same about other stuff, though… The company for which I work in my DayJob is shutting down it’s operations in Portugal, which came as a bit of a surprise, so I’m not 100% sure on what I’m going to do in the future… I have a lot of options, so not worried that much (including continuing to work on the same company, but in the HQ), but this will probably impact the development of Gateway, and it’s a massive disruption of my life… We’ll see…

Now listening to “Shatter Me” by “Lindsey Stirling”

More bug fixing

Today was mostly about fixing bugs in the different ports, adjusting small issues that arise from there, and fixing the broken audio system…

So, the result is:

screen661

Right side is the game running Windows (Direct3D), middle is Ubuntu 14.04 and left is iMac!

Everything is fully functional, from my tests…

Next step is seeing if I can play the initial areas on the Mac, so I can then send a build to the UI artist so he can start working on that, and I can move onto the rest of the small issues I still have…

Only three “big” tasks remaining (all optional really): glow shader, realtime reflections and controller support… Well, controller support is not optional, I really want to have that in the game…

Now listening to “Abyss Masterpiece” by “Heavenwood”

Link of the Day: Such a cool idea!