Slow progress and big explosions
- Kevin G
- Apr 27, 2018
- 3 min read
One Rifle at a time
One of the major features that must be completed for the demo are rifles. For some reason, I decided to tackle this feature last. Melee weapons and single handed ranged weapons have been my primary focus for a while now.
Looking back, I wasn't expecting rifles to be much more complicated than single handed ranged weapons, but it turns out they are the most complex weapon types to implement. The system I created thus far aims the head, body, rifle and arms at different rates. To facilitate this, the rifles are not attached to the hand, but associated with the position of the shoulder bone. This allows the character to aim the rifle at any target without having to always perform a rotation animation to face its target. It also makes makes aiming seem much more natural.

(this is my initial attempt at creating an aiming system. I think the head and the rifle should move before the body, it's good enough for the demo)
For the prototype / demo, my plan is to have created at least six unique rifles that each use a different energy type. At the moment, I'm working on creating a plasma rifle, blaze rifle , freeze rife, oxidation sprayer (yes robots can get rusted), laser rifle, and energy blaster. Thus far it's taking me about two nights of work to complete a single rifle and its corresponding effects. It's all very tedious work, that I'm sure if I had my own game studio, I'd get a student / peon to complete it.
The marriage of game mechanics and physics.
For ranged weapon attacks, the character's modified attack roll is used to determine the accuracy of each shot. Characters who are very skilled will hit their targets more often, but characters who fail to hit will end up shooting their rifle at random offsets from their target, potentially hitting their own party members and/or explosive objects. The size of the offset will vary depending on the characters attack which takes skill, ability scores, weapon properties, conditions, etc into account. The challenge in this case is to write game mechanics that work well with the physics engine. In other words, let the physics engine do half the work.

(The plasma rifle fires three bolts and the first one hits the gas canister, killing everyone with its blast radius)
For explosions, I had to ensure that the system automatically disabled the character's ragdoll once physical movement stops, and re-position the body / victim to the nearest grid square . Of course, there are a ton of potential problems with this that have to be resolved, but for the demo I don't think it maters much if characters get stuck once and a while.
It's all about blowing shit up.
After testing my game for a while, I have come to the conclusion that I really want to create a game that allows the player to lay waste to the battlefield each turn. This might help differentiate my game, from Games like XCOM, which focus on single tactical shots that either hit or miss. For my game, I want the player to be elated as multiple enemies are killed each turn by a single character, and likewise, I want that player to cower in fear during the AI's turn. In fact, it may be that the word "tactical" isn't appropriate for this turn-based game. Of course, my game isn't using group initiative, it's using individual initiative, which I've noticed makes it feel far less tactical anyway.

(Added line of effect lines to the movement selector)
Optional features
One optional feature I'm considered including is allowing the player to disable / enable the cinematic camera. I've noticed that sometimes it just gets in the way and takes up time.
Another optional feature I might implement is allowing the player to switch between group initiative and individual initiative.
Comments