Spellcaster Studios

Make it happen…

Pirate Lairs

Today I revisited the pirate lairs, adding a lot of new stuff, like rock walls, props, loot at the end and fixing a lot of small bugs.

screen145

In the screenshot above, I removed the roof to be able to look inside.

I’m having a performance issue somewhere on the lairs… Not sure if it is the props (don’t think so), the AI (more likely, since there’s a lot of them running) or the rendering (working on my laptop, so that might cause it). Weirdly enough, when I started removing elements, the turrets were the ones that impacted performance the most (at least it felt that way), but the turret code is very straightforward, nothing there that should cause this slowdown.

Need to add some profiling code to the game to be able to see where is the slowdown.

Now listening to “When Love Evokes the Curse” by “Autumn”

Link of the Day: Because of my day job, I work a lot with Javascript, so understanding how the garbage collector in a managed language works is very good for optimization purposes… Here’s a nice link as an introduction to garbage collectors: http://www.gamedev.net/page/resources/_/technical/general-programming/modern-garbage-collectors-under-the-hood-r2995

Playthrough, Part IV

Today I advanced a bit more in the storyline… It’s going well, almost no actual code written today, just writing text and scripting the cutscenes…

Took another first person screenshot… They look cool, think the next game in this series will be first person! Smile

screen144

Now listening to “Le Roi Est Mort, Vive Le Roi” by “Enigma”

Link of the Day: I’m not very into multiplayer games, but this game almost makes me reevaluate this… If they can open a lot of different options for the players, it will be awesome! https://www.youtube.com/watch?v=U2Wu0hOSOyA

Balancing

Today I didn’t have much development time, so I just decided to play the game a bit and balance some stuff, mainly costs of equipment…

The thing that’s been bugging me the most about the costs is that I feel the fuel cells (which allow me to travel to another planet) are too expensive… I don’t want to remove the cost altogether, but I think the player need to feel he’s rewarded for exploring. If I put too much of a cost in the fuel cells, the player will go straight from A to B, without wandering… If I make it too cheap, he’ll might not bother to grab some alloy on each planet, so I’m trying to keep in between.

Since this isn’t “cool screenshot” subject, I give you the first screenshot ever of the game (back during the Indie Speed Run):

screen000

Link of the Day: I’ve been looking at normal mapping without precomputed tangents for a while now… It has lots of things going for it, and the only drawback is the extra computational cost on the pixel shader, which is becoming less and less important. Here’s a good overview of it: http://www.thetenthplanet.de/archives/1180

First person mode

Today I wasn’t feeling like working on storyline stuff (need to grind for some alloy to get to the next planet in the story)… As I was talking this afternoon with my colleagues, I playfully said that I had to try the game in first person mode one of these days… And “one of these days” turned into “today”!

Tadam!

screen139

Was expecting this to be easier, to be honest, but I found some problems… First my mouse system on this framework is a bit poor and geared towards “cursor-like” behavior. It’s fine for the game as is (and all games I’ve done with it before), but when you go to first-person, you’re more interested in the cursor delta (the variance of the position) than the actual position. And extracting the cursor delta was a bit harder than expected, since my mouse system is built on top of the Windows messaging system, which doesn’t provide me with the actual movement, but with the new position… I could extract the delta subtracting the current position from the previous, but this has a series of problems. For one, if the cursor hits the edge of the screen, the mouse can keep moving, but the position won’t change… And second, any sudden movements while minimized, etc, will be all mapped when the focus returns to the application, which would probably cause a lot of weird behaviors…

screen140

I ended up having to strip down the Spellbook mouse library to get a decent behavior, which made me have to organize some pieces of code differently…

The camera code was also a bit sloppy (too hard-coded), so I had to refactor that as well… but it was totally worth it!

Although it looks awesome in some places, it simply doesn’t work… the game was designed with the top down in mind, which means that in (for example) in the swamp planet, it is too dense to navigate appropriately. It’s easy to navigate in third person, since you have reference points, etc, but in first person you get lost too easily…

screen141

The fog is also too “constant”, it should vary a bit per-pixel to look more realistic.

But this experience wasn’t a total loss… I’ve found some problems that I didn’t notice before (and others became more noticeable)…

There’s a lot of Z-fighting in the spaceship:

screen138

And most props are a bit above the ground (probably something to do with the finding the height at a certain point):

screen143

I think I’m still going to do more work on this first person mode anyway (in the polish phase)… There’s some new gameplay I could chuck in at certain points with it (controlling a laser turret, for example, to defend a base, or a space battle of sorts). It shouldn’t be too hard to make that work if I have the first person mode working properly.

screen142

A lots of screenshots today… Smile

Now listening to “Wild” by “Inkubus Sukkubus”

