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

38 lines
4.2 KiB
Plaintext

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding a Simple Attack" vod_platform=youtube id=bHGLcGgwpWg annotator=Miblo annotator=schme annotator=wheatdog]
[1:56][Recap and plan for the day ahead]
[6:07][handmade.cpp: Pull out the code draws hitpoints]
[8:04][handmade.cpp: InitHitPoints]
[11:44][Use sprite "rock03" as the hero's attack region]
[13:35][Blackboard: Casey demonstrate how to zoom in and out in Mischief and decide to save the handwritten into the handmade hero directory]
[14:35][Blackboard: Talk about the difficulties we will encounter if we treat sword as an entity]
[21:56][Blackboard: "Imagine"][quote 235]
[30:46][Implement the sword]
[38:31][Bind "Start button" for jumping and arrow keys for attacks in different directions]
[40:22][Make sure that we take our sword and launch it]
[43:55][Treat sword as a low entity the whole time. Let the camera system force it into high]
[44:30][Consider mapping entities into the high set if ChangeEntityLocation moves it into camera bounds]
[45:21][Back to implementing the code to launch the sword]
[46:57][Introduce some notion to represent whether world_postion is valid or not]
[51:36][Run the game and find out that sword doesn't show up]
[52:44][Start debugging]
[59:35][Visual Studio is awful at being able to show you variables when they exit the scope]
[1:02:38][Find out that the CameraSpaceP of Sword is completely garbage]
[1:03:43][Make ChangeEntityLocation update the new world_postion properly]
[1:06:53][Run the game to verify whether the bug is fixed or not]
[1:08:02][Q&A][:speech]
[1:08:45][@jackkrozzer][What do you mean that Visual Studio is horrible at showing variables, and how are you programming in Emacs and running it in Visual Studio?]
[1:11:52][@roflraging][When doing exploratory / experimental programming, I find it difficult to decide between seeing things through or switching to a different approach. There have been many times where I start off on a path and things are going great, but eventually I stall due to some unforeseen problem. Often, I spend a crazy amount of time thinking about how to solve / get around the problem, even in simple ways. Analysis paralysis if you will. Any suggestions? Literally, just keep on writing code, no matter how dumb it is?]
[1:20:08][@ttbjm][Will you handle the case where a sword and a monstar would hit each other but are moving toward each other so fast that they pass through each other without colliding in a single frame?]
[1:20:45][@chiefslaya][Do you think "cheesing" - like making enemies invincible for 10 frames after being hit - is a game design sin, or just something you'd rather avoid?]
[1:24:13][@hunter][Why not just use the auto window?]
[1:25:18][@hemebond][Is VC++ still better than open-source alternatives?]
[1:26:41][@starchypancakes][What would you think about adapting the art style to be easier to implement, either at all or this early on. The trite example being for the sword collision you mentioned early on, what if you were to do something like: okay, the sword is going to teleport along the path instantly in one frame and some red line a bit like anime that would be persistent through a couple frames. Basically potentially fundamentally changing the art style with the purpose of getting things to run better. Are there any examples of something like this occurring that you might have heard of?]
[1:28:22][@mikenicolella][Are you working on the RAD debugger, or will you try using it for HMH before the debugger is released?]
[1:28:54][@jackkrozzer][You always talk about the ways of programming when you started or when programming was at its prime. How can I, an 18 year old, know what it's like or get the knowledge you have about programming? Are there any books or languages or SOMETHING I can do to learn the old ways of programming? \[see Resources\]]
[1:32:00][@dumbson][Why did you pick C++ of all things?]
[1:35:11][@teh_guppy][Would there have been an easier language to program the game in?]
[1:37:36][@ezioauditorerevs][To be able to surpass C++ as the defacto language to code games in, what would you have to do as a language that would make you better than C++?]
[1:38:17][@drtwox][CAN I HAVE A WITNESS BETA KEY!!!]
[1:38:28][Wrap it up for the day][:speech]
[/video]