pkncoder

pkncoder

1-day streak
—————– Devlog X —————– I’ve been working on refactoring my project for the last few hours. Part of how I code includes: Comments throughout to explain the code, strict formatting throughout, and trying to help the compiler with “const” and “inline” keywords. > 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). ## The process My process of refactoring usually happens once I finish a new addition, however I haven’t been adding new things for a while. Now that I’ve added a new addition to the project (Event system & LayerStack), I want to go through the entire codebase under the src/ directory (not the glsl shaders). ## Project code stats (src/ directory) Running the command line utility “cloc” on my src/ directory to count code stats, I get these counts:
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                           23            646            464             1930
C/C++ Header                  47            506            205             1302
-------------------------------------------------------------------------------
SUM:                          70           1152            669             3232
-------------------------------------------------------------------------------
Not very big yet, although that will be increased once I get to redoing the entire rendering engine.

## *What I have done*
Now, back to my refactoring. I got through the basics: removing warnings, double checking the public/private attribute declarations on classes & structs, setting const on functions & params, setting inline on functions.

## *The checklist*
This is my entire checklist for refactors, this is my first project using it, so it is still being worked on:
### Refactor Checklist (src/)

1. [x] Fix warnings
2. [x] Fix public vs. private
3. [x] Make functions const when needed
4. [x] Make function params const when needed
5. [x] Make functions inline when needed
6. [ ] Fix placement of functions
7. [ ] Refactor step by step in code
8. [ ] Rename things
9. [ ] Add comments
10. [ ] Place the \#includes in the right spots
11. [ ] Fix file tree
12. [ ] Run ./fullTest
13. [ ] Update the obsidian canvas & png
14. [ ] Update the website
Eventually I will also need to make one for the shaders too, as they are sometimes more technical on the code side. ## Conclusion That’s all that I’ve been doing, thanks for reading. Here is my Github repo & landing page for this application: Source Code: github.com/pkncoder/Engine Landing Page: pkncoder.github.io/Engine
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/5645b3eb-64f2-4026-9af1-574a7e968aae-faee28e9-5c19-4203-8423-3410fc4df11e.png
github emojigoose-honk-technologist emojisummer-of-making emojic emoji
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). 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. 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. 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 😭 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: github.com/pkncoder/Engine/tree/Phase-IV Landing page / Website: <https://g|https://>pkncoder.github.io/Engine
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/4408dff0-2a61-46b3-8978-096dd953bf44-phase-iv-architecture.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/34cb6304-73a4-4b5d-918b-7313f1749ff4-767d320b-2725-42c9-a3ce-8f8e779333a0.png
react emojisummer-of-making emojigithub emojidino-debugging emoji
Tempname: Engine update. I am so tired To keep it all contained, since the last devlog I have: - Merged Phase-III into main & created a Phase-IV branch - Changed the landing page's color palette - Modified the target architecture 4 times (3 committed) - Created a rudimentary SceneManager class - Implemented an EngineContext class to distribute ownership & to help with data flow+containment - Implemented a layer system to help cut down on application & to contain/host the events system. - Finally put in the system directory (folder) in the architecture that will host any simulations, computations, and animations. Currently it is the planned details for the camera system. The biggest thing that I have done so far is the layer system & state/context creation. The layer system is like a regenerating stack of pancakes 🥞. Before you cast your pancake regeneration spell we all have, you have to prep the pancakes with butter and syrup. Each time you finish the pancakes, a new round starts and you eat them again. Then, once you are done, you have to disable the regeneration spell. The layer system acts the same, but computationally & layers instead of pancakes. Each layer goes through the lifecycle of onAttach -> onUpdate -> onDetach. By far the biggest reason for the layer system is the event system, but I'll leave that for the next devlog. Here is the github page: github.com/pkncoder/Engine/tree/Phase-IV Here is the landing page: pkncoder.github.io/Engine I still have soooo much to do, especially with & after the event system. I've completed most of the easy stuff for Phase-IV. Here is the current architecture & a site screenshot.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/c7a9c39f-098d-40a1-95a5-97865920540d-screenshot_2026-07-06_at_3.45.52___am.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/fe291ef4-4711-43d0-9a95-e43403627dcd-phase-iv-architecture.png
summer-of-making emojigithub emoji
Changed my mind on shipping, however I do now have a landing page! I still have to do things like changing the color palette (it's alright now, but I want something different I think), adding little details to really sell the "Rendering" aspect of this, etc. etc. Here's the landing page, please check it out & give any feedback! pkncoder.github.io/Engine/index.html Since I changed my mind on shipping, here are those images that I was going to use!
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/65cda477-d6b7-44c7-bbdf-3b08408cb22c-sponza-1.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/4fd36b24-285c-4242-b02b-ed1d7b9f6b3e-queerroom-1.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/f865ca65-8ba5-4123-aa91-18b7e1f2db70-backrooms-2.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/01723a02-a0d8-4b43-9974-9d58febdef5c-lost_empire-1.png
rac_woah emojithinking emojisummer-of-making emojithis emoji
Just got done with some renders on the engine, been working all day on implementing the things needed. Along with the images, I added: Shadow Mapping for the Rasterizer (only 1 emitter) Tone mapping to the Rasterizer Fog to the Rasterizer A vignette effect to the Rasterizer Transparency maps to the Rasterizer Settings & presets for the renders * A new "Queer Room" modeled by me in blender for the Path Tracer (going to post it on ship). I honestly have had so much fun with this. Currently working on a landing page to go in place of my "Online Demo" on stardance (since this isn't that kind of application D: ). Here's the github: github.com/pkncoder/Engine/tree/Phase-III! At some point I'll be redoing the README as well for more info. Also, these images aren't even the best ones, I'll leave that for the ship :3
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/7c35d259-e1d7-4bb4-aa0a-e955623898b7-breakfastroom-1.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/ab75b4f1-0bea-44dc-bb06-b1db2c1a2129-sponza-2.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/3aa06f80-bb9f-4337-827e-4a1a25f94c6d-backrooms-1.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/965781c4-c8bd-476e-92fc-25d6e11f6bf4-sponza-3.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/1552baa1-b8a2-43a1-b5d8-52c0dec2b588-lost_empire-2.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/98bce55c-4305-4299-ab5d-88269d1aa2b8-ca97a3b1-1446-4243-afe0-65af2b6e075d.png
summer-of-making emoji🚢github emojiblender emoji
I forgot about acceleration structures, so I planned that out as well in the renderer. Currently just: • BVH (Bounding Volume Heirarchy) for Ray & Path Tracing • SVO (Sparse Voxel Octree) for Ray Marching (Hypothetically) These acceleration structures make rendering methods like Ray & Path Tracing, Ray Marching, Ray Casting, etc. feasible for real-time by "cutting out" data (objects) similar to how a Binary Tree works.
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/804124bf-611d-44b5-bd04-cc0fc1d3c6e7-image.png
summer-of-making emoji
I have finished getting albedo (basic color) textures loading. To get this working I had to redo how meshes were loaded completely, but I finally finished that. The biggest problems I had was getting the backrooms model to render correctly, as the previous models I had, all of the textures were in a "baked" form, which my renderer does not support. Finally I found a free non-baked one that was really good, but there was just a few issues with normals, and after I fixed that in blender shading issues showed up, and then UV issues. However the model is mostly fixed now! If you would like to try for yourself, the github repo is here: github.com/pkncoder/Engine/tree/Phase-III. The repo is large currently, as I still need to compress the files, or remove them (gitignore). The Path Tracer is currently disabled, as I need to swap the textures to handles, and then modify the PathTracer to work with the textures. It will look really good once I get that working though!
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/b9b90025-2b78-4c46-8c6e-2e3d467eb942-2026-06-19_00-40-47.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/2ac6febc-5c7e-4dcb-9797-ccea8a75d6cb-2026-06-19_00-39-43.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/a85c63fb-8eae-48e9-bbb2-2d61bd6c8d73-2026-06-19_01-34-41.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/335739ae-ed62-4ffb-b894-14fce751e4e4-2026-06-19_00-58-06.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/d4e730de-fde0-43a5-953d-633bfb682a1b-2026-06-19_01-29-43.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/a7c1743f-1934-4588-9823-a6fe10028752-daae3570-97cb-4e72-a9fd-b1b64754bded.png
upvote emojispring-of-making emojigithub emojiblender emoji
Here's that diagram for how the program currently interacts with itself. • Anything purple (besides the background) is a temporary connection/file. • Anything green needs re-worked • The "Services" group contains files that are completely static in use, and are accessible globally. It's still a bit messy, but that's partly due to the temporary/need re-worked files. There's a still some spaghetti code due to that. The shader files I do look a lot like spaghetti as well, but that is mostly do to positioning. It's pretty basic, as the ui/ and system/ dirs aren't in there either (system/ is simulations + any computations that would need to be done (ex. translating data for one renderer to another)).
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/820b9678-01f9-43e9-bbaf-c6580551eb5a-archetecture.png
spring-of-making emojigoose-honk-technologist emojiyay emoji
I'm working on my Engine project. Just redid most of the data management in the PathTracer renderer. I'm almost done with this development phase, so that's fun. Tempname: Engine (yes that's the name) is a custom-built 3d engine that will support rendering complex scenes not only in a very stylized manner, but with a suite of techniques not normally seen. The renders not only will be high-quality and efficient, but will also have the ability for basic animations (no keyframes, but a simple system of startpos-endpos or along a drawn curve w/ velocity controlled by a graph). I like to think of those GIFs of scenes that have simple things like grass blowing, or a flag blowing in the wind. There's so much more to this that is way to much to fit into a small explanation, but there is more information at the github page: github.com/pkncoder/Engine/tree/Phase-III (ignore the main branch). Here's some random images from it (no textures yet, that should be soon. Then the backrooms really will feel like the backrooms):
https://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/18d6b4dc-6fdb-4e18-ae61-825b56e9a554-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/62a8d8e3-78cf-49ea-9e73-39dd81ad83d4-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/c4a692a5-bee0-4b67-89a7-db40611e299e-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/11172f28-b77c-4092-931c-2e5c1df02da3-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/6f5e6969-9163-41ef-8105-39ca8d969225-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/1c73d300-0946-46cc-8920-dbae6a423c05-image.pnghttps://scrapbook-into-the-redwoods.s3.us-east-1.amazonaws.com/8023a6a9-119b-431f-8312-e8a7b5b2c51a-f2a12937-b43d-4ad2-becc-80b3489d175e.png
spring-of-making emoji📈thinking emoji