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

80 lines
6.3 KiB
Plaintext

[video output=day025 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Finishing the Win32 Prototyping Layer" vod_platform=youtube id=es-Bou2dIdY annotator=schme annotator=garlandobloom]
[1:47][Plans for today]
[4:20][Getting the actual monitor refresh rate with GetDeviceCaps()]
[10:27][Testing monitor refresh rate getting]
[11:17][Preparing for future multi-threading]
[17:02][Adding mouse debug functionality to our game input]
[23:38][Getting the state of the mouse buttons]
[28:27][Testing mouse button functionality]
[32:07][Making improvements to replay code]
[33:20][It's time to get piggy!]
[35:25][Allocating memory for our replay buffers]
[38:01][Changing Win32BeginRecordingInput to write to memory]
[42:19][Swapping out WriteFile() for CopyMemory()]
[46:02][Testing our new recording technique to much disappointment]
[49:00][Poor man's profiling]
[52:28][Stepping through to find the real culprit]
[53:46][Removing SetFilePointerEx() for a massive speedup]
[55:31][What we were going to do with memory mapped files]
[57:26][Let's try it anyway]
[1:03:13][Pulling out input file processing into WinMain()]
[1:07:25][Step-through and removal of an assertion]
[1:08:55][Debugging the memory mapped file failure]
[1:12:24][A peculiar fix]
[1:13:18][Review of the recording code]
[1:14:32][Splitting the file output into two streams for more speedup]
[1:18:20][Testing with some notion of success]
[1:21:14][What's the memory bandwidth of Casey's machine?]
[1:25:16][Looking at multiple sequential records]
[1:28:16][Removing/disabling some debug code for now]
[1:30:29][Final Thoughts]
[1:31:47][Q&A][:speech]
[1:32:47][Maybe first copy is causing alloc and zero on fault, maybe a second copy would be fast]
[1:35:28][An interesting part of this project is that you're implementing all the compenents yourself that you'd take as given in an existing game engine. That said, do you intend for these components to be reusable in future projects?]
[1:36:32][Why the pig hat?]
[1:36:44][Why don't you use the Visual Studio profiler and anaylze performance?]
[1:37:06][Remark about 300ms being 10 frames, not 3 frames]
[1:37:39][Does it lag if you save to a smaller file size?]
[1:38:59][Isn't the CPU Memory bandwidth only valid for on-die memory?]
[1:40:23][Is the intent of saving the complete game state to support something like a rewind function that Braid allows?]
[1:41:07][Will you do a string pool?]
[1:41:26][When you say the platform non-specific layer, does that mean game code and renderer and logging sorts of things, or is there a sharper distinction between some of those?]
[1:42:15][A quick test on my PC gave me around 3 GB/s...]
[1:43:17][Is it time to split the source into more files?]
[1:43:40][Would a non-caching write be faster for the memory copy? You know the SSE write instructions that bypass the cache?]
[1:45:14][When are the four .hmi files created?]
[1:45:50][...An AMD A8-6400k (Follow-up to 3GB/s memory bandwidth mention)]
[1:47:37][Are you going to do a moblie port? (Android for example) Would the game loop of a mobile game be any different?]
[1:48:51][How about disk write speed and access time?]
[1:49:30][Why is the CPU even involved in a memory copy like this?]
[1:51:01][What was the reason for choosing GetCursorPos() instead of just responding to the WM_MOUSEMOVE message? Is the message pump not fast enough?]
[1:51:25][Have you ever programmed in Java? For how long?]
[1:52:27][(continuation of Why is the CPU even involved question) Wouldn't the copy speed mostly depend on how quickly memory from one part of the memory gets to the CPU and back? In fact, in my mind it seems like large copies are something that could skip the CPU entirely unless it has something to do with paging.]
[1:54:32][Is it worth writing games in Java?]
[1:57:03][Are you in dual-channel write mode on your system?]
[1:57:13][Does the Megabytes have any effect on the performance of the memory?]
[1:57:38][Tom Forsyth comment about modern DMA units not being available to users]
[1:58:39][What do you think of Test Driven Development?]
[1:59:27][Can you explain the bit shifting?]
[2:04:24][You can create a performance heavy application in Java without the garbage collection if you configure it to run as real time instead of virtually]
[2:06:33][Do you consider Visual Basic a programming language?]
[2:07:16][On the memory CPU speed, I see the answer is that the hardware doesn't do this. I guess I'm just envisioning a system where the gigabyte of memory never visits the CPU. I am envisioning a system where the memory can receive an instruction that says locally move a gigabyte over to this location]
[2:08:51][Tom Forsyth comment on using LARGE_INTEGER instead of the bit shifting]
[2:11:00][In your mind, what would be a good way to demonstrate to a potential employer proficiency in the type of engine programming you are teaching?]
[2:12:38][Thanks (And a comment from Casey on the success of the stream)]
[2:13:29][What defines the boundary between a high-level language and a low-level language?]
[2:16:40][When will you start actual game logic?]
[2:16:53][Have you heard of the Rust language?]
[2:17:31][Have you ever dealt with programmer burnout? Or how do you deal with the fact there are days almost no code gets written and on some days massive amounts of code gets written?]
[2:20:28][Any source or book recommendation for understanding the concepts you used better?]
[2:21:09][Have you seen Game Programming Patterns by Robert Nystrom? Are you going to use any design patterns?]
[2:22:31][Do you find it useful to learn many different languages to gain perspective?]
[2:25:11][What do you think about using VCS for one man projects?]
[2:25:53][What's your mindset when looking at a problem that's new? How you approach a new coding problem that you have no pre-defined idea how to solve?]
[2:26:33][Will you write a book after Handmade Hero is done?]
[2:26:46][How long have you been in the industry?]
[2:26:59][I've always been a hobbyist, the more I've learned over the last year, the more I love programming. In your opinion is going back for a four-year CS degree a waste if I want to make things that don't suck?]
[2:27:22][Perhaps the problem with high-level languages is that they are less general, but more domain specific in the first place]
[2:28:05][How does your source code control differ from something like Git or SVN?]
[/video]