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

54 lines
4.2 KiB
Plaintext

[video output=day024 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Win32 Platform Layer Cleanup" vod_platform=youtube id=nBBTPRO8AMI annotator=garlandobloom annotator=theinternetftw]
[1:05][Goals for the day]
[2:50][Fixing a dumb audio bug]
[8:18][Failing to find a supposed SUCCEEDED related bug]
[9:48][Concerns about WasDown/IsDown]
[12:25][Fixing a bug in our gamepad input handling]
[14:37][Fun? with Krita]
[16:47][Back to Paint to illustrate the input bugfix]
[20:57][Changing our renderbuffer to have fixed dimensions]
[23:39][Improving the build.bat file]
[25:00][Changing the write location for our .hmi files]
[27:37][Writing some helper functions to create the dll path]
[33:51][Step-through]
[36:12][Taking our helper functions and using them elsewhere]
[40:23][Testing the changes to input recording]
[41:22][Input Assert firing and turning off Topmost window]
[42:45][Changing Win32GetLastWriteTime() to use GetFileAttributesEx()]
[46:02][Using DeviceIoControl to potentially speed up input recording hitch]
[51:06][Removing stub functions from handmade.h for easier porting]
[53:50][Looking at improvments to our 1GB VirtualAlloc()]
[55:12][Whiteboard illustration of virtual memory]
[59:00][Looking at real world virtual memory addresses]
[1:01:39][Translation of virtual memory addresses into physical memory by the TLB]
[1:04:06][So what are large pages?]
[1:05:26][Changing VirtualAlloc() to use large pages]
[1:07:18][Putting aside the large page support for later]
[1:08:26][Q&A][:speech]
[1:09:50][Can we go over really fast an overview of the game recording code?]
[1:14:16][When you're saving the game_state snapshot, how big is the file?]
[1:15:25][Can you check if the StringLength() needs a win32 prefix, or is this game code?]
[1:15:37][How many lines of code is the finished game estimated to be?]
[1:16:02][Maybe use two randoms in your batch file to get a more unique file name?]
[1:16:20][Any advice on where I could go or what to do to pick up a bit more coding or knowledge experience?]
[1:17:05][What is a good example of well-written game code? Everyone talks about the DOOM source code.]
[1:17:29][Assuming you want to record exactly what happens in the game, how would the looping handle random values; Say enemy bullets that are fired at random angles?]
[1:18:23][If we dump memory to disk in a large-scale application, wouldn't that cause more than a 1GB footprint for every state?]
[1:19:34][I don't get the stuff where you declare a variable without initializing it, and then you use the address to it in a function call. Is that a dummy thing, or what is it used for?]
[1:21:49][You can make the recording instantaneous using copy-on-write pages.]
[1:22:58][Would the sparse file flags dropped the .hmi file size?]
[1:23:29][I'm still not sure why we're using the Windows API to get memory instead of the standard library. Why are we making Windows calls if we are supposed to be doing everything from scratch?]
[1:24:49][As the game grows, how are you going to partition the game memory between systems to keep the record-and-playback feature working?]
[1:25:20][Would it make sense to temporary lessen the size of game memory we don't use at the moment anyway?]
[1:25:54][Are you happy with the timing FPS results? I found an old article on _rdtsc() for more accurate timing.]
[1:27:01][When would the Mac code start? I am following with Windows in a VM and it's really slow.]
[1:27:46][Is there any negative effects of making the page size bigger?]
[1:29:47][How do you calculate the size of a struct?]
[1:31:38][Can you add line numbers, so those of us following along have an easier time?]
[1:33:50][I believe some people think that the game_state is saved every time with the input, whereas it is only saved at the beginning of the recording and then modified through input playback.]
[1:34:21][Do you think the recording technique will run into problems if we have multiple threads using the game_state?]
[1:35:07][If VirtualAlloc() does not guarantee contiguous memory, could this pose a hindrance to cache optimizations?]
[1:36:45][Where can I get earlier versions of the code? The link only gives me the latest version.]
[1:37:15][Wrap-up][:speech]
[/video]