Spellcaster Studios

Make it happen…

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

Comment