[video output=day281 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Animating the Camera Between Rooms" vod_platform=youtube id=TFBo2ziKOW0 annotator=Miblo] [1:28][Recap and set the stage for the day] [3:24][handmade_sim_region.cpp: Investigate the glitch in the room-based camera movement] [6:23][Blackboard: How the camera was being moved] [7:27][handmade_sim_region.cpp: Correct the displacement and run the game] [11:14][Blackboard: Camera control, hysteresis and perception grammar] [20:05][Blackboard: Hysteresis] [25:38][Blackboard: What we need hysteresis for in Handmade Hero] [30:18][handmade_world_mode.h: Add CameraOffset to game_world_mode in order to decouple the camera and the simulation region] [33:32][handmade_world_mode.cpp: Test offsetting the camera] [38:19][handmade_sim_region.cpp: Introduce RoomDelta and hRoomDelta to make it easier to tweak values] [40:29][Run the game and try moving between rooms] [40:31][handmade_sim_region.cpp: Displace the camera away from the hero] [41:14][handmade_sim_region.cpp: Scroll the camera halfway into the apron] [47:04][Run the game and see the camera's half-interpolation] [47:22][handmade_sim_region.cpp: Scroll the second half of the transition] [48:18][Run the game and see the full scroll in action] [50:33][handmade_sim_region.cpp: Tune the camera control] [54:22][Blackboard: Parabolic arc equation] [59:24][handmade_sim_region.cpp: Give the camera this parabolic arc] [59:52][Run the game and enjoy the camera movement] [1:01:48][handmade_sim_region.cpp: Update the Entity->P before computing the CameraOffset] [1:03:55][Run the game and see that the glitch is gone] [1:04:05][Q&A][:speech] [1:05:00][@cubercaleb][Are you concerned about the player seeing outside the boundaries of the map or seeing into other rooms when the camera zooms out?] [1:05:22][@gasto5][So, no more smooth scrolling?] [1:05:47][@soysaucethekid][I know the rooms are going to fit the screen, but will there be variable sized rooms with the camera making it fit to the screen?] [1:06:49][@dragonkinn02][When thinking of enemies, would you have classifications for AI, e.g. Level 1 approach constantly (zombie)? What would be the main levels you'd say for difficulty or reward feeling?] [1:07:04][gasto5 When does he turn 39?] [1:07:19][@popcorn][Have you seen the warp glitch from Link's Awakening? How would you avoid that?] [1:09:29][@popcorn][You press start when before you enter a room and the link will end up on top of the screen] [1:10:27][Blackboard: Our coherent sense of world space vs What may be happening in Link's Awakening] [1:13:07][@sgtcarnaval][If you want a good hysteresis example a heater controller does the job] [1:14:13][We are done][:speech] [/video]