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

29 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

[video output=day300 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Changing from Sort Keys to Sort Rules" vod_platform=youtube id=jrKVyIfv1ek annotator=Miblo]
[0:49][How 2.5D Sorting Works in River City Ransom: Underground[ref
site="Andrew Russell"
page="How 2.5D Sorting Works in River City Ransom: Underground"
url="http://andrewrussell.net/2016/06/how-2-5d-sorting-works-in-river-city-ransom-underground"]]
[9:49][On doing a semantic sort]
[12:51][handmade_render_group.h: Consider separating out the topological sorting from the render group]
[14:48][handmade_entity.cpp: Consider making UpdateAndRenderEntities() draw pieces in front of other pieces]
[17:58][Blackboard: Sorting Rules]
[20:26][Blackboard: Considering the fact that we only need to sort sprites that overlap]
[21:25][Blackboard: The three nominal cases involving Z planar and Y planar sprites]
[22:59][Blackboard: Z overlaps Z]
[30:45][Blackboard: Y overlaps Z]
[34:43][Blackboard: Y overlaps Y]
[39:03][Blackboard: Consolidating these cases]
[44:43][Blackboard: Considering whether this scheme will allow us to sort completely]
[50:32][handmade_sort.cpp: Introduce sort_sprite_bound and make MergeSort() take it]
[52:59][handmade_sort.cpp: Introduce IsInFrontOf() in order to handle our three cases]
[1:02:07][handmade_sort.cpp: Introduce a Swap() that takes sort_sprite_bound]
[1:02:38][Q&A][:speech]
[1:02:58][@thesizik][Isn't it Y (vertical) sprites that have YMin == YMax?]
[1:03:17][handmade_sort.cpp: Correct the sense of BothZSprites in IsInFrontOf()]
[1:03:31][@zouchk42][You always do == float comparisons. How can you ensure those will ever return true because of float precision?]
[1:05:01][@longboolean][In the Y overlaps Z case, what about cliff sides that are holding up the ground sprites (so elevated ground isn't just floating there)? Would that cause an issue with anything?]
[1:05:20][Blackboard: Breaking problematic sprites into two pieces]
[1:06:37][@mvandevander][I literally did the "float ==" thing last week and considered it acceptable for that exact reason, because I was just checking if a value had just been set by me to an exact value on the previous frame or whatever]
[1:09:29][Close it down][:speech]
[/video]