Sunday, December 20, 2015

The Perfect Cast

(New build is up here!)

Hi! I didn't have much time to code this week, but I did have enough time to unravel one of the last mysteries to smoothing out how this game plays.

See, having solved (for the most part) the issue of getting caught in the middle of long warp-wall loops, I thought I'd move on to the next most annoying thing that happens when you play: not warping when charging at a warp wall.

See, the secret to this issue is what happens when you hit a warp wall. In old builds, a ray is cast backwards from the player in the opposite direction of movement. I liked this because it felt exact and predictable. If you're just hairs away from hitting the opposite warp wall with your raycast though, it can look like you ought to have warped:

But, as you see, that raycast is nowhere near the warp wall we want to warp to. This results in frustrating moments where you feel like you ought to have warped but you don't.

The solution is to use a different method of warping. I've thought of two options, both of which work to varying degrees:

  • Use a spherecast. Spherecasts work like "fat" raycasts, so they can be configured to be more or less forgiving as I deem fit.
  • Still cast a ray, but use the orientation of the warp wall for the direction of our ray. In other words, always cast a ray which is perpendicular to the face we hit. This results in a lot of horizontal movement at times, but in exchange you will literally never hit a warp wall and not warp to another warp wall (assuming there is a second warp wall directly across from the first...)
This build uses the second method. See how you like it.

Charging-up noise is a sound by Javier Zumer, modified by me. Used under this license.

Sunday, December 13, 2015

A behind the scenes improvement to charging, and a new visual aid for aiming.

(New build is up here!)

So, I decided to follow-up a relatively productive week with a relatively unproductive week. So it goes. And yet! This blog is absolutely doing its job when I'm motivated to at least accomplish something in lieu of just saying "Eh, one week without progress is okay."

I set out to do two things: a) Look into implementing a system which would predict where your charge would take you and project a trail showing you that path exactly and b) Change the charge code so that you automatically quit charging if you're up against a wall, instead of getting stuck there for a few incredibly annoying seconds.

The results?

A) That system would be very difficult to implement. At least for me, and for how this game is set up. I'll need to think more about how I can get that to happen. In the meantime, I'll project a line forward which grows as you charge your attack. It serves the same purpose (namely, to give the player a greater idea of where they're going) while perhaps not spelling everything out too much.

B) I can probably make the charge end if the player drops below a certain velocity, but that seemed... inelegant. I think the problem isn't that you sometimes get stuck against a wall - it's that you're stuck against a wall for far too long. Getting stuck after a full charge straight into an obstacle feels like a good consequence for poorly executing an attack. The real issue is that you charge for an amount of time equal to however long you hold down the charge button. This was capped at an upper limit of 3 seconds. After playing around, I found that you never actually needed to charge for longer than 1 second, so I brought it down to that number. The result should be far less frustrating.

Charge-up noise is by Javier Zumer under this license. It has been edited to fit the new charge time!

Sunday, December 6, 2015

Control refinements!

(New build is up here)

Only two real changes this week, but I am excited about both of them. First, you can now click to begin your charge in addition to using the space bar and the right trigger (yes right trigger, not right bumper. I finally got around to doing that, too!). In addition to being able to charge with the mouse, the arrow will only follow the mouse if you are holding down the left-click. This makes aiming with the mouse feel a lot more purposeful and useful than before, where it was sort of haphazard and clumsy.

The other big change is that I've gotten to the bottom (sort of) of the issue which kept causing you to get stuck when charging through two nearby warp walls. It still happens occasionally (especially on level 6, which is always the main culprit) but it's a lot rarer now.

Charge-up noise is courtesy of Javier Zumer, under this license.