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

56 lines
4.1 KiB
Plaintext
Raw Normal View History

[video output=day149 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Writing Assets to the Asset File" vod_platform=youtube id=CNTlpoYdKF8 annotator=ZedZull annotator=Miblo annotator=debiatan]
[00:00:12][Recap and plan for the day]
[00:03:00][A file is a permanently stored version of memory]
[00:04:20][Two ways of storing the asset array and the assets:]
[00:04:59][1) Going back and forth after writing each asset]
[00:06:09][2) Writing all the assets, going back and writing the whole asset array]
[00:07:33][C Run-Time library function: fseek]
[00:09:47][The CRT's fseek does not support 64-bit offsets]
[00:19:15][Moving the BMP code into the test asset builder]
[00:23:07][Including the math header file, after all]
[00:23:54][Moving the sound code into the test asset builder]
[00:30:35][The CRT's ftell does not support 64-bit offsets]
[00:34:54][Guarding against multiple bitmap pitches]
[00:37:13][Loading asset data into freeable memory]
[00:39:30][C Run-Time library version of ReadEntireFile]
[00:41:15][Figuring out the size of a file using fseek]
[00:42:45][Skipping the first, intentionally blank, asset]
[00:43:14][Debugging ReadEntireFile]
[00:48:19][Switching to loading all assets from the pack file]
[00:50:35][Approaching expansive code changes. One step at a time]
[00:54:00][Referencing the asset file loaded into memory]
[00:56:56][Straight casting of the header file as an hha header struct, and checking the magic value and version]
[00:59:19][Stepping through the code]
[01:00:17][Q&A][:speech]
[01:00:56][@pra_nda][How long has this been going for?]
[01:01:20][@gasto5][What does flat-loaded mean?]
[01:03:49][@ciastek3214][What is the benefit of keeping all assets in one file as opposed to making different asset files dedicated to each type of asset? (answered at 1:05:42)]
[01:04:46][@ttbjm][Should there be error asserts if there are no assets that match a query?]
[01:05:20][@pra_nda][Will you ever make games to make profit off?]
[01:05:42][@ciastek3214][The latter (about the assets)]
[01:05:48][Our single-file HHA :"file format"][:"asset system" :blackboard]
[01:07:22][Why split our HHA file?][:"asset system" :blackboard :"file format" :"file io"]
[01:09:32][Off-topic Q&A]
[01:09:43][@oreopanda22][Where did you learn to code?]
[01:09:55][@gxc_][How long have you been coding?]
[01:09:59][@killatank54][Is this what you do full-time? Or do you work for a company?]
[01:10:33][@bfisher277][Will the game be multi-player or single-player? And will you be able to code your character, kind of like CodeSpells, like the name "handmade hero" would suggest?]
[01:11:46][@dr_kegel][Why is your bio webpage not viewable without javascript?][quote 137]
[01:13:03][@chronicsquid][What is a bit map?]
[01:15:49][@pra_nda][Have you been doing this all your life?]
[01:15:52][@aceflameseer][What is the Windows 10 release date?]
[01:15:59][@killatank54][What is your day job? And do you enjoy it?]
[01:16:13][@davechat][What is Overlapped IO?]
[01:16:33][@ciastek3214][In that case (referring to question at 1:03:49), why do other developers break up their assets in separate files?]
[01:17:27][@daelus][Would having separate files assist with modding or patching?]
[01:18:16][@gasto5][Is Mike Acton's Data Oriented Design any different than Compression Oriented Programming?]
[01:20:06][@masterevilace][One reason to split files is to get around the FAT32 4GB limit. Another reason might be if your pipeline allows audio devs to update their pack file for the game w/o needing or messing with other parts of the game (models, textures)]
[01:21:00][@diojr1][Where can we read about the actual plan for the game? (gameplay)]
[01:21:06][@impl33t][Are you using any C++ plugins for Emacs?]
[01:21:19][@snubbykins][Won't the game have to wait until all the assets have been decompressed before the game can start?]
[01:22:07][@impl33t][Why are you using Windows instead of Linux?]
[01:30:58][@aceflameseer][Can you say something on stream to get reddit angry; they're already complaining about your OOP statement]
[01:31:23][@impl33t][But you can code on Linux for Windows very easily, right?]
2019-07-30 19:09:12 +00:00
[01:32:41][We are about done for the day][:speech]
[/video]