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

50 lines
4.3 KiB
Plaintext

[video output=day154 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Finding Assets Files with Win32" vod_platform=youtube id=vrZkMo77BI8 annotator=ZedZull annotator=debiatan]
[00:00:23][Recap and plan for today]
[00:02:39][Review of related code]
[00:04:03][Getting rid of hardcoded file names]
[00:05:22][Listing file names on Windows (FindFirstFile)]
[00:08:55][The lpFileName parameter can include wildcards]
[00:10:54][Listing the rest of the files (FindNextFile)]
[00:12:21][Guarding against invalid handle values]
[00:13:48][Invoking FindClose on the file handle returned by FindFirstFile]
[00:15:10][Structuring the file loop to be more uniform]
[00:16:30][(aside) Textbook horrible API design]
[00:19:29][Problem: we don't know how many files there are until we have looped over them]
[00:20:33][Revising the file API. There's no need for random access of files. Sequential access is enough and is cleaner to implement]
[00:21:28][Preiterating the files]
[00:22:31][Allocating space for the win32 opaque data segment of the platform_file_group struct]
[00:23:32][Discussion on extensible platform non-specific types. This type of "space saving for dynamic unions" can be implemented using C++ inheritance, but we will encounter other types that can't]
[00:26:31][Freeing the platform_file_group]
[00:31:07][Second iteration to load the files, now that we know how many of them there are]
[00:37:06][Jumping to the definitions of windows system calls using Visual Studio]
[00:38:12][Choosing the ANSI versions of system calls and structures]
[00:40:54][Getting the file names]
[00:41:08][Testing the code so far]
[00:44:28][Parameterizing the file extension]
[00:46:05][Write your own string system if you work with strings frequently]
[00:48:37][Possible extensions to the file API]
[00:50:07][Q&A][:speech]
[00:51:15][@ttbjm][Does the save file need to use this system now?]
[00:52:29][@kirroyale27][How do you feel now that you finished this?]
[00:53:27][@d7samurai][Socapex insists that the STL *is* the language and that you therefore should use "strings" from it]
[00:56:32][@marumoto][Could you elaborate on the union style inheritance you mentioned? In the same vein, will entities end up being unions?]
[00:59:26][@quatzequatel][What about updating the asset file with more files? How do you manage a ton assets as in knowing what is where?]
[01:00:09][@insofaras][Will the ASCII version of FindFirstFile work even if the full file path has unicode in it?]
[01:01:20][@cubercaleb][Will pre-rendered fonts be included into the HHA file?]
[01:01:26][@dannypauhd][Is this the new Call of Duty?]
[01:02:46][@pseudonym73][Does the requirement to call FileClose() make more sense when you consider that FindFirstChangeNotification/FindNextChangeNotification/RefreshDirectory are part of the same API?]
[01:05:02][@tthomasedison][How are you doing the audio?]
[01:05:50][@figurato][You wrote code for "Lineage Forever"? Any comment on writing it on the game/any other Lineage games? Lineage 1 pretty much sparked my entire career as a computer scientist/programmer]
[01:08:42][@soysaucethekid][What's after the asset file loading?]
[01:08:58][@captainduh][Why do you use #defines for things like PLATFORM_GET_ALL_FILE_OF_TYPE_BEGIN instead of just normal function call?]
[01:10:03][@henco7][I have not followed the latest episodes due to I actually watching it from the beginning. But is there any like crypting in savefiles regarding cheating, etc?]
[01:11:32][@infiniteloop8][Are there any books on game programming or general programming that you would recommend?]
[01:13:53][@mmisu][What do you think about "Game Engine Architecture" by J. Gregory ? The books looks solid]
[01:14:10][@quatzequatel][(Referring back to Q at 00:59:26) I meant the artist is making files how do you track what you added and what you didn't. What assets have changed. and need updated kind of thing?]
[01:15:42][@reinfrenchments][Is the graphics double-buffered?]
[01:17:05][When are you going to stream your hands coding? Would be neat. You talked about doing it some time]
[01:17:37][@qwnepra][(Referring back to Q at 01:10:03) Well just because people would know how to beat the encryption, doesn't mean it would be a bad thing to teach in this series]
[01:18:52][@bassxzero][Have you read "The Tao of Programming?"]
[01:18:59][@insofaras][Does it tear with Aero disabled?]
[/video]