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

39 lines
3.1 KiB
Plaintext

[video output=day349 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Running Multiple Sim Regions" vod_platform=youtube id=Q3DtXQGTles annotator=Miblo]
[0:14][Recap and set the stage for the day]
[1:42][Run the game and consider the plan for implementing multiple sim regions]
[5:47][handmade_world_mode.cpp: Consider how the UpdateAndRender*() functions are currently operating, and whether or not to split them up]
[11:24][handmade_brain.cpp: Look into why RenderGroup gets passed down to the brain]
[12:45][handmade_brain.cpp: Prevent ExecuteBrain() from setting AlwaysBehind and AlwaysInFrontOf, and run the game to see how the body and head are sorted]
[14:21][handmade_world_mode.cpp: Carve off the rendering code in UpdateAndRenderSimRegion() and determine which of its arguments may be optional]
[21:31][handmade_entity.cpp: Do that same process for UpdateAndRenderEntities()]
[26:10][handmade_world_mode.cpp: Run the game, then toggle off the rendering in UpdateAndRenderWorld()]
[27:05][handmade_brain.cpp: Make ExecuteBrain() only run the controller code if it has an Input]
[30:34][handmade_world_mode.cpp: Make UpdateAndRenderSimRegion() only process the mouse if it has Input]
[32:41][handmade_world_mode.cpp: Make UpdateAndRenderWorld() call UpdateAndRenderSimRegion() twice, run the game and see what happens]
[35:38][handmade_world_mode.cpp: Make UpdateAndRenderWorld() do an UpdateAndRenderSimRegion() on a second region]
[36:58][Run the game and zoom out to see two regions being simulated]
[38:16][Q&A][:speech]
[39:28][@f1aw][Did you make that debug UI yourself?]
[40:12][@nyeecola][Have you thought about refactoring your "brain" code to make use of virtual methods? Switch statements on "type" is basically replicating the type system and is a bit of a code smell]
[44:16][@montify][Do you use keyboard only at your day job? Are you faster without the mouse?]
[44:58][@nxsy][I missed the reason the two areas on the screen are discontinuous. Are these two sim regions of a larger world?]
[45:26][Run the game in -O2 and traverse the world towards the other sim region]
[47:42][@longboolean][What do you think about changing float values in the debug system by the distance you drag? Example: longer drag distance == bigger increments / decrements of the value, shorter drag distance == smaller increment / decrements]
[49:04][@nambitable][Couldn't you use CMake to generate visual studio solutions for windows?]
[50:36][@septumtesseract][What books do you recommend for C programming?]
[51:41][@soysaucethekid][How about for learning OpenGL?[ref
site="Arc Synthesis"
page="Learning Modern 3D Graphics Programming"
url="https://bitbucket.org/alfonse/gltut/wiki/Home"]]
[53:40][Plug Nsight[ref
site="NVIDIA"
page="Nsight"
url="http://www.nvidia.com/object/nsight.html"]][:research]
[55:56][@dandymcgee]["RenderDoc" is a pretty amazing tool, and I've found it to be more compatible than Nsight[ref
site="GitHub"
page="RenderDoc"
url="https://github.com/baldurk/renderdoc"]]
[57:06][Wind it down][:speech]
[58:06][Announcement: A potential change in the format][:speech]
[/video]