This video features a code review of "The Fall," a game developed by Nef for Ludum Dare 57 using the experimental Hazel game engine, created by the video's host, Cherno. The review highlights the game's core mechanics as a falling leaf collecting light and dodging obstacles, noting its simple controls and lack of in-game instructions. Cherno provides a detailed examination of the project's structure, observing both strengths like the effective use of Hazel's public variables, script components, and prefabs, and areas for improvement such as the absence of a README and the inclusion of unnecessary intermediate files in the repository. He delves into the C# scripting, discussing proper use of Time.DeltaTime for timing and physics interactions, while also pointing out potential performance bottlenecks in the particle system implementation (individual particles as entities with scripts). Overall, Cherno expresses impressiveness with Nef's ability to develop a functional game with limited documentation, showcasing Hazel's current capabilities and future potential as it moves towards a free, stable release.
Exploring "The Fall": A Code Review of a Game Built with the Hazel Engine
0:00 Introduction to the Code Review Series: The video begins with Cherno introducing a special episode of his code review series, focusing on "The Fall," a game created for Ludum Dare 57 using the Hazel game engine.
0:18 Developer's Motivation: Nef, the game's creator, explains his decision to use Hazel, an "experimental underdog engine" developed by Cherno, due to dissatisfaction with other popular game engines.
1:36 Hazel Engine Status: Cherno clarifies that Hazel is his game engine, which will soon be completely free to use. Currently, access to the source code is available through Patreon, allowing users like Nef to get an early start.
2:38 Initial Project Assessment: Cherno critiques the project's repository for lacking a README file (which should include screenshots and build instructions) and containing unnecessary intermediate files that should be ignored by Git.
6:38 Gameplay Overview: The game, "The Fall," involves controlling a falling leaf using A and D keys for horizontal movement and the right mouse button for a "dash." The objective is to collect light (though its exact purpose is initially unclear) and avoid obstacles.
8:06 Lack of Game Instructions: Cherno notes the absence of in-game instructions, requiring him to review the source code to understand controls (like the dash) and game-over conditions (hitting obstacles).
10:12 Game Scene Structure: The game uses two main scenes: "menu" and "main." Cherno examines the main scene, discussing the setup of walls as colliders (without visible meshes) and the player's leaf entity, which utilizes Hazel's physics system.
12:26 Physics and Gameplay Polish: Cherno discusses physics parameters like mass, emphasizing that for arcade games, the "feel" of gameplay is more crucial than realistic simulation, often requiring extensive testing and iteration.
14:03 Scripting and Public Variables: The review delves into the LeafMovement script, demonstrating how Hazel's ScriptComponent allows exposing public variables (like speed, dash speed, duration) for easy modification within the editor, similar to Unity.
18:47 Time-Based Logic: Cherno explains the importance of Time.DeltaTime for implementing time-dependent game logic, such as dash cooldowns, ensuring consistent behavior regardless of frame rate.
26:06 Physics Interactions (Force vs. Velocity): Cherno advises against directly setting an object's linear velocity in physics systems, preferring AddForce (with Impulse or VelocityChange modes) or using built-in max velocity settings for more robust and safer physics interactions.
28:30 Editor-Script Synergy (Empty Entities for Bounds): Cherno praises the use of "empty entities" (e.g., upper bounds, lower bounds) to visually define game regions in the editor, demonstrating an effective synergy between visual design and scripting logic.
31:26 Prefab Instantiation and Particle Systems: The game effectively uses prefabs for dynamic spawning of elements like wind particles. However, Cherno identifies a potential performance issue where each particle is its own entity with a C# script and rigid body, suggesting a more optimized approach using a single particle manager.
37:14 Simple Collision Detection: Light pickup is implemented using a basic distance-based collision detection, checking if the player's point position is within the light's circular radius.
39:00 Game State Management: The GameManager class handles game state transitions, such as removing lights and reloading scenes upon game over or returning to the main menu.
40:34 Conclusion and Future Plans: Cherno expresses satisfaction with Nef's game, commending the use of an early-stage engine despite limited documentation. He reiterates plans to release more extensive documentation and tutorials once Hazel becomes fully free and stable.