is presently its sole maintainer,
You can support him:
We will replace the C standard library functions at some point
Let's display the debug information in a more useful way
Moving the debug code into handmade_debug.cpp
Graphing the values of timers
Displaying also the counters that have not been updated in the last frame
We will pick the maximum value of a timer over a period of time and use it to scale its plot
Drawing a rectangle for each counter
Plotting the rectangles next to the text, aligned to its baseline
Using the ascender height of the text as the chart height
The debug display code needs simpler access to font information
Using the relative value of the timer with respect to its maximum value to modulate the color of the rectangle
Testing the code so far. Our heartbeat graph doesn't line up with the text
Centering the timer plots with respect to the text
The automatic change of scale of the timer plots is not perfect, but there's no immediate way to solve it
Adjusting the plot sizes
Some of the performance counters are never hit and they show as "null". We won't be drawing those
We will save the platform layer debug_frame_end_info timings also as snapshots and we will display them as a stacked graph
Moving the DEBUGGameFrameEnd function to handmade_debug.cpp
Capturing debug_frame_end_info snapshots
The order of the debug_frame_end_info fields is specific to the platform layer and it shouldn't be
Transforming the individual debug_frame_end_info counters into an array of self-describing debug_frame_timestamps
Now we can iterate over all platform timestamps and plot them as a set of stacked bars
Using the inverse of our framerate (33 ms) as chart height
Testing the stacked bar chart. It's not positioned correctly
The plot seems to be overshooting 33 ms. Let's draw a reference line to check that
Yes, we're missing the target framerate
Color-coding the stacked rectangles to tell them apart more easily
Testing the color-coded rectangles. The plot doesn't look right
We never bothered to stack the rectangles!
It works now and the majority of the time is spent inside the GameUpdateAndRender function
BrainCruser Q: Doesn't the multi-core rendering screw up your timing?
ifingerbangedurcat Q: Can you briefly explain how it tracks how long it takes the frame to work and the render engine to work if rendering the debug is part of that work? Also a suggestion, use a key to toggle the debug display to see the game
garlandobloom Q: Did you get 4coder set up?
ciutchism Q: Do you ever think it's amazing how 100s of designers can screw up a project by trying to be complex when indie designers can make a better game in a few months?
griggs3d07 Q: You mentioned that the way you draw rects is not optimized. What do you want to change?
Stephenlast Q: Because you're using rendering on multiple threads, is it saying that you're spending more cycles in DrawRectangle / DrawRectangleQuickly than GameUpdateAndRender?
Mojobojo Q: Why are you echoing to lock.tmp in your bat file?
jfcatalan Q: So after "lib freedom week" we could reasonably easily boot HH off something like baremetalOS and go all "look 'ma no OS" (minus sound I guess)?
inquarry Q: Will HH be optimized for GPUs or are you sticking to CPU render? Will that be an arduous task or pretty straight forward?
ciutchism Q: If I have a simple app concept that I can't code myself because I'm a scrub, is there any good way to get somebody to make an app for me that is somewhat simplistic and we split profits or even I just get 10%? I don't care about the profits I just want to help develop the app
SeargeDP Q: Why are you not using visual studio to write your code? It seems to be a windows machine you are working on
Close outta here
Announcement: GitHub private repository now available for those who preorder the source