Devlog IX
I have been working the past week to get the Event system working & trying to fix pointer / referance issues (there are still a few I haven’t figured out).
But now I have a working event system.
To recap, my project is a custom made rendering engine that focuses on diverse rendering options along with high stylistic control (very high-level explanation).
LayerStack recap
In my previous devlog, I explained the Layer Stack 🥞, a top-down structure for controlling object ownership and main loop execution. Every frame, the layer stack runs the first layer to poll camera movement inputs (temp), and then next layer is ran to render out the frame through the RendererManager.
Events
This is great, but where the layer stack really shines is the event system. Events are reactions to when anything happens, keys being pressed / released, the window resizing, etc. When an event is dispatched, the layerstack stops, loops through each layer running it’s “onEvent” function to let that layer react (ex. the final render needing it’s texture resized). If a layer doesn’t want below layers to react to the event, it can consume it, stopping the event dispatching and continuing execution.
Struggle and Pointer Nonsense
I struggled a ton with the event state not updating correctly, and the camera not giving the right values to render the triangles. It turned out to be objects/classes duplicating, and not being able to update. There is so many debug messages in the terminal 😭
Ends
This was all front-end changes (no change in the render), but now there is a better system put in place (back end changes).
Github repo: https://github.com/pkncoder/Engine/tree/Phase-IV
Landing page / Website: https://pkncoder.github.io/Engine/
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.