Devlog 3: Derrick Domena-Guzman: Data Oriented Building Menu, Showing Building Preview, and Animations
Problem:
This week, I focused on implementing a data-oriented building menu, adding a build preview feature, and introducing player animations. These improvements enhance the player's interaction with the building system and add more visual feedback to the game world.
Data-Oriented Building Menu
Previously, the game lacked an intuitive way to select and place buildings. To address this, I created a UI build menu that dynamically generates buttons based on available building options in a data table.
Here’s how I tackled it:
Dynamic Button Creation: Instead of manually placing buttons, I generate them dynamically based on a templated custom button using the building data table. Each button displays an image of the corresponding building, making selection more intuitive. This button is a custom button with a texture for the image.
Efficient UI Structure: Buttons are divided between two containers, with the first two buildings appearing at the top and the rest in a scrollable wrap container. This ensures a clean and organized interface.
Event Handling: Clicking a button updates the selected building index and removes the build menu, allowing the player to focus on placement.
Custom Button with Texture:
Initial Build Menu:
Updated Build Menu:
Data Table:
Populate Build Menu Function:
Toggle Building & Create Build Menu Functions:
Building Preview System
To provide better feedback when placing buildings, I implemented a build preview system that shows a ghosted version of the selected building before placement.
Here’s what I did:
Line Trace for Placement: A line trace from the camera determines where the preview should appear, ensuring precise placement on valid surfaces.
Dynamic Mesh Assignment: When a building is selected, its corresponding static mesh is set for the preview. This prevents unnecessary updates and improves performance.
Visual Feedback: The preview mesh changes color based on whether placement is allowed, with green indicating a valid spot and red indicating an invalid one.
Create Array of Buildings from Build Data Table:
Preview Build Function:
Video of Build Menu & Build Preview:
Player Animations
In addition to the build system improvements, I also worked on animations for the player character to enhance realism and engagement.
Idle and Walk Animations: Implemented smooth transitions between idle and walking states, providing a more natural movement flow.
Integration with Player Movement: The animations sync with the player’s movement speed and direction to ensure accurate representation.
Foundation for Future Animations: This setup serves as a base for future animations, such as interacting with objects and combat actions.
Video of Player Animations (Sorry for jump scare):
Next Steps:
Moving forward, I plan to refine the building system by introducing rotation options for placement and expanding the animation set for additional player interactions.
Thank you for reading!
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 Drake Curry: Breakables v2, Navmesh, Enemy AI9 hours ago
- Devlog 3: Jazmine Chargualaf: Reworking Item Colliders & Setting Up a Sound Syst...11 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.