Devlog 3 Drake Curry: Breakables v2, Navmesh, Enemy AI
Problem:
This sprint i was tasked with refining our game system for object breaking to give various breakability to object. I also created our levels Navmesh and started working on our Hostile enemies.
Object Breakability
To start off, I knew i needed to start in player.cpp, where the breaking logic is. I started off by figuring out how i was going to differentiate between objects of the same foliage class. I did this by creating an enum in my base foliage class and giving the class a variable to set this enum.
I realized i would need to create a separate class for each object that had breakability, to be able to assign different breakability depending on the object i needed to say if its a certain object (tree) set the current amount of hits to one number, if it was say a rock, set to another. This allows us to add classes simply by updating a few variables. I also created an Associated Pickup Class variable that i pass the created foliage classes into for each object.
I then updated the player.cpp code to drop a pickup depending on the associated pickup class given, instead of just looking for the foliage class. Now, after creating an object and a foliage class, we simply add it to the Enum, and update the hit code in player.cpp, and the object is created and we can set variables in the blueprint and paint away.
Navmesh
I thought the navmesh would be a simple task but it was a tad bit more difficult due to the landscape we have setup. I started by creating a nav mesh object and placing it in the world. It generated a nav mesh that was patchy and unusable. I went through and smoothed the landscape out which fixed most of the nav mesh issues with it being gone where it shouldn't. On to it BEING where it shouldn't. Our mountains and down in the water had nav mesh. i tried a few things before discovering nav mesh modifiers. These allow me to block navmesh from being in certain places. i placed 2 of them above and below the water so the navmesh generated properly.
Wolves & AI
On to my most anticipated part. AI. We as a team purchased a pack of wild animals, complete with AI. This indeed wasnt good enough for us as it was all done in blueprint. So I got to work recreating the BTTasks that the wolf AI utilized in C++. These included DoAttack, GetNewLocation, UpdateMovement, UpdatePhase, and Reorient. I started by following along with the blueprint. trying to recreate the same functionality. I struggled a bit with Reorient as it was my first attempt. After some head scratching i came up with what seemed to be a 1-1 of the blueprint material. I assigned the tasks in behavior tree next. I then created the creature interface (enemy interface)
I Then created the wolf blueprint, C++ Class, animationBP, and the blend space. I started with the blend space and animation. I spent some time fiddling with different animations and finally got what the pack had in blueprint but recreated. I then assigned the animationBP, AI Controller (created by derrick), and the mesh to the wolf and placed him in the level. I unfortunately ran out of time this sprint to get it completely working. It is having an issue inside of the update movement that we have not figured out.
Next Steps:
Moving forward i plan to do lots of work with the AI, the Level, and the Building System.
Thank you for taking the time to read this!
Get Echoes of Creation
Echoes of Creation
Status | In development |
Author | FrogBoots |
Genre | Survival |
Tags | Crafting, First-Person, Singleplayer |
More posts
- Devlog3- Vivianne Zsoldos-- Player UI (PauseMenu, InventoryUI)5 hours ago
- Devlog 3: Jazmine Chargualaf: Reworking Item Colliders & Setting Up a Sound Syst...11 hours ago
- Devlog 3: Derrick Domena-Guzman: Data Oriented Building Menu, Showing Building P...16 hours ago
- Devlog 2: Jazmine Chargualaf: Weapons, Tools, and Crafting System6 days ago
- Devlog 2 ~ Drake Curry: Level v2.0 and Learning Pains6 days ago
- Devlog2- Vivianne Zsoldos -- InventoryUI (Started)6 days ago
- Devlog 2: Derrick Domena-Guzman: Improved crouching, and functional stamina bar6 days ago
- Devlog 1 Drake Curry: Level Design, Breakables, Pickups13 days ago
- Devlog1- Vivianne Zsoldos-- Player UI (Main Menu, Player Stats)13 days ago
Leave a comment
Log in with itch.io to leave a comment.