Skip to main content

CAGD 370 Blog Post 2 - Thunder Vault Movement Prototype V1!

 The game has made a great deal of progress in our second sprint! With the unreal project and gthub set up, it was finally time to start programming the movement. I started with the Unreal Third Person Template, because it comes with a functional player character using Unreal’s Character Movement Component, as well as a nice level to play around with the movement.



I began by tweaking the parameters of the Character Movement Component. The Lead Designer wanted the player to build up speed on the ground that can be translated to the air using the pole vault, and so I raised the max speed on the player and lowered the acceleration, which made our character control not dissimilarly to how Sonic The Hedgehog might. The next tweak I made was greatly lowering the jump height. While we still wanted the jump to be an option, we want players to rely heavily on the pole vault for moving vertically.


With the basic movement configured to how we liked, now it was time to start with the pole vaulting! I began by identifying where it was possible to vault from by using a raycast from the player’s head pointing 45 degrees downwards towards the ground. Then, by taking the surface normal of the raycast’s hit, I was able to reflect the raycast across that plane, and use that direction for an impulse added to the player. Then, I took the players velocity (scaled down a bit so that the impulse wasn’t insane explosive) added up with a baseline velocity to get the magnitude of the impulse applied to the player.


Red - Raycast checking for surface

Blue - Surface Normal

Yellow - Reflected Raycast with magnitude shown

Standing Still vs Running Full Speed




I also negated the Y value of the reflected vector when the raycast hit a vertical wall, allowing for the player to vault off of walls!


There were a few issues with this system however, Vaulting off of steep slopes felt awkward, because it would usually just send you straight up or backwards. And vaulting off of an angled ceiling would also send you upwards since the Y value was forced to be upwards when reflecting off of a wall.I had tried to solve this by using rotators rather than a reflection vector to determine the direction of the vault, but this ended up just becoming a mess of code that didn’t really solve the issues, and I’m still working on solutions to these issues as well as discussing with the lead designer about what types of these weird issues are acceptable constraints for designing our levels.


However, some of these unintended behaviors were actually pretty fun to play around with. While messing around I found that jumping at the same time as vaulting would give me more than twice the vertical height of the normal pole vault, and after speaking with the lead designer we decided that we wanted to keep this “bug”, as it’s added some interesting depth to the main mechanic. We also considered giving the player an extra forward boost when vaulting off the ground without the jump, to make both techniques better in different situations.


 Another unintended ability was a “wall-riding” of sorts. Because the player’s direction was a reflection off of the surface they’re aiming at, hugging a wall and aiming almost parallel to the wall, barely angled enough to be touching, meant that you weren’t pushed very far away, and that you were close enough to do it again, and again, and infinitely so long as you managed to time your vaults well and stay close to the wall.

The player is sent slightly away from the wall at this angle, but by holding left you can steer yourself up against it again to repeat the process indefinitely


While this technique is pretty fun, it also opens up a whole can of worms in the level design department if every wall can be vaulted along indefinitely as if it were the ground, so I’m working to implement a solution that still permits long sections of continuous wall vaults in the level design, without turning every flat wall into a potential sequence break.


Over the next sprint, I’m going to try and polish up the movement some more and fix some of the current issues so that we’ll be able to create a prototype level for playtesting!


Comments

Popular posts from this blog

CAGD 373 Blog Post 4

This sprint I was assigned a modular set to create the basic interior rooms out of, with three different textures for the walls. (a Square Brick Texture, a Cement Texture, and a Metal Wall Texture) The actual modeling itself was as basic as it gets, I just made a few different shapes and sizes of wall along with a doorframe, with a couple floors and ceilings to complete the set. The interesting stuff this week was the textures, all of which I made in designer! The brick texture was probably the most complicated, and the one I’m most proud of. Starting with a brick generator, I used some gaussian spots to add some variance to the shape of bricks (using the spots to “cut out” chunks of the perfectly square bricks) and that worked pretty well! After that, I used a grainy looking noise map to fill in the black part of this mask to add in the noisy texture of mortar between bricks Next, to add some color variation to the bricks, I used a flood fill node, which was able to identify all the...

Video Game Production Sprint 1

  After a long time spent away from Unreal Engine, I’m getting my hands dirty once again as a programmer for the Kill Everything in Sight team! KEIS is an endless action FPS roguelite where you play as a killer robot tasked with exterminating the remains of the human race. Despite your incredible movement and combat abilities, you are severely limited by a timer ticking down during the entirety of your run. Killing enemies will add precious grains of sand to your cruel hourglass, so the player must focus on speed just as much as precision! I was brought on the team as a programmer, and I started off very nervous since it's been a while since I last programmed in Unreal. On top of that, my first task was to create the foundation of our enemy AI, probably the most critical gameplay element after the player and level design, and I haven’t touched AI in Unreal outside the absolute basics! However, I was determined to make my team proud and confident in my ability to learn quickly...

Idle WitchCraft Sprint 4

  This sprint, I started by implementing alternate success conditions for certain scenarios. This means that for some scenarios, there will be multiple different stat checks that can lead to different outcomes, and potentially different scenarios down the line. Two different outcomes of the scholar’s exam scenario. One for high intelligence, and one for high charm! This was an interesting programming challenge, as I had to figure out how to associate these alternate conditions with the data table that is currently holding all the scenario information. The interesting thing about these alternative outcomes is that they function as almost half a scenario. They have no intro dialogue, but they do have a unique stat check, outcome dialogue, and list of scenarios to unlock on success. Because of this, I decided that I would copy the current scenario into a new struct. That way, I could “swap out” certain pieces of data at runtime without having to fill my data table with duplicate inf...