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

46 lines
4.1 KiB
Plaintext
Raw Permalink Normal View History

[video output=day287 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Brains" vod_platform=youtube id=gwtSqvoxU14 annotator=Miblo]
[0:56][Blackboard: Dynamically controlling snake-like multi-segment entities]
[6:55][Blackboard: Controller templates]
[14:42][4coder: Reproduce the pane creation bug]
[17:03][handmade_entity.h: Remove entity_relationship and ReferenceIsValid and, from entity, PairedEntityCount and PairedEntities]
[18:14][handmade_entity.h: Introduce entity_controller_type, entity_controller_slot and entity_controller_id, and add one of each to entity]
[22:17][handmade_entity.h: Consider how this system will replace entity_type]
[24:59][handmade_entity.h: Rename entity_controller_* to brain_*]
[25:44][handmade_sim_region.h: Introduce brain_hash and add an array of them to sim_region]
[30:30][handmade_world.cpp: Rename PackEntityReferenceArray to PackEntityReference and make it work on only one entity]
[36:58][handmade_world.cpp: Make PackTraversableReference and PackEntityIntoChunk take a sim_region]
[37:49][handmade_entity.h: Introduce IsDeleted]
[38:55][handmade_sim_region.cpp: Move some functionality from LoadEntityReference to GetEntityByID and make it call the latter]
[40:32][handmade_sim_region.cpp: Make PackEntityIntoWorld take a sim_region]
[41:45][handmade_world_mode.cpp: Remove BodyRefs and HeadRefs from AddPlayer, and initialise a brain_id and some brain data for the Body and Head]
[44:08][handmade_world_mode.cpp: Introduce AddBrain]
[46:46][handmade_sim_region.h: Add MaxBrainCount, BrainCount and *Brains to sim_region]
[47:00][handmade_world_mode.cpp: Excitedly make UpdateAndRenderWorld loop through the brains and do the brain logic]
[49:01][handmade_sim_region.h: Add a brain_type to brain]
[49:22][handmade_world_mode.cpp: #if 0 out the PairedEntities code for now]
[50:46][Run the game with our disabled controllers]
[51:19][handmade_world_mode.cpp: Loft the hero head controller code up into Brain_Hero and begin writing the brain logic]
[53:14][4coder: Bright white bug]
[55:12][handmade_sim_region.h: Add a brain_id to brain]
[56:10][handmade.h: Change entity_id to brain_id in controlled_hero]
[57:05][handmade_world_mode.cpp: Fix compile errors]
[1:01:07][handmade_world_mode.cpp: Make AddPlayer return a brain_id]
[1:02:02][Q&A][:speech]
[1:04:16][@Miblo][I must have missed the bit about the snake. What is that?]
[1:05:47][@nbm][It's actually a millipede]
[1:06:10][@unrealdesign][How long do you hope this will go on for? Do you see yourself doing different game once this is finished?]
[1:07:23][@lm4rcu5l][You mentioned you'd spend four hours cleaning code. Why not have a Handmade Hero day once every other month or so and deal with problems like that?]
[1:07:43][@ezysigh][About the one entity per grid spot checking, how will you handle leaving a spot just before a monster lands there? Right now it's binary. Do you plan to add a fuzziness as you step off a square onto another one and a monster lands on your spot?]
[1:09:53][@guitarm87][Someday I will have to ask you about how to think when representing data in a program. I understand structs, enums, arrays and such. But what regulates when to use which?]
[1:14:06][@longboolean][So the idea is to have the entity system both be able to support groups of entities that change from one into another (like a monster that mimics other objects), and entities that when separated from the group can take action on their own (like a necromancer resurrecting a ripped off arm)?]
[1:15:45][@lachieds][Slightly off-topic: On average how many hours a day do you work on 1935?]
[1:16:28][@paganheart][On the note of UML, how much / often would you say you deal with that at work, if at all? In the gamedev industry, anyway]
[1:16:42][@guitarm87][Good answer, I understand what you mean. Just do it enough and you'll see what works. Experience. Thanks!]
[1:16:50][@elyasm][Have you thought about using Vulkan? It is super low-level access to hardware]
[1:17:11][Wrap it up][:speech]
[1:18:14][Announce AndrewJDR's annotated_cpp repository[ref
site="GitHub"
page="HandmadeHero/annotated_cpp"
url="https://github.com/HandmadeHero/annotated_cpp"]][:research]
[/video]