Posted April 26, 2020 by E R Barratt
#Alpha
So,
Here's a tiny first look at REAPER: Citadel of the Damned. It doesn't look like much at the min, but let me explain what's been achieved thus far:
https://www.dropbox.com/s/y2vcc83yn2t4tw3/VoidReaper0.01.zip?dl=0
The first thing I wanted to implement was a re-code of a pseudo physics system I built for a JavaScript game engine called Phaser - in Unity (and C#).
I've been coding with C-style languages as far back as I've been coding, so the conversion from JS to C# wasn't too difficult. The main challenge was to move my mind from a "All Controlling" script that would run through everything itself every frame, to a component based logic. This is actually far better, as it allows for way more granular control over what collides with what etc.
I will write up a more detailed explanation of PointLine soon, but for now, briefly:
PointLine, as the name suggests, is a pseudo collision detection and dynamic object movement system based on Points (Players, movable objects, creatures, enemies etc) moving around on Lines (ground, slopes, walls, ropes, ladders etc). It makes heavy use of the line equation Y = MX + B so figure out where things should be.
Tied into Unity's FixedUpdate system at 60 samples per second, I've tried to make it logically as performant as possible. Simple rules to help achieve this are:
The character controller was also heavily ripped from an earlier JavaScript project, and adapted for use in Unity. You can:
The players weapon and torso (and that of many enemies) rotate independently of the legs, so you can run and shoot in any direction. When not shooting, the torso snaps back to level.
Animation logic and controllers have been created for the player and some enemies. I'm trying to create all the art myself - an artist I am not, but I'm just about capable of making some pixel art. Animations correctly reverse if you're facing one way and moving another.
One fun animation was the "Chunking" of dead enemies using the PointLine physics system. Very satisfying.
So far three weapons have been implemented:
They feel good so far! I'd love some feedback on the projectile speeds and frequency...
I've really enjoyed figuring out how to implement enemy AI so they don't just do the standard "Patrol Area, shooting at guy" actions. Currently enemies will:
A lot of the usual mechanics gumf has also been implemented. This includes:
Next is more of the same! Specifically I'll be working on: