Verticality
Improvements in Block Queries: Previously, all block queries revolved around whether the block existed or not. While functional, this approach fell short for implementing more complex functionalities. For instance, what if I want a block to act as a window, existing but obstructing vision despite its transparent appearance? To address this, I decided to introduce queries regarding block traversability, existence, and transparency. Each block now handles these three variables, allowing for more specific queries and greater data flexibility
Implementation of Sloped Blocks: The introduction of sloped blocks posed a real challenge, especially without using colliders. I spent two days tweaking various sections of the movement and block code to simulate movement on diagonal blocks. The process involved defining four vertices along each side of the block (yellow), each with an adjustable variable to change its height. When a player enters a tile with a diagonal block, it seeks the nearest vertex and compares its height with the player's. If the height is greater, the player can pass through that side. Additionally, I defined another list of vertices responsible for adjusting the player's or entity's height upon entering a tile (). Similarly, the player searches for the nearest point and takes its height, allowing for the simulation of ascending movement on the tile.
Challenges and Solutions: Arriving at this solution was one of the most demanding processes of the project. While the solution is quite effective, it required numerous changes in collisions, with moments where the player can get stuck, though these are very situational. Climbing on roofs can also be a bit tricky and unusual, but for now, I'll leave it as is, recognizing that climbing on a roof is not an easy task either. Players can try for themselves how challenging it can be.
Aiming Mechanic: This mechanic has been planned for several blogs ago, drawing inspiration entirely from Zomboid controls, which I believe are the most suitable and intuitive. When you right-click, the player stops rotating around their direction and instead looks toward the mouse position. Their speed in this state is reduced by a third, and the roof remover now points where the mouse points, allowing you to approach a window and aim inside, letting you see inside buildings before entering and enabling better preparation or decision-making on whether it's worth entering.
Conclusion: While these changes may seem minor, the amount of work hours required to implement them pales in comparison to previous deliveries. However, the effort invested in these improvements aligns with my commitment to offering a more immersive and challenging gaming experience.
See next time and thanks for all your support! <3
Files
Get Z-Engine
Z-Engine
Status | Prototype |
Authors | Argendel, [Random Adjective] |
Genre | Survival, Simulation |
Tags | building, Minecraft, Sandbox, Singleplayer, Top down shooter, Voxel, Zombies, zomboid |
More posts
- Graphic StyleJun 08, 2024
- Personal InventoryMay 25, 2024
- Inventory SystemMay 17, 2024
- XRayMay 06, 2024
- FOVMay 02, 2024
- Colliding WallsApr 30, 2024
- MiniaturizationApr 26, 2024
- First ProblemsApr 24, 2024
- World Edit ToolApr 11, 2024
Leave a comment
Log in with itch.io to leave a comment.