October 16th Devlog - Dean


https://1drv.ms/v/c/a4e37aa672f4c423/IQRKlD6j7dT8TaNFVzCp-nMUARko3Ii4Fae2KbNFCGi... - (Character and enemy demo)

https://1drv.ms/v/c/a4e37aa672f4c423/IQSbADLbWMr5QKP5Bb0HqXE_AS-ojjEdb0XaAJ46yCR... - (Console log footage)

It's about time y'all heard from me. In case you haven't read my bio, I'm the AI programmer for Silver Bullet. So far I've completed these things:

- Character controller

- Attack functionality

-Basic enemy behavior

I won't go too much into detail on the character controller since it's fairly simple. Just press A or D on the keyboard to move left or right, and press SPACE to jump. 

Attack functionality is a little different. In the demo footage showing the character and enemy AI functioning together, you'll notice the white circle with a cross. That's a Physics2D overlap circle that detects any collisions that overlap in its area and logs them in the console (see video above). It's effectively our main character's hitbox. It's just hanging out in front of placeholder player character (the green square) for right now, but later on, it'll be attached to an animation to give it a proper attack feel.  

The enemy behavior is self-explanatory. Do nothing until the player gets within a certain distance and when they do, chase them down. I initially tried to implement a fancy solution that would draw a raycast in the player's direction and have the enemy chase the player only when the ray detects the player's collider, but the result was the ray drawing to a certain point just before the player's actual position and just stopping once it reached that specific point. There are other methods of distance checking that I could've done besides my current solution, but frankly, I hate math. So what did I do instead? Rely on good ol' box colliders. The placeholder enemy (red square) has an empty game object with a box collider that acts as a trigger. When a game object with a player tag enters, the enemy knows to chase it. 

You might be wondering why the characters suddenly disappear in the demo footage. That's just me testing player and enemy health as part of my next milestone to implement combat. Now that I know player and enemy health is functioning, I can tie that functionality to the existing player and enemy colliders. 

That's it from me for now. Catch you guys later.

Leave a comment

Log in with itch.io to leave a comment.