cinera_handmade.network/cmuratori/hero/code/code168.hmml

56 lines
3.9 KiB
Plaintext
Raw Permalink Normal View History

[video output=day168 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Rendering Lines of Text" vod_platform=youtube id=jG9qVQ450GA annotator=Miblo annotator=debiatan]
[0:12][Recap and plan for the day]
[2:42][What font information should be included in the asset file? Let's write the usage code first]
[4:35][Always write the code you know how to write first]
[6:06][Approaching the text rendering problem writing the usage code first]
[6:44][Our goal is to display the debug timers on the screen]
[8:44][Implementing OverlayCycleCounters]
[9:56][Assuming we have a render_group and the necessary functions to write strings to it]
[11:57][(Aside) Naming the debug counters the cheesy way]
[14:29][The debug code will take care of the location on the screen of the debug strings]
[16:21][Introducing a separate, globally accessible render_group for debug output]
[18:47][Pros and cons of using a separate render_group type]
[20:16][Implementing DEBUGTextLine]
[24:06][Calling OverlayCycleCounters]
[24:54][Setting up the DEBUGRenderGroup]
[26:17][Allocating memory for the DEBUGRenderGroup]
[27:14][Rendering the DEBUGRenderGroup to the output]
[28:53][Using BeginRender and EndRender to reset the graphics push_buffer_size and avoid recreating render groups]
[31:02][Sanity checks to protect against possible mistakes when calling or failing to call BeginRender and EndRender]
[34:15][Setting up the DEBUGRenderGroup to display bitmaps]
[34:29][Configuring the DEBUGRenderGroup to use an orthographic projection]
[36:03][Testing what we have so far]
[36:51][Drawing a line of letters]
[37:49][Advancing to the next line]
[39:22][Implementing DEBUGReset to bring the text back to the first line]
[41:24][Including lower-case letters in the asset file]
[43:36][We have lower-case letters]
[43:53][Special-casing spaces]
[44:55][Moving the text to the top-left corner]
[46:10][Using pixels as the unit for the DEBUGRenderGroup]
[48:36][We can't use the looped live code editing to change global variables]
[50:53][Resetting AtY to a more appropriate position]
[51:40][Resetting LeftEdge a more appropriate position]
[52:10][Testing what we have so far and preview of coming attractions]
[54:11][Q&A][:speech]
[54:34][@Kelimion][Will you be addressing the subscript, superscript, en-space, em-space and other types of space tomorrow as well?]
[56:33][@BrainCruser][Will you add edges to the font?]
[57:00][@Renroh][What's the difference between making a game in C++ and making a game in Java?]
[59:40][@BrainCruser][Yes outlines]
[1:00:06][@Robrobby][Hi Casey, question on the array you typed and pulled out again: u32 char\[ \]\[ 2 \] <-- Is this an array with pairs of u32's? I would have expected u32\[ \[ \], \[ \] \]]
[1:00:22][Doing arrays in C]
[1:06:27][Reading C declarations]
[1:13:26][@insofaras][Will you implement colored text, and would the color info be embedded in the text itself like Quake used to use ^1 for red?]
[1:14:08][@cubercaleb][Do programmers actually use that crazy array semantics that you just showed off?]
[1:15:05][@insofaras][You didn't answer the bit about how if the color info would be embedded in the text as control codes or not]
[1:16:41][Implement colour code parsing]
[1:20:21][@BrainCruser][In some object oriented languages things can become that complicated]
[1:20:29][@noxy_key][Would printing text to a separate bitmap background be easier than putting it straight on top of the game background?]
[1:20:42][@insofaras][Nice, that was very quick to implement]
[1:20:50][@Vavassor][How about a 2D array of function pointers? Might have been why a few of those variants didn't compile because it thought you were declaring a function pointer array (*Foo)]
[1:21:01][@IxNoxidexI][Around how many more episodes until the switch from software rendering to hardware rendering?]
[1:21:23][@cubercaleb][Can you rotate and transform the text?]
[1:22:57][Implement font scale code parsing]
[1:24:50][Stream has ended][:speech]
[/video]