Category: Progress

  • Recoil Patterns and Networked Transformations

    This week has been a good week of progress.

    I want the guns in Morbus to feel good, much better than the original, so I made a system that recoils guns in a deterministic manner.

    I can adjust the horizontal and vertical pattern visually in the editor. They are two separate curves, with the X-axis being time and the Y axis being displacement. For horizontal recoil, y=0.5 means no movement, and for vertical y=0 means no movement.

    I think it would be cool to make the editor experience even better, combine them into a single editor and then view a singular curve. But that would require more work, and I don’t think the pay off would be worth it.

    What this all means in practice is that every time you fire a gun, the bullets are going to roughly land in the same place each time. This way you can better learn guns and their individual recoil patterns.

    There is still randomized spread, which is somewhat deterministic as well, so even if you can move your mouse to cancel out the recoil, the shots won’t always be centered.

    Two full magazines fired into the wall, the pattern is almost identical

    Brood Alien Transformation

    A Brood Alien transforming into their “true” alien form is critical to Morbus (duh) and so it’s of course one of the first things I’ve been working on.

    I’m using a “pawn” system for Morbus, where each “actor” in the game is “pawn” and players (or “clients”) can “possess” a pawn which in simple terms means they are controlling it.

    A Brood Alien player is going to have a human pawn since they need to be able to disguise themselves as a human. When they transform though I didn’t want to make a bunch of modifications to this “human” to make it into a “brood alien.”

    Instead what I do is I spawn a new “Brood Alien” pawn and have the Brood Alien player possess this pawn. The human pawn which the Brood Alien player was previously possessing is disabled (hidden).

    It was a bit tricky to get this working at first. I ran into problems with synchronizing camera positions from the human pawn to the brood alien pawn, and then back. It was a bit of a headache and it made me really think through the networking of pawns and who is responsible for what.

    It also exposed some things core to S&Box and it’s networking which i’m not the biggest fan of. The main thing being is there is no (simple) way of doing server authoritative networking code. Everything is made in a sort of “peer 2 peer” way, and you could have the “host” be a dedicated server, but it’s still expecting to receive transform (position, rotation, etc.) updates from clients. And what’s further annoying is that the host can’t override or force this transform.

    Or perhaps i’m missing something… but I don’t think I am.

    This seems really silly to me, and I know that cheaters are going to exploit this. But i’m going to leave that as a problem to solve another day and just focus on the happy path for now.

    Anyways, I got it all working, and as a part of everything i’ve been building, I immediately test it out in multiplayer.

    What’s Next

    Now that we can transform into alien form, and shoot some bullets at things, it’s time to build a simple game loop.

    We’re going to create the “Round System” to track rounds and when we should end a round and start a new one. This will let us test the core game loop and make sure networking is figured out for that.

  • Melee Combos

    In the original Morbus melee attacks were kinda boring.

    You would just hold down left click and you would keep doing the same attack over and over again.

    I thought it would be cooler if there was variation between attacks, thus I decided to make a “simple” combo system for melee attacks.

    How it works

    A “Melee Weapon” is a prefab in the game engine.

    The prefab has a component called “Melee Weapon” on it which defines the view model and some basic stuff about a weapon.

    It also has three properties “Primary” “Secondary” “Special” attack. These are opener attacks, and the user hits the primary, secondary, or special attack hotkey then the opener is triggered.

    Each of these attack properties must point to a “Melee Attack” component which contains data about what animation to play, the attack duration, hit windows, etc. These components also have a set of three “combo” properties for primary/secondary/special attacks.

    If a player is not doing any attack, then hits the “primary” attack button we trigger the primary attack opener. If then they shortly hit the “primary” attack button again, instead of doing another opener, we see if there is a “primary” combo, if so then we do that combo.

    Here’s how it looks in the editor right now:

    What’s something I don’t really like about how this looks in editor is each attack component just says “Melee Attack” so it could get really easy to mix attacks up. I might try to find a solution to this.

    How it’s looking in game

    I’ve been only working on this for a day so you can’t judge me too hard on the graphical fidelity. I sculpted, textured, and animated the arms myself. These are placeholders for now, but I wanted something that could be used in testing.

  • To make a brood or not

    One of the first things i’m working on with Morbus is implementing the player pawn / controller system.

    What components represent a controllable actor in the scene, how do we handle logic to control this pawn, etc.

    A great test to see if the system works would be to build the human -> brood sequence. In my mind a player who is a brood alien would be interacting with two separate pawns, a human pawn, and a brood alien pawn. When they transform from human to brood their human pawn will be replaced with a brood alien pawn.

    Then when they transform back the pawns are swapped again.

    Where the human/brood alien pawn goes when they are transformed, not sure yet, but that’s the thought process so far.

    Brood Alien Model

    I didn’t want to use the human model for the brood alien so I was messing around with Blender and sculpting the human model to try and make it look gross and alien. Thing is i’m really bad at sculpting and I don’t really know what i’m doing.

    I watched a couple videos and I did figure out a few more sculpting techniques though, and then I learned how to texture paint which I used to paint some gross organic textures.

    I discovered morph targets and thought it could be interesting to explore having the skin pulse and writhe.

    In the end I created this model, it’s temporary and i’m not going to mess around with it further. It’s good enough for the moment. I’ve already reached out to the person who did the monsters in Shoothouse to work on a more permanent Brood Alien model.