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

76 lines
7.6 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Updating the Player Movement Code" vod_platform=youtube id=1-10ddFNqcM annotator=Miblo]
[0:07][Recap and set the stage for a few weeks of bouncing around][:speech]
[3:16][Determine to lock down the :movement code and make tools to build rooms][:"procedural generation" :speech]
[7:19][Re-enable the hero in AddPlayer()][:"entity system"]
[8:09][:Run the game and traverse our hero around the world a little]
[10:49][Determine to move from a continuous :movement style to a tile-based one][:run]
[14:59][Re-enable doors in all directions in PlayWorld()][:"procedural generation"]
[15:17][:Run the game to see those bigger rooms][:"procedural generation"]
[16:07][Introduce ExecuteBrainHero() to handle the Type_brain_hero case from ExecuteBrain()][:"entity system"]
[20:20][Try out the gamepad controller to see that it happily still works][:"input handling" :run]
[21:38][Reacquaint ourselves with the gamepad controller code in ExecuteBrainHero(), encountering the Atan2() call mentioned by @Pseudonym73[ref
site="Handmade Hero Annotated Episode Guide"
page="Introduction to Function Approximation with Andrew Bromage"
url=https://hero.handmade.network/episode/code/day440/#8972]][:"input handling" :mathematics]
[25:24][Only permit :movement in ExecuteBrainHero() if we have a head and a body][:"entity system"]
[30:04][:Run the game to see the same :movement]
[31:11][Body Motion][:blackboard :"input handling" :movement]
[35:27][Replace the current :movement code in ExecuteBrainHero() with the beginnings of a tile-wise, tapped hopping scheme][:"input handling"]
[45:52][:Run the game to see the head's analogue :movement]
[46:36][Enable ExecuteBrainHero() to initiate hops, with a few words on feel in terms of non-laggy but forgiving :"input handling"]
[50:50][:Run the game and try hopping, noting the nicety of holding down the key for continuous :movement, and consider using a clutch to control dodging][:"input handling"]
[57:08][A few words on games that proliferate the number of buttons][:"input handling" :speech]
[59:16][Add ClutchAverage to game_controller_input and enable WinMainCRTStartup() to process the triggers, change the "Add Player" key to VK_RETURN, and use VK_SPACE for the clutch][:"input handling" :"platform layer"]
[1:11:12][:Run the game with the determination to handle dodging using our clutch][:"input handling" :movement]
[1:11:43][Enable ExecuteBrainHero() to handle the notion of dodging][:"input handling" :movement]
[1:13:05][:Run the game and try dodging][:"input handling" :movement]
[1:14:10][Enable WinMainCRTStartup() to correctly persist the clutch-key state][:"input handling" :movement]
[1:16:52][:Run the game and try out clutching with Space, noting that this dodging doesn't feel great on the keyboard][:"input handling" :movement]
[1:20:12][Add the Shift keys as clutches in Win32ProcessPendingMessages()][:"input handling"]
[1:22:11][Try out the Space and Shift clutching][:"input handling" :run]
[1:22:41][Re-enable stretchy leaning in ExecuteBrainHero()][:animation]
[1:24:54][Try out the stretchy leaning][:animation :run]
[1:26:43][Delete extraneous code from ExecuteBrainHero()]
[1:28:52][Traverse the world with Body->dP disabled][:animation :run]
[1:29:07][Toggle on the Body->ddtBob calculation in ExecuteBrainHero()][:animation]
[1:30:01][Traverse the world and consider the bounce :animation to be fine][:movement :run]
[1:31:18][Introduce the notion of crouch while dodging in ExecuteBrainHero()][:animation :movement]
[1:34:02][:Run the game and try dodging][:animation :movement]
[1:34:39][Enable ExecuteBrainHero() to correctly crouch the head][:animation :movement]
[1:35:26][:Run the game to see the head crouching while dodging][:animation :movement]
[1:35:36][Enable ExecuteBrainHero() to also crouch the body][:animation :movement]
[1:36:11][:Run the game to see the crouching][:animation :movement]
[1:36:54][Reintroduce the springiness if dodging in ExecuteBrainHero()][:animation :movement]
[1:38:37][Traverse the world to try out the springiness while dodging][:animation :movement :run]
[1:39:33][Prevent diagonal :movement in ExecuteBrainHero()][:"input handling"]
[1:41:05][:Run the game to try out the cardinal (non-diagonal) :movement][:"input handling"]
[1:41:48][Q&A][:speech]
[1:42:42][@insobot][Q: Celeron ftw. FailFish?]
[1:42:57][@neitchzehrer][Q: Are you planning on having a jump command?][:"input handling" :movement]
[1:43:20][@garryjohanson][Don't even remember what a Celeron is]
[1:44:32][@nxsy][Q: There were some questions around b32x vs. b32 at some point][:language]
[1:45:04][@Miblo][Q: How about a dive and slide command?][:"input handling" :movement]
[1:45:21][@jamoflaw][Q: Are you planning on implementing a control remapping interface?][:"input handling"]
[1:45:38][@m0re85][Q: I know your view on comments but I often see you asking yourself "what was all that about?" when looking at old code. Wouldn't it be beneficial to comment non-obvious stuff?][:language]
[1:46:15][@shadowpro67][Q: What is the reason of pure C? I think C++'s oop and procedural coverage much better][:language]
[1:46:30][@x13pixels][Q: If you don't care how much space a bool is, why not use b8x?][:language]
[1:47:14][@mrpque][Q: Will you eventually make these input commands event driven rather, now that multiple sources of input are being accounted for?][:"input handling"]
[1:47:45][@yourmoviesbaddotnet][@handmade_hero What do you think are the disadvantages of C++ compared to C? Isn't C basically a subset of C++?][:language]
[1:50:21][@longboolean][Q: Something I thought of, of coarse it is a gameplay thing totally up to you. You could have the dodge double as an attack or have it push enemies away (or something) in the direction of the dodge][:"input handling" :movement]
[1:50:49][@ricecream][Q: Since you interviewed Pat Wyatt in 2015 HandmadeCon, have you ever thought about copying the Guild Wars faux Z-axis configuration?]
[1:51:50][@vateferfout][Q: What is happening with C++ templates that shouldn't be? Isn't it just generating code based on the template parameters?][:language]
[1:53:46][@wubbleduff][Q: What do you think about entity component systems as the engine architecture? How would you implement this if you don't use inheritance?][:"entity system" :language]
[1:54:25][@steamymcfly][Q: I recently learned about Imperfect Shadow Maps, I wonder if that could be a substitute for raycasting in the current :lighting system (at least on the GPU)?][:rendering]
[1:55:54][@strangezak][400 viewers today. That's a lot more than usual!]
[1:56:16][@theflame937][Q: Even if you don't do network for the game, will you do some lecture about it?][:networking]
[1:59:22][@mextrox][Q: What are your current thoughts on jai?][:language]
[2:00:09][@ricecream][Q: With the capabilities of mobile games exponentially increasing, what are the decision factors that result in games being ported to mobile?]
[2:03:18][@maxkaren][Q: What are your thoughts on Rust?][:language]
[2:03:25][@jim0_o][Q: What was it C was missing that makes you compile using C++?][:language]
[2:04:37][@dudeinbasement1][@handmade_hero stb doesn't do hinting, is there another lib that supports small text?][:font]
[2:05:35][@neitchzehrer][Q: How many types of enemies are you planning on having?][:"entity system"]
[2:05:42][@keepingtrckofthisacct][@handmade_hero How long have you been coding?]
[2:05:59][@warner][@handmade_hero Kind of off-topic question but here it goes: I've been in the gamedev industry working with studios, but now I decided to make an independent game of my own, and I kinda want to make a Kickstarter. Do you have any recommendations on that?]
[2:06:16][Wrap it up for today][:speech]
[/video]