Spellcaster Studios

Make it happen…

Loading savegames…

Still working on this (and hitting myself in the head for not doing a more common system for this in the beginning, more “abstract”).

Anyway, reached an issue that will make the code altogether more complicated…

On the XML loader, the player data (positions, weapons, etc) is stored in an XML node, so when loading a save I just keep that node, generate everything, and then feed that node to the player so that it can build itself…

The problem is that with binary saves, this isn’t so easy to do… Of course, I can save the binary payload pertaining the player and feed it later (like I do with the XML), but that seems even sloppier than I’d be able to endure…

So now I have to add a save structure that can keep this data intact to use it later on the creation of the player… So, terrible coding… *sigh*…

Savegames are so much easier in data-driven system like the SurgePlayer… Surprised smile

screen674

It doesn’t help that my development time currently is so short, since I’m still trying to figure out my next step… Disappointed smile

What should take me about a couple of days to do will probably keep me busy the rest of the week!

Now listening to “Tunes of War” by “Gravedigger”

Work, work, work…

Note to self: always do ASCII/binary save game code in parallel, or using some sort of abstraction… :\

Actually, I usually do this, a bit more data-driven approach than with this game, but since this game is a the Frankenstein of games, I’m paying the cost (technological debt) yet again…

This game would have been done twice over if I’d made it with Spellbook/SurgePlayer/SurgeEd almost two weeks ago… Surprised smile

screen673

Anyway, still working on the binary savegames, now the loading part… Hopefully I’ll be done tomorrow (even that I’m writing this about one week before you read it, and I’m going with my wife on micro-vacations to celebrate our anniversary tomorrow)… Time on the Internet can work weird! Smile

Now listening to “Master of Rings” by “Helloween”

Link of the Day: The level of awesome of this website is soooooo high… Don’t know how accurate it is, but even if all data is made up, it’s extremely cool: http://map.norsecorp.com/

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