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

44 lines
4.9 KiB
Plaintext

[video output=day161 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Finishing the General Purpose Allocator" vod_platform=youtube id=1LyHQVYlClw annotator=ZedZull annotator=Miblo annotator=debiatan]
[00:00:21][Recap and plan for today]
[00:01:46][We will need to debug the changes from the past episode]
[00:03:41][Simplifying some of yesterday's code]
[00:07:34][Finishing the merging of the freed blocks]
[00:10:14][Implementing MergeIfPossible]
[00:16:01][Modifying AcquireAssetMemory to check if the asset we are loading fits inside the newly freed space]
[00:16:47][We're good!]
[00:19:16][Potential problem of this general-purpose allocator: The linked list could be too long to walk on each allocation]
[00:25:33][Fixing an error in OpenNextFile: If the platform layer failed to allocate the file handle, that function would fail to report the error]
[00:35:48][Working with asset files containing Unicode characters]
[00:38:01][On the importance of not exposing the concept of filenames to the game code]
[00:40:26][Making the code work properly with Unicode file names]
[00:42:28][wchar_t]
[00:47:41][Isolating the game code from the concept of file extensions]
[00:53:04][Q&A][:speech]
[00:53:26][@kknewkles][First rays of Moscow sun bid you Good Evening, Casey. I humbly request to be granted two off-topic questions (maybe near the end?)]
[00:53:55][@blah238][I asked a similar question yesterday, but I guess it wasn't clear. Have you thought about how the asset system could work with 3rd party mods? Say someone wants to make a mod that adds new graphics, sounds and/or game logic. How hard would it be to implement a mod loader, Steam Workshop support, etc?]
[00:55:23][@ttbjm][Should there be a way to say if one of the hero assets are loaded then they all should be loaded and not evicted?]
[00:56:30][@cubercaleb][Might be off topic, but why exactly do you have typedef'ed functions in the code?]
[00:57:38][@kknewkles][Did you see this Nostalgia Critic Wicker Man (Cage in a bear suit) review? www.youtube.com/watch?v=vj_CRnwJTk8]
[00:57:54][@insofaras][Can we get a visual display of the loaded / unloaded chunks of asset memory when we do the debug stuff?]
[00:58:10][@echoy0][I would like to hear what your definition of enumeration is, if you will]
[00:58:44][@neitchzehrer][Good evening Casey. Does Windows 10 change the coding (if you know)?]
[00:59:32][@ifingerbangedurcat][On MergeIfPossible, when you pass the checks and do the merge, you add the size of the header plus the size, but on the line before that you check that the (size + header) matches, but the size should already include the header. Can you explain why that is?]
[01:03:16][@zouchk42][What's the cause of the depth error you get on rendering?]
[01:03:46][@kknewkles][You know I'm the biggest fan of the series, but I suspect for complete newbies the current way you construct the game makes little sense. Consider this: you know how to make a game, so you methodically cross over a check-list of components you know by heart (mostly). What would probably be easier and more graphic for larvas to grasp is to make a little functional game(title screen, game loop, game over, start over, etc) and THEN iterate upon it. It's more visual and having a little game that evolves every day little by little keeps the maker motivated, as opposed to a pro that knows what the game should look like in the end]
[01:07:34][@jonks1234][Did you ever play Freelancer?]
[01:08:01][@ciastek3214][Have you seen Kung Pow?]
[01:08:33][@cubercaleb][Which version of Visual Studio are you using at work?]
[01:09:00][@kelimion][Will that point in time see a new intro trailer with an old motherboard being pulled from the attic, engine booting up and Handmade Hero announcing the completion of the engine, perhaps with a nice sine scroller and particle effects?]
[01:09:26][@breadthofhair][Is font rendering around the corner?]
[01:09:51][@plain_flavored][How do you render without instantiating a brush object?]
[01:11:00][@manicthenobody][Will you be going the easy way and using Bitmap fonts, or will you be implementing TTF?]
[01:12:08][@sharlock93][Do you know anyone by the name of Andre Lamothe?]
[01:12:39][@imbatman314][Are you going to implement distance field font?]
[01:15:11][@powerc9k][Is it worthwhile to try to make a game only using pure functions, i.e. no side effects]
[01:17:13][@cubercaleb][Will you cover non-mono-spaced fonts and font kerning?]
[01:18:53][@madprocess][(Referring to Q at 01:15:11) Functional game: The state is an argument and a new state is returned]
[01:21:45][@sharlock93][How much of the code you have written so far can be ported to 3D easily?]
[01:22:29][@madprocess][(Referring to Q at 01:18:53) At least in Haskell, the "pure functional" part is hidden away from the IO stuff via a mathematical concept called "Monads"]
[01:23:57][@manicthenobody][What do you think of a graphics system that intentionally simulates Mode 7?]
[/video]