f0ssel

Glider, Moon Phases, and A First Look at the Combat System

3 min read #gamedev

Screenshot 2015-08-30 21.03.09

Enemy AI

What you see above is a cute little Slime. It wanders, it stays on the ground and doesn’t fly away, and it (tries) to avoid running into trees. If you get too close, it comes after you, but don’t worry it doesn’t do damage (yet). Instead it tries to get so close to the center of your hitbox if you position yourself correctly it’ll dance on your head.

Screenshot 2015-08-30 21.03.25

The slime has a very basic AI and is the starting point of my mob system. They are inactive unless within a certain range. I may consider turning them off completely if I can find a way to do so without messing with the behavior. They have 100 health and 1 arrow shot does 25 damage, and as they lose health they change color from a nice see-thru green to a see-thru yellow and see-thru red. Eventually when it’s health drops below zero it destroys itself. But how do you do damage to it???…

Screenshot 2015-08-30 21.05.03

Arrows

I modeled an arrow prefab and worked up a system for shooting it out from in front of the player to a target that is raycasted from the center of the camera view (it sorta matches up). They do damage to Slimes. They fly nicely through the air and are rigidbodies so they are affected by gravity and take time to reach their target. This means you have to lead your shots based on distance and enemy movement. There is also no crosshair. Good luck!

Screenshot 2015-08-30 21.06.00

Glider

I wrote up a Glider system that works very similarly and is inspired in almost every regard from the glider in Cubeworld. It makes traveling quicker and gives great views. It works like this:

  • Having the glider out makes you fall slower
  • While in the air with the glider you travel faster
  • “rigging” the glider (Space Bar) uses stamina* but lets you travel farther
  • While rigging, your y-direction velocity is frozen and it’s ceiling is zero. This means if you time your rigging correctly with your jump you can have virtually zero falling velocity until you run out of stamina*

*Stamina is not in yet. You can rig forever at the moment

Screenshot 2015-08-30 21.06.24

Clouds

Clouds are in! Volumetric and very in size, rotation, and density of cloud clusters. I’m STILL working on fog, but once I have a good solution they will be noticeably in the distance and not such a clear view like they are now.

Screenshot 2015-08-30 21.08.49

Moon and Moon Accessories (Phasing)

The moon is in, and it rotated around just like the sun does. It has it’s own special light that only shines on it, and that light rotates a little bit every day, and gives the moon phases, just like in real life! When full, the moon will brighten up the night sky with a foggy glow, and will illuminate a dim bluish-white light. As it changes phases the fog will dim along with the ambient light. Right now there are 12 days between full moons. Two pictures below contrast a full moon and a half moon.

Screenshot 2015-08-30 21.09.35 Screenshot 2015-08-30 21.11.52

Got a lot done this week, and seems I’ve got a little bump in viewers of this blog so that’s awesome. I hope you guys like what I’m putting out. I’ve become a little more ambitious in my development goals as I’ve talked to people about it, so I’ll be trying my best to keep moving with new content.