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

55 lines
3.8 KiB
Plaintext
Raw Permalink Normal View History

[video output=day292 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Implementing Snakes" vod_platform=youtube id=NarF07FefqQ annotator=Miblo]
[1:14][Recap and plan to implement a floating method of movement and make a snake]
[3:29][handmade_entity.h: Add MovementMode_Floating to entity_movement_mode]
[4:48][handmade_brain.cpp: Enable the Familiar to move towards the closest Hero]
[5:46][Debugger: Step into Type_brain_familiar and note that Type_brain_hero is the default value]
[8:51][handmade_brain.h: Introduce IsType and make the Familiar check for the Hero type]
[11:12][Run the game and see the Familiar orbit the Hero]
[13:23][handmade_world_mode.cpp: Introduce AddSnakePiece]
[14:57][handmade_brain.h: Introduce brain_snake]
[16:44][handmade_brain.h: #define IndexedBrainSlotFor]
[20:56][handmade_sim_region.h: Replace the entity *Array\[16\] in brain with a *Array]
[23:00][Rant on pointer arithmetic in C++]
[24:14][handmade_sim_region.cpp: Advance the Ptr through the Brain->Array, ensuring that it remains inside the Brain structure]
[27:06][Underscore the necessity of languages to make simple operations easy to program]
[30:38][handmade_world_mode.cpp: Make AddStandardRoom add a snake by calling AddSnakePiece]
[32:54][handmade_brain.cpp: Make ExecuteBrain move the snake]
[38:26][Run the game and see the Snake moving like a Monstar]
[38:38][handmade_world_mode.cpp: Add more snake pieces]
[39:50][Run the game and see the snake moving around just fine, until it traps itself]
[43:11][handmade_world_mode.cpp: Try creating some additional screens]
[43:16]["We have a lot of N-squaredy things"][quote 491]
[46:00][Run the game and watch the simulation]
[51:25][Consider encouraging entities to move towards us from adjacent rooms]
[56:42][todo.txt: Update the TODOs and add an Entity System note for geographically disparate entities]
[58:54][Q&A][:speech]
[59:43][@badflydog][Wasn't today an off-day?]
[1:00:09][@cubercaleb][Can the compiler really mess up the pointer arithmetic? I mean, it is just integer ops, can't be that hard to mess up]
[1:02:28][@longboolean][So is the way to fix the snake from getting stuck to just allow it to run over itself or to make the snake AI smart enough to not trap itself?]
[1:03:48][@busy_beaver][I've recently watched your video on the GJK algorithm, it's great, thanks for that! Did you also do a video on the EPA algorithm?[ref
site=YouTube
page="Implementing GJK"
url=https://www.youtube.com/watch?v=Qupqu1xe7Io]]
[1:04:02][@sir_kane][Will the snake head be able to move to the position of its last segment? So it can go in a circle / loop]
[1:04:50][@sssmcgrath][WTF you did a video on GJK? What other explanation videos have you done?]
[1:05:09][@paradjanin][Are you going to implement every AI thing in brain entity? When does path-finding and rest of AI coming on schedule? Also can you say some good reference book for AI? Cheers, Casey]
[1:06:47][@sssmcgrath][Yeah, and IMGUI, but what else?[ref
site=YouTube
page="Interpolation"
url=https://www.youtube.com/watch?v=S2fz4BS2J3Y]]
[1:07:18][@busy_beaver][Expanding Polytope Algorithm[ref
site=YouTube
page="Immediate-Mode Graphical User Interfaces"
url=https://www.youtube.com/watch?v=Z1qyvQsjK5Y][ref
site=YouTube
page="Quaternion Double-cover and the Rest Pose Neighborhood"
url=https://www.youtube.com/watch?v=vmAY5kP-tpU]]
[1:09:09][@longboolean][Could you briefly explain how a snake segment knows which node to jump to? A non head segment, that is]
[1:09:25][@cubercaleb][Don't forget the API video![ref
site=YouTube
page="Designing and Evaluating Reusable Components"
url=https://www.youtube.com/watch?v=ZQ5_u8Lgvyk]]
[1:11:10][@busy_beaver][Well I've got GJK + EPA implemented in 2D and GJK in 3D, but I am a bit struggling at EPA in 3D]
[1:12:23][Wrap it up][:speech]
[/video]