Medieval Crafter - Devlog #2 - Implementing Resource Extraction
09/04/2024
Hey everyone,
Welcome back to the second devlog for Medieval Crafter!
Integrating 3D Models: In this update, I've achieved significant milestones by integrating high-quality 3D models obtained from the Unity Asset Store. These models include assets such as gold, rock, wood, and iron to represent the various resources available in the game world. Additionally, I've incorporated 3D models for essential tools like the axe and pickaxe. This integration has notably elevated the visual aesthetics of our game world, providing players with a more immersive experience.
Item Script Development: To effectively manage these resources, I've developed an Item script to be associated with each resource. This script serves as a central hub for defining crucial parameters:
- Item Name: Represents the name of the item.
- Quantity: Indicates the quantity of the item.
- Sprite: Refers to the image used to represent the item in the inventory.
- Tool Name: Specifies the tool associated with the item, used for resource extraction.
- Item Description: Provides a description of the item for player reference.
- Item Health: Represents the current health of the resource.
- Max Health: Denotes the maximum health of the resource.
Resource Interaction Mechanisms: In addition to the Item script, I've implemented a Box Collider component for each resource, configured with the "Is Trigger" function enabled. This collider, slightly larger than the resource itself, plays a vital role in detecting when the player enters the resource zone. Upon entering this zone, players can automatically equip the corresponding tool, facilitating resource harvesting.
Player Script Enhancements: To complement these resource interaction mechanisms, I've updated the player script to include an OnTriggerEnter event and a coroutine for tool movement. Now, when the player collides with a resource and enters its resource zone, the player seamlessly equips the appropriate tool. By clicking the left mouse button, players can then maneuver the tool, enabling efficient resource collection.
Dynamic Guidance System: To enhance player guidance, I've implemented dynamic text prompts that activate when the player is in proximity to a resource. These prompts suggest the appropriate button to use, ensuring a seamless and intuitive gameplay experience for players of all skill levels.
Overall, I'm thrilled with the progress made thus far, and I'm eager to continue refining these mechanics to deliver an engaging and immersive gaming experience.
Stay tuned for more updates in future devlogs!
Thanks for joining me on this journey,
Pierporz
Get Medieval Crafter
Medieval Crafter
More posts
- Devlog #8 - Expanded Content and Day and Night13 days ago
- Medieval Crafter - Devlog #7 - Buyer System18 days ago
- Medieval Crafter - Devlog #6 - Crafting Enhancements and Seller System26 days ago
- Medieval Crafter - Devlog #5 - Crafting System and Sell Items32 days ago
- Medieval Crafter - Devlog #4 - Terrain Integration and Automated Resource Spawni...39 days ago
- Medieval Crafter - Devlog #3 - Inventory System and Resource Collection47 days ago
- Medieval Crafter - Devlog #1 - Foundational Setup59 days ago
- Medieval Crafter - Devlog #0 - Introducing the Vision63 days ago
Leave a comment
Log in with itch.io to leave a comment.