Link of the Day: The demo scene is indeed capable of amazing feats of programming… Here’s the dissection of a 128-byte raycaster (that’s a 128-byte executable, yes…). Besides being impressive, this breakdown is a real insight in optimization techniques: http://finalpatch.blogspot.pt/2014/06/dissecting-128-byte-raycaster.html

Bats!

Just added the second feature of the caves: the bats!

These are small, low-health enemies meant to annoy the player and distract him from the real danger of the rockfalls!

screen137

I don’t have the art for it yet, so I’m using the player sprites to do the gameplay logic!

So, I’m done with the cave temple, now to get deeper into the story… Need to do some grinding to have enough fuel to go to my next destination, though…

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

Link of the Day: Here’s a nice article about pathfinding, mostly focused on waypoints vs navigation mesh: http://www.ai-blog.net/archives/000152.html

Rockfall

Just added another game entity/enemy: the rockfall! In certain places (currently only on the cave temple), there’s falling rocks, which damage the player and knock him back (which may cause him to fall down and splat!).

It was surprisingly easy to put in, which is pretty good (and unexpected, most new entities give me some headaches!)… It has 3 components: the dust falling before it drops, the rock and the rock shattering… Still need some work on the debris when it drops, but I’ll get to it in the polish phase.

The screenshot below is not a very good one to see the effect, but it’s hard getting a good screenshot for a fast effect:

screen136

Sometimes, we have funny bugs… This is what happens when I detect the collision, trigger the death of the rock but forget to remove the rock at the end:

screen135

Every game tick (60 times a second), a new explosion is generated!

Here it is in GIF form:

BugRockfall

Link of the Day: This kickstarter looks promising… a more tactical space RTS (instead of fast based RTSing): https://www.kickstarter.com/projects/1826182233/contact-vector-rts

More on custom areas

Just added the code to get in and out of custom areas… Was a bit complicated, considering the data flow of the game (I didn’t predict this when I did that code back in the Indie Speed run).

Anyway, got that working, plus script binds for lights and props. Oh, and the intro cutscene to the cave temple!

screen134

I should hide the cursor during cutscenes…

Now listening to “Version 2.0” by “Garbage”

Link of the Day: The ideas behind this Kickstarter seem nice… Always wanted to play a game where you steal stuff with a plan of your own mind, instead of just shooting: https://www.kickstarter.com/projects/374958068/the-hit-stealth-action-in-a-dynamic-city

Custom areas

Got the custom areas working in game!

Still have some work to do in transitioning from custom areas to the normal planet areas, and vice-versa, but the base code is done…

screen133

I still have a lot of work to do on the temple: introduction cutscene, a new type of enemy, a special hazard and random shaking… It’s going to be a fun area to traverse…

Also want to do a bit more work in terms of decorating the temple, making it more “ancient ruins” and less “natural caves”.

Now listening to “Slania” by “Eluveitie”

Link of the Day: Really excited about the “Dracula Untold” movie… Looks, really, really, really neat! https://www.youtube.com/watch?v=xSUCMGJXHtY

More options on the editor

Today I didn’t have much time for development… I just added a new UI element (that is useful for the editor and for the options screen the game will eventually have): a checkbox.

Also added the possibility to change the voxel material without affecting the color or the emissive. I needed that to replace the ground on the main temple area, since it already had some light baked into it.

screen132

And we have a milestone today! It’s precisely one month since I’ve started doing the daily updates, and so far the experience has been very positive: I’m more motivated about the game, it’s less painful working on it (because I don’t have to remember where I was) and there’s more feedback from readers… All in all, it was a victory! Hopefully this will help me finish the game in the next months!

Now listening to “To Hell And Back” by “Sinergy”

Link of the Day: I don’t believe this is actually possible with computers on https://www.sodapdf.com/, regardless of every proof and technical paper and even if I see it working… Video signal reconstruction from degraded sources… Pretty impressive stuff, I almost feel like implementing this! http://research.microsoft.com/en-us/um/people/celiu/cvpr2011/

The cave temple

Just working on the cave temple at the moment… Had to add some scripts to get some effects I wanted, and added fake lighting to the editor…

screen130

The area will be all dark, but the crystals and the players flashlight…

It will also have a new gameplay element (falling rocks), and I still need to think of something interesting to place in the temple itself.

Then I have to add all the code that will allow me to specify that stuff in the editor without having to make a UI for it, and then import that in the game itself (like I do for the XML maps)

Now listening to “Keep Hope Alive” by “The Crystal Method”

Link of the Day: Nice article on naming system for resource systems. My main engine (Spellbook) uses a GUID/name-based system, but there are some interesting points being raised for the path-based approach: http://www.altdev.co/2014/06/18/what-is-in-a-name/