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.

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.
Leave a Reply