Relocate riscy and add newly converted hero
The idea here is to reduce the amount of superfluous stuff downloaded to each server running cinera
This commit is contained in:
commit
fe63b9fa5a
|
@ -0,0 +1,59 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Health and Emulation" vod_platform=youtube id=uT5ao2rSNxI annotator=Miblo]
|
||||
[0:06][Health Check]
|
||||
[3:19][On modal editors]
|
||||
[8:47][Q&A]
|
||||
[10:32][@elxenoaizd][I always wondered why it is hard to perfectly emulate console hardware with almost perfect performance like the Gamecube, PS2, etc. considering their hardware specs weren't that super advanced but yet it requires a decent computer to run games in Dolphin emulator]
|
||||
[12:36][Blackboard: Single-thread speed]
|
||||
[15:40]["Don't quote me on that"][quote 367]
|
||||
[18:57][Blackboard: Emulation requires emulation][quote 368]
|
||||
[29:17][@Ikkir_Isth][Able to use thumbs / thumbsticks? Wonder if one could map common stuff to a controller for a programming language to program via a controller]
|
||||
[29:54][@Mr4thDimention][I'm working on a sort of experimental alternative to modes that reduces (probably eliminates) key holding! Do you still think that's a part of the problem for you?]
|
||||
[30:46][@ingenero][Could these streams be a good time for some C++ tutorials or something similar?]
|
||||
[31:22][@CaptainKraft][How much of the renderer that you wrote for Handmade Hero will be replaced when you move fully into OpenGL?]
|
||||
[31:40][@ratchetfreak][Right-click and "remove from list" to remove keypass]
|
||||
[31:53][@effect0r][They is gender neutral]
|
||||
[32:08][@rbnelr][I'm working through some OpenGL tutorials at the moment and am at quaternions now.]
|
||||
[32:19][@ryanrothweiler][Opinions on standup desk? I recently switched to one and my hands / wrists / arms feel noticeably better]
|
||||
[32:59][@markarcioulo][I've been doing some reading on early computer graphics technology, 60s and 70s. Any thoughts on the topic?]
|
||||
[33:40][@CaptainKraft][You've mentioned before that there are great programmers that have very different skillsets. What skillset is your strongest? Did you actively try to get better at it or just naturally fall into that skillset?]
|
||||
[35:23][@thesizik][Dolphin is the emulator, not the chip]
|
||||
[36:27][@ChronalDragon][Q: lol I like how every part of the GameCube is being labelled "Dolphin" by Casey now]
|
||||
[36:37][@elxenoaizd][Thanks for the great answer! Regarding my question about rotation and scaling, apologies but I wasn't able to find the time to research it in Handmade Hero code due to my full-time job. The question was: How do scale and rotation play nice together if rotation is stored at the first 3x3 part of the transform matrix and the scale is at 1,2,3 diagonal? Wouldn't they step on each other's toes?]
|
||||
[37:32][@ambiguous_panda][Ever have to write accessibility features for people with disabilities like RSI?]
|
||||
[37:55][@boondoggle42][Since Jon Blow is soliciting for programmers to contrubute to JAI, would you be interested in being involved in any way?]
|
||||
[38:11][@symbolic_butt][What do you think about model-view-controller pattern? If you already ranted about this, feel free to ignore this question]
|
||||
[38:35][@sssmcgrath][(specific to me so feel free to skip): Remember that grid visibility determination thing? I spent 2 minutes thinking about it, I think just 4 8-bit numbers indicating how far in each cardinal direction you can see from that cell... solves everything! 4 bytes per cell. ez pz.]
|
||||
[39:04][@ileacristian][In the first videos (archive) you mention that you won't use anything like OpenGL. Did you change your mind on the way?]
|
||||
[39:40][@slashac][Looks like Silicon Valley bubble is bursting]
|
||||
[39:58][@andrewjdr][Has the RSI been putting a damper on your work at Molly Rocket as well?]
|
||||
[40:53][@longboolean][Have you tried using any funky ergonomic keyboards?]
|
||||
[41:26][@kemosabe76][Casey's C Knowledge Nugget: To const or not to const?]
|
||||
[43:57][@elxenoaizd][So one of the main problems is not that we're not fast enough but probably not accurate enough in emulation. But if the docs were pretty clear about everything related to the hardware, the specs, etc. where they really go down in details explaining how everything works, wouldn't that make the life of emulation authors easier?]
|
||||
[45:04][@beefog][Now that I am playing The Witness, would you explain again what part you worked on?]
|
||||
[46:07][@longboolean][I'm thinking of getting a sewing machine pedal for mode switching in vim]
|
||||
[46:31][@acalc][Any suggestions on the ideal computer chair (and settings) for programming? I tend to have problems with the backs of my legs. (For a while now, I've actually been using one of those rubber exercise balls as a chair, which works but isn't the most comfortable thing ever, I guess)]
|
||||
[47:51][@symbolic_butt][Do you know other advanced algebra topics that became a thing in modern programming like quaternions did?]
|
||||
[48:30][@Ikkir_Isth][Thought about doing electronics and creating a custom keyboard for your issues?]
|
||||
[48:57][@CaptainKraft][What kinds of jobs outside of the game industry translate well into game engine programming?]
|
||||
[49:49][@CaptainKraft][Do you think that ARM can ever catch up to desktop CPUs or that it could be used as a good game platform?]
|
||||
[50:56][@noctal][What don't you like about the Vulkan / DX12 APIs?]
|
||||
[51:07][@quartertron][What about const and optimization possibilities?]
|
||||
[52:46][@elxenoaizd][I'm very sad to hear about your hands, Sensei. I pray and wish you get well soon]
|
||||
[53:08][@ciryus33][Around Day 130 or so you said that OpenGL and Direct3D were out back waiting to be put down and that everyone would be using Vulkan. Based on your comment just now, do you no longer feel that way?]
|
||||
[55:09][@mmv94][Have you heard about the Godot Engine? Do you think it is a good tool for a prototype / proof of concept?]
|
||||
[55:22][@ileacristian][How do you and Jonathan Blow know each other?]
|
||||
[55:28][@elxenoaizd][Any general tips / suggestions how to approach the code for a new project with little to no art done for it yet? We have almost a complete game design document listing all the code stuff we need but there's so much stuff it's tricky to figure out where and how to start]
|
||||
[55:59][@Miblo][Are you familiar with nonograms? @effect0r introduced me to them recently and I'm now addicted]
|
||||
[56:11][@longboolean][You're probably the wrong person to ask, but do you have any idea when / if The Witness will get a Linux version?]
|
||||
[58:08][@elxenoaizd][Have you ever tried building something for mobile and submitting it to a store? Like, Apple store, it's quite the tedious process, takes 30 minutes to build and only when it finishes it tells you if there was any errors.... it's quite the nightmare for me I don't understand why there are so many mobile game developers]
|
||||
[58:51][@boondoggle42][If doctors could grow you clone arms on the back of a host animal, say, a pig, would you accept them as transplants onto your body to get another 30 years of pain free programming?]
|
||||
[59:14][@ratchetfreak][Would it be possible to make a front-end wrapping the next-gen graphics APIs that you like?]
|
||||
[59:37][@sssmcgrath][When my platform / game library is more ready would you be interested in scrutinizing the API design? (I mean look before it's too late to change it, but when it's something I think isn't awful)]
|
||||
[1:00:45][@sophira][Are there any wrappers around OpenGL / D3D / Vulkan that you would prefer to become a full 3D API rather than just a wrapper?]
|
||||
[1:01:01][@symbolic_butt][BTW, do you know what happened with The Witness' sound? A bunch of people I know had issues (including myself) and had to disable surround sound or something]
|
||||
[1:02:26][@powerc9k][Have you completed The Witness?]
|
||||
[1:03:16][@Miblo][Something I find kind of interesting regarding the financial viability of Linux is that, in those Humble Bundle payment pie charts, the Linux segment tends to be way above 1%]
|
||||
[1:07:35][@thesizik][Could you stream The Witness?]
|
||||
[1:07:58][@longboolean][Let's change the name, call it SteamOS: now is it viable?]
|
||||
[1:09:35][Wrap that up]
|
||||
[/video]
|
|
@ -0,0 +1,40 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Asset Files and Installers" vod_platform=youtube id=nKkQHa8yOe4 annotator=Miblo]
|
||||
[0:43][@trevnewt][What are the pros and cons of "baking" assets like images into your executable, rather than shipping them separately and loading them dynamically?]
|
||||
[1:16][Blackboard: The difference between storing assets in vs separately from an executable]
|
||||
[4:29][Blackboard: Packed files vs Separate files]
|
||||
[8:35][@drayka_][Once you return to coding episode streams, would you recommend new followers tune in, even though they haven't caught up with everything in the archive?]
|
||||
[9:13][@insofaras][I meant using the built in windows voice recognition stuff to program Handmade Hero]
|
||||
[9:29][@cubercaleb][Do you think you could create an in depth video / post on IOCP at some point in the near future? I am having a bit of trouble understanding their amazing-ness]
|
||||
[9:54][@Elxenoaizd][Good evening Sensei! I hope your hand is feeling better today! I salute your positiveness in handling the situation. I would totally freak out if that happens to me, without programming I'm practically useless]
|
||||
[11:34][@dangalf_][After fiction technology, what are some candidates for another problem / project worth your time?]
|
||||
[12:10][@pragmascrypt][Will there ever be good realtime global illumination]
|
||||
[12:56][@protongaming][Why are companies so hard with junior developers in the interview process. Make it very difficult for inexperienced coders to get a job]
|
||||
[13:44][@x13pixels][Is Martins still putting the videos up on BitTorrent Sync?]
|
||||
[14:28][@ejunkie64][You could try something like chi gung (Chinese health exercise) which could help with RSI and creating a good posture. Just a thought]
|
||||
[14:59][@remurr][Do you ever wonder if a game you're playing will turn into Frog Fractions 2 with a crazy twist? I find myself wondering this often]
|
||||
[15:10][@ingenero][For some reason I remember you saying there were changes coming to the handmadehero.org forums. Did I remember correctly, and do you have any updates on the current status?]
|
||||
[16:09][@danyguag][What is that Intel Architecture thing on your desktop?[ref
|
||||
site=Intel
|
||||
page="Intel Intrinsics Guide"
|
||||
url=https://software.intel.com/sites/landingpage/IntrinsicsGuide/]]
|
||||
[19:00][@garlandobloom][Q: Have you ever been to GDC?]
|
||||
[19:31][@garlandobloom][Q: Why is audio such a disaster even on windows?]
|
||||
[20:21][@cubercaleb][Don't installer programs typically bake information about the program they are installing into the exe? Is that how installers are typically done on the Windows?]
|
||||
[20:44][Blackboard: Making an installer]
|
||||
[24:33][@nightbasilisk][Is making an interesting "game AI" considered a very hard problem or are people just lazy? I see most games come with terrible AI these days; why does it seem we're going backwards?]
|
||||
[25:21][@garlandobloom][Is there any difference between exe installers and msi installers?]
|
||||
[26:27][@raley91][I'm no doctor but couldn't be that the wrist braces you use are actually making your muscles in that part weaker?]
|
||||
[27:26][@garryjohanson][Possibly too big of a question, but is there an ideal known strategy to make a natural language processing system, e.g. you type English and that parses into actions then enacted by your program?]
|
||||
[28:57][@garryjohanson][We could do an experiment where you tell us what to make and you review?]
|
||||
[29:22][@sssmcgrath][Have you spoken to Chris Crawford about IF?]
|
||||
[30:05][@imminent_threat][How would you describe your learning curve over your decades of programming experience? For me, no matter how long I do something, I always seem to look back to where I was a year before, and feel like that was a much less competent version of myself]
|
||||
[31:48][@insofaras][Have you played Starship Titanic? I thought that had quite a cool interactive conversation thing, especially for a 1998 game]
|
||||
[32:16][@elxenoaizd][Related to the question about embedded resources vs external ones: I had an idea of using a meta program to load a model during a preprocessor step and spits out the code that assigns the vertices values directly to an array, i.e. void LoadModel(v3 *Vertices) { Vertices\[0\].x = ...; Vertices\[0\].y = ....; } etc. Do you think that's useful in any way?]
|
||||
[33:44][@cvaucher][Might be jumping the gun since we haven't gotten to shaders, but I'm having trouble with them in my renderer. Am I supposed to save the attributes and shader programs across draw calls, or reinitialize each time? Seems like you went to a lot of trouble to remove the transient arena from the OpenGL renderer so things can't be pushed from there]
|
||||
[35:43][@thesizik][What PDF reader is that?]
|
||||
[35:57][@elxenoaizd][Why is it in C++ that people always like and do many compilation units, one for each .cpp file? Is it just because it's how visual studio build works?]
|
||||
[37:14][@cubercaleb][Won't Anti-Viruses get finicky with you writing to the end of an exe? Doesn't that also break code signing?]
|
||||
[38:15][@cubercaleb][Is it practical to roll your own C runtime? From what I have gathered there seems to be a lot of problems with that sort of thing. Of course M$ has the audacity to ship incompatible versions of the CRT on different versions of Windows. Any workarounds for this?]
|
||||
[38:55][@boondoggle42][Have you considered guest programmers for the interim?]
|
||||
[39:31][That's it for tonight]
|
||||
[/video]
|
|
@ -0,0 +1,24 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Resources, Files and DRM" vod_platform=youtube id=xi2jE3dzhTc annotator=Miblo]
|
||||
[0:26][Recap and set the stage for the day]
|
||||
[1:12][Blackboard: Conceptual resource vs Physical resource]
|
||||
[3:28][Blackboard: Conceptual resource]
|
||||
[5:12][Blackboard: Physical resource]
|
||||
[9:59][Q: Why would a game ever need more than one file?]
|
||||
[12:55][Blackboard: Spritesheets and swapping]
|
||||
[15:27][Blackboard: API / filesize limits]
|
||||
[18:07][Blackboard: Memory mapped file]
|
||||
[30:20][@elxenoaizd][Is there any way to reverse engineer a pack file and figure out how it's laid out, like Resident Evil MD1 files on PlayStation?]
|
||||
[31:52][@cubercaleb][Why do you think that memory mapped files are a bad idea?]
|
||||
[32:11][@thegiallo][Does Steam allow to patch files instead of overwrite them? So could one patch the one data file, having an update that is not a practically full reinstall?]
|
||||
[33:53][@elxenoaizd][Any ideas or thoughts about those anti-piracy ideas they implemented in GTA, Serious Sam and other games where the game trolls the players and becomes super hard and even impossible to beat if the cracked version is used?]
|
||||
[36:20][@longboolean][I've been thinking about how to implement water reflections in a top down 2D game. What do you think about using render layers like: (bottom -> top) water, reflection, land, shadows, objects / things, then combining the layers?]
|
||||
[36:50][@Captainkraft][Do you have any idea for hardware architecture design that could improve performance for games?]
|
||||
[38:42][@snovind92][Under development and before the release of a PC game, are there good practices for making sure that a game will work on an end user's machine and not get bugs caused by users' hardware?]
|
||||
[41:27][@pragmascrypt][Do you have to go through the Steam Greenlight process in Steam for your game? Do you think its a good idea?]
|
||||
[42:21][@garryjohanson][If you had an easy way to write whatever code you wanted on the GPU, would you write your own renderer and never use OpenGL again?]
|
||||
[42:41][@thegiallo][So all the huge updates I continuously have on Steam are dev faults! Like 35GB over 35GB of clean install. Do you know what was the 1GB update of The Witness for? I was wondering why it was so huge so early]
|
||||
[43:59][@cubercaleb][How do you feel about DRM schemes like Denuvo that take a considerable amount of CPU time during game play and add to hard disk writes which is bad for SSDs?]
|
||||
[44:21][@elxenoaizd][I was just curious in my question how some games know if the player is playing a legitimate vs cracked version? Where they crank the difficulty level and make it impossible for cracked version to beat. They use some sort of DLL versioning / signature, or...?]
|
||||
[47:40][Blackboard: DRM]
|
||||
[52:23][Call it a day]
|
||||
[/video]
|
|
@ -0,0 +1,9 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Cross-compiling" vod_platform=youtube id=tlYn2kN0g8c annotator=Miblo]
|
||||
[0:29][Blackboard: Cross-compiling]
|
||||
[1:07][Blackboard: Compiling]
|
||||
[6:06][Blackboard: cpp -> obj -> binary executable]
|
||||
[8:13][Blackboard: Linking]
|
||||
[11:55][Blackboard: Cross compiling]
|
||||
[19:56][@cubercaleb][So, why do I still need Linux to compile for Linux?]
|
||||
[23:29][Close things down]
|
||||
[/video]
|
|
@ -0,0 +1,56 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="SGX and Unbreakable DRM" vod_platform=youtube id=8eULB8uMIuc annotator=Miblo]
|
||||
[0:18][@AndrewJDR][Can you explain how this Intel SGX thing allows for "unbreakable DRM" for applications (kind of an uncommon thing on the PC side up until now)?]
|
||||
[1:55][Blackboard: The current state of DRM]
|
||||
[7:51][Blackboard: Baking the key, e.g. RSA private key, into the CPU]
|
||||
[15:13][@andsz_][You could just give them another public key that you have the private key for \[see Resources\]]
|
||||
[18:42][Attestation \[see Resources\]]
|
||||
[21:03][@bastheimreth][What about the above scenario, but where there is no internet connection? How would one run such software in off-line mode?]
|
||||
[21:54][@Pseudonym73][So the NSA doesn't have to crack it. They just have to rubber-hose Intel]
|
||||
[22:36][@Stevoid1990][Can't this be broken using emulation?]
|
||||
[22:48][Blackboard: SGX, step-by-step]
|
||||
[26:14][@macielda][Can't they just figure out Intel Key Generator and make a Key Generator for it?]
|
||||
[27:18][@Stevoid1990][So even if the emulation contained a valid key from a registered copy it couldn't be cracked?]
|
||||
[28:33][@AndrewJDR][I assume this breaks certain features of the windows API since the memory is protected? Global hook DLLs for example?]
|
||||
[29:38][@ejunkie64][What if the CPU fails or you want to upgrade?]
|
||||
[30:02][@Longboolean][Would Intel create a different key for each manufactured CPU or is there only ever one key?]
|
||||
[30:42][@CrackedOrb][But this means you lose control of your own system since only Intel can perform actions]
|
||||
[31:18][@ezioauditorerevs][How susceptible is the locking of portions of memory / CPU cores to malicious encryption programs that simply want to screw your computer over?]
|
||||
[32:13][@ratchetfreak][But if the game is sloppy and ends up allowing arbitrary user code execution, then the code can be leaked]
|
||||
[32:43][@pragmascrypt][If anyone ever leaks Intel's private key, SGX on all those CPUs would be exploitable?]
|
||||
[33:44][@Popcorn0x90][Why don't they use this system for banks, something that's worth protecting?]
|
||||
[34:12][@quartertron][Can you think of awesome usages for this? Like an opt-in anti-cheat thing, so the server would know everyone on it had no aim bots or whatever]
|
||||
[36:39][@Rfh666][Will this constant decryption used while running a game have an effect on performance?]
|
||||
[37:02][@Robrobby][Once a key pair is known, everybody could use it and encrypt the game with it through Valve, leaving Valve at encrypt everything with the same key (CPU) for different users. Well fail on the way very fast]
|
||||
[39:13][@cubercaleb][Redownloading games sounds bad for SSDs]
|
||||
[39:37][@macielda][Isn't it expensive for Intel to print a different circuit for each CPU?]
|
||||
[39:49][@Pseudonym73][Does SGX sound like a great place for a rootkit to hide or what?]
|
||||
[40:15][@ratchetfreak][Doesn't that also prevent JIT'ing?]
|
||||
[41:20][@macielda][Isn't it expensive for Intel to print a different circuit for each CPU and maintain a queryable database for each client 24/7 considering its Key was generated using a quantum measurement of some kind and stuff?]
|
||||
[43:08][@AndrewJDR][Have you heard any word on whether AMD will be implementing this?]
|
||||
[43:16][@cubercaleb][Isn't DRM good if you want to prevent people from freely redistributing your software?]
|
||||
[45:37][@Robrobby][How you draw the future of restricted hardware I should start not buying hardware like this, right?]
|
||||
[46:19][@Stevoid1990][I imagine this would be great to use for hardware banning from games?]
|
||||
[47:12][@Rawdge][Let's say a revoke certificate is issued for a compromised CPU, and Valve et al no longer issue new software, why would your system be 'bricked?' Since you already have an encrypted version of the software on your HD, how could they still prevent you from running that software that's already installed?]
|
||||
[48:04][@Gobfather][Since the key is on the CPU, couldn't you just buy a new CPU if the key gets blacklisted instead of a whole new computer?]
|
||||
[48:32][@mmv94][Won't that generate a huge market for computers that have been blacklisted?]
|
||||
[49:01][@macielda][It feels like it is just a matter of time until someone somewhere breaks this scheme and it is just a massive waste of time and resources for everyone. Am I right?]
|
||||
[49:42][@ezioauditorerevs][Isn't it DRM that is the primary driving force for piracy in the first place?]
|
||||
[50:09][@cubercaleb][I think it is a bigger deal for companies like Adobe and Autodesk, both of which have software with insanely high piracy rates]
|
||||
[50:20][@mmv94][When big companies start locking out people from using their software, they (the people) will start looking for software from smaller companies that won't use this technology]
|
||||
[51:39][@Hayai][Do you think that there's a chance that the smallish trend of DRM-free games will counteract this SGX stuff in any significant way?]
|
||||
[53:09][@Robrobby][Sad the entry costs in fab productions are so high, else I would find a Kickstarter soon to some fantastic "user-owned CPU architecture"]
|
||||
[53:39][@ezioauditorerevs][Could this be taken a step further if they start putting the key on the motherboard instead of the CPU? That's less replaceable, isn't it?]
|
||||
[54:15][@AndrewJDR][So apparently QEMU (a VM hypervisor) has support for emulating SGX. How is this useful?]
|
||||
[55:32][@SoysauceTheKid][For businesses wouldn't this tech be good for the consumer? I would feel more comfortable if my bank had my data encrypted as tight as possible]
|
||||
[56:55][@cubercaleb][Has RAD ever had problems with people pirating their software or people releasing the source code?]
|
||||
[57:09][@macielda][Could encrypting each (16GB?) game download using your SGX key be a prohibitive cost for a company like Valve? How likely would it be for Valve to refuse doing such a thing?]
|
||||
[58:39][@Robrobby][I am less afraid of prize control with DRM strong as this one. I am more afraid that the OS of the future will block software that hasn't been signed. That is scary!]
|
||||
[59:14][@Avalier][Would the entire time \[game\] need to be encrypted or just the executable part]
|
||||
[1:00:00][@Gobfather][Since Valve made a big push for Linux, I'm willing to bet that they wont jump on the SGX train since it is a possible limiter to consumers]
|
||||
[1:00:17][@cubercaleb][What is code signing anyway?]
|
||||
[1:00:43][Blackboard: Public Key Encryption]
|
||||
[1:03:53][@macielda][Casey, would you consider prioritizing developing for OSes which refuse to use SGX?]
|
||||
[1:04:09][@Stevoid1990][You should do more streams about this kind of stuff, it's really interesting]
|
||||
[1:04:18][@Robrobby][DRM like this is sad. Can you please choose a happier topic for the next chat?]
|
||||
[1:04:29][Wrap things up]
|
||||
[/video]
|
|
@ -0,0 +1,35 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Error-based Drawing Algorithms" vod_platform=youtube id=q79-Qh2suMY annotator=Miblo]
|
||||
[0:11][Glimpse into the future beyond RSI Break]
|
||||
[0:49][Blackboard: Bresenham]
|
||||
[2:43][Blackboard: Drawing a pixel at a time directly to a CRT]
|
||||
[6:48][Blackboard: Constructing an algorithm for drawing a line]
|
||||
[15:19][Blackboard: Picking whether horizontal or vertical is the better choice, i.e. error-based drawing]
|
||||
[27:04][Blackboard: Constructing an algorithm for drawing a circle]
|
||||
[29:42]["I don't want to be at the club. This is not dance time"][quote 371]
|
||||
[35:23][Blackboard: Optimising this circle-plotting routine]
|
||||
[37:06][Blackboard: Transforming the implicit line-drawing equation into the circle one]
|
||||
[40:09][Internet: Bresenham's line algorithm[ref
|
||||
site="Wikipedia"
|
||||
page="Bresenham's line algorithm"
|
||||
url="https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm"]]
|
||||
[42:12][@elxenoaizd][I remember reading that Bresenham works for the first octant, and they had two cases to handle (slope >= 1 and slope < 1). Will this dx = sign(x1 - x0) address both of these concerns?]
|
||||
[43:49][@Connor_Rentz][Do we ever do line drawing on Handmade Hero?]
|
||||
[44:03][@elxenoaizd][I'm still not 100% sure how Bresenham figured out 'if horizontal is better'. You mentioned they used the line equation y = mx+b. How does that help them in knowing if horizontal is better?]
|
||||
[46:38][@elxenoaizd][There were multiple extensions / optimizations done on Bresenham like drawing only half the line and mirroring it, and Run Slicing by Michael Abrash and Symmetric Double Step by Xialon Wu. Any thoughts on those?]
|
||||
[48:25][@Pseudonym73][Little-known fact, Bresenham's method predates framebuffers by about five years. It was actually designed for a drum plotter]
|
||||
[49:22][@arrrjt][I feel it should be deciding between "move right" and "move diagonally right and down", instead of either "left" or "down"]
|
||||
[50:53][@elxenoaizd][Can that method be used to draw wireframe triangles, or is there a faster way to draw wireframe triangles like flat-bottom / flat-top trigs?]
|
||||
[51:33][@XpansionPak][Is this ever used for uniform grid pathfinding?]
|
||||
[52:16][@nxsy][For tomorrow: Given an entity with position and current velocity and maximum acceleration, and a target position, how do you determine the correct acceleration (direction and speed) each frame so that you stop on the target point?]
|
||||
[53:55][@Pseudonym73][Oh, FYI, this is how I used to derive Bresenham's algorithm[ref
|
||||
site="Pastebin"
|
||||
page="Pseudonym73's derivation of Bresenham"
|
||||
url="http://pastebin.com/c7AGHAUT"]]
|
||||
[54:41][@elxenoaizd][Was the cast from float to int really expensive at the time vs nowaday? is bresenham still relavent today or can we get away with a naive line drawing algo with floating math?]
|
||||
[55:14][@nxsy][Acceleration is constrained to a maximum amount.]
|
||||
[56:04][@Longboolean][Was this also used for bezier curves?]
|
||||
[56:51][@cubercaleb][Off-topic but still on the topic of math: During these RSI streams do you think you could go over the math for replacing cmath, specifically the trig functions?]
|
||||
[57:07][@CaptainKraft][Does OpenGL have this stuff implemented already?]
|
||||
[57:14][@elxenoaizd][If you were to implement a line drawing function in Handmade Hero, what algorithm would you go for?]
|
||||
[58:01][Wrap things up]
|
||||
[/video]
|
|
@ -0,0 +1,21 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Inverse Kinematics" vod_platform=youtube id=rTF0PWnRUrw annotator=Miblo]
|
||||
[0:58][@elxenoaizd][What is Inverse Kinematics, how does it work and why do we care?]
|
||||
[2:05][Blackboard: Kinematics]
|
||||
[7:54][Blackboard: Degree of Freedom]
|
||||
[13:04][Blackboard: Summary of Kinematics]
|
||||
[13:48][Blackboard: End Effector]
|
||||
[15:03][Blackboard: Inverse Kinematics]
|
||||
[19:41]["I.K. is a nasty, nasty, nasty problem"][quote 372]
|
||||
[21:10][Blackboard: Inverse trigonometry is always harder than trigonometry]
|
||||
[24:36][Blackboard: Typically underdetermined and, if not, it's discontinuous]
|
||||
[32:37][Blackboard: Possible techniques for solving an underdetermined system]
|
||||
[35:08][Blackboard: Discontinuousness]
|
||||
[36:50][Blackboard: There are usually joint limits]
|
||||
[38:40][Blackboard: Operations research]
|
||||
[40:19][Blackboard: Linear complementarity solver \[see Resources\]]
|
||||
[43:04][Blackboard: Usually you don't need to mathematically accurately solve I.K. problems]
|
||||
[45:59][@Mr4thDimention][I would think boundary conditions would help to move you towards being more determined, so why don't each of those two problems reduce the severity of the other?]
|
||||
[47:52][@elxenoaizd][Thanks for the awesome answer. I was intending to use I.K. to solve for foot placement on uneven terrain, so we have an animation of the dude moving, and want to place his foot correctly on the ground. Is that hard?]
|
||||
[50:24][Blackboard: Cyclic coordinate descent]
|
||||
[52:52][Close it down]
|
||||
[/video]
|
|
@ -0,0 +1,15 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Partial Specialization" vod_platform=youtube id=QauD5cAgnT8 annotator=Miblo]
|
||||
[1:05][Blackboard: References Prevent Null Pointers?]
|
||||
[13:58][@kknewkles][What's the difference between interpretation and translation?]
|
||||
[19:45][@elxenoaizd][Please could you talk about the time-honoured tradition of games using offline rendered art for certain elements, while still using realtime art for other elements?]
|
||||
[22:17][Blackboard: Partial specialisation]
|
||||
[28:28][Blackboard: How this applies to Resident Evil or Final Fantasy]
|
||||
[33:47][Blackboard: Choosing which variables to keep]
|
||||
[38:27][Blackboard: Think anything I want to compute]
|
||||
[50:41][Blackboard: Light maps]
|
||||
[55:43][Q&A]
|
||||
[56:16][@elxenoaizd][This for me is by far is the best Handmade stream ever. You made my night! Couple of questions: 1) So I guess they did something similar to reflections to implement real-time shadows? 2) How did they achieve other effects like camera panning and lightning? 3) You still need an invisible level collision mesh, correct?]
|
||||
[1:04:27][@Phazyck][What if you are constrained on space as well as computing power? Could you pre-compute parts of your graphics, e.g. a shape from multiple angles of 5 degrees, and then do interpolation to get values that lie in between, e.g. a view of the shape at 7 degrees?]
|
||||
[1:05:39][Blackboard: Hack]
|
||||
[1:07:36][Wrap it up]
|
||||
[/video]
|
|
@ -0,0 +1,29 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Undefined Behavior" vod_platform=youtube id=dyI0CwK386E annotator=Miblo]
|
||||
[0:10][Set the stage for a chat]
|
||||
[3:29][@mr4thdimention][Is Milton successfully maintaining your data between versions?]
|
||||
[4:06][@mr4thdimention][Oh shoot! That first question wasn't my questions. I think a lot of people are interested in this UB buisness, and I am too so let's start there and see what comes up after?]
|
||||
[4:18][Blackboard: Undefined Behavior]
|
||||
[8:02][Blackboard: Intuitive vs Technically Correct]
|
||||
[12:14][Blackboard: Why would "anything" happen?]
|
||||
[15:54][Blackboard: x87 FPU]
|
||||
[19:35][Blackbard: Recent displays of "anything" and some serious bugs they cause]
|
||||
[22:16][Blackboard: Casey's personal experience with a bug of this nature]
|
||||
[26:33][Blackboard: On Chandler Carruth's talk[ref
|
||||
site=YouTube
|
||||
page="CppCon 2016: Chandler Carruth \"Garbage In, Garbage Out: Arguing about Undefined Behavior...\""
|
||||
url=https://www.youtube.com/watch?v=yG1OZ69H_-o]]
|
||||
[31:01][Blackboard: Why Casey doesn't find Chandler's talk persuasive]
|
||||
[34:42][Blackboard: Responsible specification writing]
|
||||
[41:34][Blackboard: "Wrapping", "Casting", "Implicit conversion"]
|
||||
[45:00][Blackboard: The essence of Mike Acton's CppCon talk, programming actual hardware[ref
|
||||
site=YouTube
|
||||
page="CppCon 2014: Mike Acton \"Data-Oriented Design and C++\""
|
||||
url=https://www.youtube.com/watch?v=rX0ItVEVjHc]]
|
||||
[54:16][@mr4thdimention][I am quite satisfied! Glad to have new stuff to think about]
|
||||
[57:59][@andrewjdr][Curious if you've experimented with different 3D polygon triangulation approaches (e.g. Projection to 2D + Ear-Clipping, Constrained Delaunay Triangulation, etc) and settled on something that you use under most circumstances?]
|
||||
[59:09][@andrewjdr][Yeah, concave[ref
|
||||
site="RAD Game Tools"
|
||||
page="Iggy Game UI"
|
||||
url="http://www.radgametools.com/iggy.htm"]]
|
||||
[1:03:38][Wind it down with a glimpse into the future of Handmade Hero from the Molly Rocket office]
|
||||
[/video]
|
|
@ -0,0 +1,31 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Imposter Syndrome" vod_platform=youtube id=NXsWViTB238 annotator=Miblo]
|
||||
[0:10][Set the stage for the day]
|
||||
[0:37][@nangtrongvuon][I'm a student struggling with imposter syndrome. I feel like I can't do anything and everyone is better than me. Your thoughts on this phenomenon?]
|
||||
[2:49][Am I any good at this thing, and at what level do I want to do it?]
|
||||
[7:17][What "Imposter Syndrome" describes]
|
||||
[8:57][On overvaluing other programmers' ability and internalising the difficult and mistake-filled process of programming]
|
||||
[15:47][The process of programming and expecting problems when first starting out]
|
||||
[17:45][Programming aptitude]
|
||||
[21:33][Verifying whether we are (perceiving ourselves to be) failing]
|
||||
[25:24][Factors that go into making a good programmer]
|
||||
[26:22][On developing Asteroids in order to determine whether or not we can program, and why]
|
||||
[32:33][Are you willing to work at being a good programmer?]
|
||||
[34:42][Learning curve]
|
||||
[38:06][On overcoming the emotional response to the question]
|
||||
[40:32][Q&A]
|
||||
[41:18][Summary of ways to address imposter syndrome]
|
||||
[43:04][@thisdrunkdane][How to battle the urge to have 100 different small projects around and stay focused on a single project?]
|
||||
[48:10][Always finish a project]
|
||||
[49:15][Some potential value in having more than one project]
|
||||
[51:19][@mr4thdimention][(This is slightly related to one thing you said) I have been getting the feeling that programmers in general are bad at taking objective measurements of things like "how good am I?", with maybe the exception of how long a chunk of code takes. Would you agree with that assessment and do you think we suffer a lot because of it?]
|
||||
[55:12][@tinyconstruct][Somewhat related / a final update on the TA we talked about. His talk on ray tracer efficiency when he got to the GPU side of things basically broke down into "Use OptiX, GPU programming is hard." So... I don't even know, dude]
|
||||
[56:55][@burgerlove_][Let's say you are someone who is really drawn to starting and growing your own projects in a tough industry like this. While some people are getting experience at big studios, you're fighting through the details of smaller projects. Do you think in the long run it could really hurt you because of how you look on paper?]
|
||||
[59:28][@jasperps][My largest frustration currently is that large sections of my code currently get rejected or rewritten in review. Is there are anything I can do proactively to help myself write more efficient code, i.e. teach myself how to approach some problems better? A lot of the patterns I used regularly are turning out to be sub-optimal]
|
||||
[1:01:55][@thisdrunkdane][By the way, I thought the Molly Rocket office didn't have internet?]
|
||||
[1:03:11][@empiretycoon][Hey Casey! I'm new to programming, have been studying Information System for two years. My problem is, I can't start projects at all, I always get stuck and by the end of the day I get nothing done. All that I wanted was to start something to improve my skills. Been following the stream for a while, what should I do?]
|
||||
[1:05:04][@remele][What is the thought process behind not having the internet? Is it for staying on task (avoiding distraction) or for some other reason? How do you look up documentation and things of that nature?]
|
||||
[1:09:47][@hoshoyo][Do you think web programmers simply don't aspire to be better programmers, don't know what good programming is or simply don't care? What should we do to unchain their minds from this evil?]
|
||||
[1:14:15][Shared delusion in web programming]
|
||||
[1:16:37][@empiretycoon][For example, one day I decided to write a small game in an engine, but instead of doing that I spent the whole day reading through the engine documentation and video tutorials. By the end of the day I got nothing accomplished and got burned out on it]
|
||||
[1:27:56][Sign off]
|
||||
[/video]
|
|
@ -0,0 +1,89 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="Translation Units, Function Pointers, Compilation, Linking, and Execution" vod_platform=youtube id=n4fI4eUTTKM annotator=Miblo]
|
||||
[0:08][Set the stage for the chat]
|
||||
[1:45][Read @Nacre314's email regarding typedef'ing of functions]
|
||||
[6:59][A few words on C never having reached maturity on the relationship between code and data]
|
||||
[9:29][On departing from batch files]
|
||||
[12:50][Create nacre314 directory and main.cpp]
|
||||
[15:39][Compilation vs Linking]
|
||||
[17:52][The compiler as an auto-detecting stream processor]
|
||||
[21:14][Create main2.c, and #include it in main.cpp as a way to make the compiler aware of this file]
|
||||
[26:16][Translation units, as evinced by passing individual files to the compiler, versus using the #include approach]
|
||||
[32:42][C, as opposed to C++, can assume which arguments a function takes without having seen its declaration]
|
||||
[38:58][Linking]
|
||||
[45:33][Looking at our linker output and our compiled .obj files]
|
||||
[48:44]["I don't know how to use cars"][quote 566]
|
||||
[48:55][Use dumpbin to inspect main.obj, and note that Bar() is without a known address]
|
||||
[56:09][Inspect main3.obj, with its corresponding indicator for Bar()]
|
||||
[58:59][The linker prepares an executable that conforms to the OS standard]
|
||||
[1:00:47][Call main() in main.cpp and successfully link]
|
||||
[1:03:12][C runtime standard library, as implicitly included by Windows]
|
||||
[1:08:42][Set LIB to nothing and note that linking now fails]
|
||||
[1:12:04][Create build.bat to control each step in the compilation / linking process]
|
||||
[1:17:16][Entry point, mainCRTStartup()]
|
||||
[1:23:49][C++ name mangling]
|
||||
[1:26:44][Use extern "C" to make the compiler comply with the C rules]
|
||||
[1:29:33][Specifying the SUBSYSTEM to enable the linker to recognise this as the entry point on Windows]
|
||||
[1:35:01][Inspect the .exe output of the linker]
|
||||
[1:39:15][Function pointers]
|
||||
[1:42:48][main.cpp: Introduce void *FunctionPointer = Foo() and inspect the .obj file]
|
||||
[1:47:30][Dereferencing a function pointer]
|
||||
[1:49:32][Relative addressing and Address Space Layout Randomization (ASLR)]
|
||||
[1:53:48][Manually deference the function pointer pointing to Foo()]
|
||||
[1:57:34][main.cpp: Introduce Five() and watch it operate in the debugger]
|
||||
[2:03:18][How C calls a function[ref
|
||||
site=Wikipedia
|
||||
page="Application binary interface"
|
||||
url=https://en.wikipedia.org/wiki/Application_binary_interface]]
|
||||
[2:07:47][Using typedef on the function signature in order to enable the compiler to generate the preamble to a call instruction]
|
||||
[2:14:11][main.cpp: Introduce CodeForFive\[\] to contain the code for Five() as an array of characters]
|
||||
[2:16:58][Inspect the .data section in our COFF .obj file]
|
||||
[2:24:08][Step through our call to CodeForFive\[\] and hit the access violation for the attempt to execute code not marked as executable]
|
||||
[2:26:43][VirtualAlloc()[ref
|
||||
site=MSDN
|
||||
page="VirtualAlloc"
|
||||
url=https://msdn.microsoft.com/en-us/library/windows/desktop/aa366887] and Memory Protection Constants[ref
|
||||
site="MSDN"
|
||||
page="Memory Protection Constants"
|
||||
url="https://msdn.microsoft.com/en-us/library/windows/desktop/aa366786"]]
|
||||
[2:35:13][Step through our call to VirtualAlloc() and on to CodeForFive\[\]]
|
||||
[2:38:58][main.cpp: Enable CodeForFive\[\] to return any 4-byte value]
|
||||
[2:42:49][Relative calls, using address offsets and function sizes]
|
||||
[2:55:23][main.cpp: Rename CodeForFive\[\] to Code\[\] and enable it to perform a relative call to Five()]
|
||||
[3:01:39][Step through our generated relative call to Five()]
|
||||
[3:04:16][The code that the compiler generates is just bytes]
|
||||
[3:05:48][Multiple separate executable pieces]
|
||||
[3:07:57][How programs were executed historically, before multitasking operating systems]
|
||||
[3:10:53][Secondary link phase that happens upon loading an executable]
|
||||
[3:12:48][Import libraries, kernel32.lib as a dynamically linked library (dll), and what Windows' dynamic linker does]
|
||||
[3:22:38][Compare the hex dump of main.exe with the running code after being dynamically linked]
|
||||
[3:35:46][The linker links with an expectation of what the base address probably would be]
|
||||
[3:37:05][Continue to compare the raw data before and after dynamic linking]
|
||||
[3:41:38][How Handmade Hero uses Windows' mechanism for dynamic linking in order to perform hot reloading]
|
||||
[3:44:31][Inspect the dumpbin imports and exports for win32_handmade.exe and handmade.dll]
|
||||
[3:48:17][Portable Executable[ref
|
||||
site="Wikipedia"
|
||||
page="Portable Executable"
|
||||
url="https://en.wikipedia.org/wiki/Portable_Executable"]]
|
||||
[3:50:01][The CPU is executing code somewhere, indicated by the contents of the RIP register]
|
||||
[3:54:13][The stack location is referenced off the RSP register]
|
||||
[3:55:37][Q&A]
|
||||
[3:56:24][@pseudonym73][Worth a plug[ref
|
||||
site="The Invincible Electric Calculator Company"
|
||||
page="Linkers and Loaders"
|
||||
url="https://www.iecc.com/linker/"]]
|
||||
[3:57:20][@butwhynot1][Technically, you need to call FlushInstructionCache when you generate code]
|
||||
[3:59:26][FlushInstructionCache[ref
|
||||
site="MSDN"
|
||||
page="FlushInstructionCache"
|
||||
url="https://msdn.microsoft.com/en-us/library/windows/desktop/ms679350"]]
|
||||
[4:01:36][main.cpp: Demo usage of FlushInstructionCache()]
|
||||
[4:08:35][@insofaras][I think something like /SECTION:.data,RWE and /NXCOMPAT:NO to link.exe might work for the non-VirtualProtect code in array thing]
|
||||
[4:09:30][@nacre314][Maybe this episode belongs in the Intro to C week as episode 6?]
|
||||
[4:09:39][@user549][Maybe the smallest crt ever[ref
|
||||
site="suckless"
|
||||
page="suckless C compiler/crt.s"
|
||||
url="http://git.suckless.org/scc/tree/crt/amd64-sysv-linux/crt.s"] ]
|
||||
[4:10:02][@filiadelski][Is there a low-level reason you don't like virtual functions? My understanding of them is that they're basically just function pointers in a table that is dereferenced]
|
||||
[4:11:45][@ingenero][First of all, thank you so much for this stream! At the beginning you mentioned you hadn't done some of these things for a while. My question is, in what context did you originally learn and apply all this information? It seems like spending time at work exploring this may be considered time taken away from actually being "productive". Is it just something you have to learn on your own time?]
|
||||
[4:15:07][Wrap it up there]
|
||||
[/video]
|
|
@ -0,0 +1,62 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=chat title="CRTP and Library Design" vod_platform=youtube id=EhtxDXlrJ6Y annotator=Miblo]
|
||||
[0:08][Recap yesterday's graphics driver crash and determine to set up an external streaming system]
|
||||
[4:20][Invite questions and suggestions]
|
||||
[6:38][@vaualbus][How do you write a program that is graphics driver crash aware?]
|
||||
[8:36][Install and run Process Explorer, and consider graphics driver crashes[ref
|
||||
site="Microsoft"
|
||||
page="Process Explorer v16.21"
|
||||
url="https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer"]]
|
||||
[14:37][Making your app graphics card crash proof: 1) Always check for valid contexts]
|
||||
[15:45][Making your app graphics card crash proof: 2) Use fault handlers]
|
||||
[16:28][How OBS could handle faults, just protect and flush the stream on crash]
|
||||
[17:25][Shutting down gracefully and relaunching your application]
|
||||
[18:40][@crazy_coder456][How many episodes remaining, estimate?]
|
||||
[19:39][@sgtrumbi][Do you use C++ features like templates? Do you use polymorphism in your own projects?]
|
||||
[22:47][@bpaf][What do you think about the CRTP to do polymorphism?[ref
|
||||
site="Wikipedia"
|
||||
page="Curiously recurring template pattern"
|
||||
url=https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern]]
|
||||
[25:18][crtp.cpp: Curiously recurring template pattern]
|
||||
[27:28][crtp.cpp: The template<struct Something> syntax]
|
||||
[31:29][Consider ramifications of templates]
|
||||
[34:40][crtp.cpp: Using a union in a parent struct to contain entity types]
|
||||
[37:10][crtp.cpp: C++'s "struct entity_ghost \: public entity" inheritance syntax]
|
||||
[40:59][crtp.cpp: Consider ramifications of the inheritance model]
|
||||
[45:42][crtp.cpp: Making the derived class more primal]
|
||||
[50:06][Polymorphic copy construction, virtual functions and the copy constructor[ref
|
||||
site="Wikipedia"
|
||||
page="Curiously recurring template pattern"
|
||||
url=https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern]]
|
||||
[56:44][crtp.cpp: Spec out our desired Clone() function, using a union in the parent shape struct to contain shape_rectangle and shape_circle, and a switch statement in Clone()]
|
||||
[1:00:20][crtp2.cpp: Attempt this in a C++ way]
|
||||
[1:04:03][crtp2.cpp: Run-time type information[ref
|
||||
site="Wikipedia"
|
||||
page="Run-time type information"
|
||||
url="https://en.wikipedia.org/wiki/Run-time_type_information"]]
|
||||
[1:09:34][crtp2.cpp: Virtual function call for Clone() in the structs]
|
||||
[1:11:08][crtp2.cpp: Base class containing a pure virtual function for cloning, and a shape_cloner templatised struct]
|
||||
[1:14:57][@bpaf][I didn't want to use virtual functions, so when I found this I was super happy]
|
||||
[1:15:46][Polymorphic chaining[ref
|
||||
site="Wikipedia"
|
||||
page="Curiously recurring template pattern"
|
||||
url=https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern]]
|
||||
[1:20:18][@bpaf][My use case is: I write a library, and I want users of the library to provide their own structs for me to do my library business on, so I need polymorphism one way or another and, since it's a simulation, I want to remove all of the runtime cost I can incur]
|
||||
[1:21:56][@bpaf][You got it, I have to call them back]
|
||||
[1:22:17][@bpaf][They define a game, and I define in the library a genetic programming framework to find players that play well at them]
|
||||
[1:23:27][@bpaf][In particular I create trees (S-expressions) that contain terminals that are defined by the game, which operate on the game state, and then evaluate those games that contains IF, >, == etc, as well as the game terminals, and then make players out of random trees, and do tournaments between each other]
|
||||
[1:24:30][crtp2.cpp: Spec out an idea for bpaf's library, using an operate_type enum with the library ops occupying the high values]
|
||||
[1:28:27][@bpaf][How would you pass the information needed to create random operations to the library, from the user, in this framework?]
|
||||
[1:28:43][crtp2.cpp: Spec out CreateRandomOpCallback()]
|
||||
[1:31:14][Consider library design]
|
||||
[1:36:12][@bpaf][The thing I liked about the CRSP approach is that it makes somewhat clear what the "interface" is, you have to implement these methods, and have this data, and I can do the genetic tournament job]
|
||||
[1:38:17][@bpaf][Your idea is interesting: you extend the enum. It's not that hard to understand]
|
||||
[1:39:46][@bpaf][Here's a thing, if I want to generate trees for different choices, that need different languages, I use multiple template parameters]
|
||||
[1:40:31][@bpaf][By different choices I mean, you could have two choices for a game turn, and you might want to have trees that use terminals that look at different aspects of the game]
|
||||
[1:41:05][@bpaf][For example, imagine a game when you have the choice to play or pass, and if you decide to play you then have to make a move]
|
||||
[1:41:17][crtp2.cpp: Spec out a GameStateAllowsMeToDoThese condition]
|
||||
[1:42:47][@bpaf][No, the player doesn't generate random operations, the library generates random trees, and evaluates them]
|
||||
[1:43:30][@bpaf][Hehe, yeah, it's complicated]
|
||||
[1:43:57][On picking the things that your library does and does not do]
|
||||
[1:47:49][Blackboard: Node Graph Disaster Zone]
|
||||
[1:53:28][Wind it down]
|
||||
[/video]
|
|
@ -0,0 +1,134 @@
|
|||
/* Search */
|
||||
|
||||
.dayContainer.hero,
|
||||
#cineraIndex.hero dt {
|
||||
background-color: #161616;
|
||||
}
|
||||
|
||||
.dayContainer:nth-child(2n).hero,
|
||||
#cineraIndex.hero dt:nth-child(2n) {
|
||||
background-color: #303030;
|
||||
}
|
||||
|
||||
.dayContainer.hero > .dayName,
|
||||
#cineraIndex.hero dt a {
|
||||
color: #8A877D;
|
||||
}
|
||||
|
||||
.markerList.hero > .marker
|
||||
{
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.markerList.hero > .marker b {
|
||||
color: black;
|
||||
background-color: rgb(255, 155, 0);
|
||||
}
|
||||
|
||||
.markerList.hero > .marker:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
/* Player */
|
||||
|
||||
.title.hero,
|
||||
.title.hero .menu .refs,
|
||||
.title.hero .menu > .refs .ref,
|
||||
.markers_container.hero,
|
||||
.markers_container.hero > .marker {
|
||||
background-color: #161616;
|
||||
border-color: #000;
|
||||
}
|
||||
|
||||
.title.hero,
|
||||
.title.hero .menu > .refs .ref,
|
||||
.markers_container.hero > .marker > .content {
|
||||
color: #8A877D;
|
||||
}
|
||||
|
||||
.title.hero .menu {
|
||||
transition: box-shadow 800ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
box-shadow: inset 0 0 0 #B57714;
|
||||
}
|
||||
|
||||
.title.hero .menu:hover,
|
||||
.title.hero .menu > .refs .ref:hover,
|
||||
.markers_container.hero > .marker:hover > .content {
|
||||
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.title.hero .menu.current {
|
||||
box-shadow: inset 0px 0px 30px #B57714;
|
||||
}
|
||||
|
||||
.title.hero .menu > .refs .ref.current,
|
||||
.markers_container.hero > .marker .progress .content {
|
||||
background-color: #8B3D23;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.title.hero .menu > .refs .ref .source,
|
||||
.title.hero .menu > .refs .ref .quote_byline {
|
||||
color: #6B3E0B;
|
||||
}
|
||||
|
||||
.title.hero .menu > .refs .ref.current .source,
|
||||
.title.hero .menu > .refs .ref.current .quote_byline {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.title.hero .menu > .refs .ref.current:hover,
|
||||
.markers_container.hero > .marker:hover .faded .content {
|
||||
background-color: rgba(139, 61, 35, 0.7);
|
||||
}
|
||||
|
||||
.title.hero .menu > .refs .ref .timecode:hover {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
/* Regular */
|
||||
.markers_container.hero > .marker.current > .content {
|
||||
color: #B57714;
|
||||
}
|
||||
|
||||
/* Blackboard */
|
||||
.markers_container.hero > .marker.blackboard {
|
||||
background: #000;
|
||||
border-color: #161616;
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker.blackboard > .content {
|
||||
color: #D7BA82;
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker:hover.blackboard > .content {
|
||||
background: #111;
|
||||
}
|
||||
|
||||
/* Run */
|
||||
.markers_container.hero > .marker.run > .content,
|
||||
.markers_container.hero > .marker.run > .progress .content,
|
||||
.markers_container.hero > .marker:hover.run > .faded .content {
|
||||
background: hsla(128, 16%, 64%, .2);
|
||||
background-image: linear-gradient(to right, blue 4%, black 4%, black 96%, red 4%),
|
||||
linear-gradient(to bottom, blue 4%, black 4%, black 96%, red 4%),
|
||||
/*#236a58*/
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker.run > .content {
|
||||
color: #D7BA82;
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker:hover.run > .content {
|
||||
background: #111;
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker.run > .progress .content {
|
||||
color: #D7BA82;
|
||||
}
|
||||
|
||||
.markers_container.hero > .marker:hover.run > .faded .content {
|
||||
background: #111;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Setting Up the Windows Build" vod_platform=youtube id=Ee3EtYb8d1o annotator=jacebennett annotator=Miblo annotator=Mannilie annotator=theinternetftw annotator=wheatdog]
|
||||
[0:46][Course of the Handmade Hero series]
|
||||
[3:04][Start the project]
|
||||
[5:06][Command line in Windows]
|
||||
[7:04][Create a virtual drive]
|
||||
[10:18][Meaning of the misc folder]
|
||||
[11:46][Create the first code file]
|
||||
[12:48][Comment header Emacs put in]
|
||||
[14:37][Minimum code you will need]
|
||||
[19:45][Configure everything for development]
|
||||
[48:40][Debug with Visual Studio]
|
||||
[53:00][Windows-specific things you should know]
|
||||
[59:04][Add something to do for the program]
|
||||
[1:02:00][Import a library]
|
||||
[/video]
|
|
@ -0,0 +1,84 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Setting Up the Windows Build - Q&A" vod_platform=youtube id=uxbJo5DDpWY annotator=jacebennett annotator=Miblo]
|
||||
[0:35][Could you show how you added the Handmade Hero directory to the path?]
|
||||
[3:44][Do all Windows programs written in C/C++ use WinMain? Does The Witness have the same started code?]
|
||||
[4:48][What is the difference between Microsoft's compiler and gcc?]
|
||||
[6:27][What type of milk are you drinking?]
|
||||
[6:33][How do you write a renderer that is hardware accelerated?]
|
||||
[6:46][Can we get your .emacs file? Do you always code without line numbers?]
|
||||
[6:59][Will there be a sushi bar in Handmade Hero?]
|
||||
[7:03][*Question regarding the linker and IDE*]
|
||||
[8:16][Is there a reason you didn't use the developer command line shortcuts?]
|
||||
[9:21][How much experience do you have audio processing code?]
|
||||
[9:33][*Asking whether we'll be setting up things in the Mac OS and Linux environment as well*]
|
||||
[9:45][Will it be a 2D or 3D game?]
|
||||
[10:26][2-hour streams?]
|
||||
[10:37][What style of game are you making? ETA for the game?]
|
||||
[11:08][Will the game be Windows-only?]
|
||||
[11:30][Will you do extended live streams?]
|
||||
[11:56][Can you show the command line parameters that you set in the shortcut?]
|
||||
[13:25][What is your favorite Linux distro?]
|
||||
[13:52][Will I be able to follow you just using VS 2013 Community Edition?]
|
||||
[15:04][Will the game have multiplayer?]
|
||||
[16:02][Can you please remove the parentheses in return(0);]
|
||||
[16:11][When can we get some details on the actual game?]
|
||||
[16:31][Why don't you just compile directly in Visual Studio?]
|
||||
[17:26][How does it feel having more than 700 viewers on the stream?]
|
||||
[19:18][*Question regarding command line and the visual debugger*]
|
||||
[21:29][What GDB frontend do you use on Linux?]
|
||||
[21:35][What did yo uwork on while working on Bink video?]
|
||||
[24:00][Will you look at the chat for viewer answers while you work?]
|
||||
[24:07][*Request to do 5-hour streams*]
|
||||
[25:12][Is there a design document?]
|
||||
[26:37][Are we able to open source our own implementations?]
|
||||
[27:23][Fixed point or floating point For the audio representation in the game?]
|
||||
[27:30][*Comment about the C/C++ specification*]
|
||||
[28:01][Are you staying on Windows for the bulk of the show?]
|
||||
[29:31][Do you have *everything* planned?]
|
||||
[30:00][Why don't you run Windows 8.1?]
|
||||
[31:18][*Comment that mentions the Doom 3 source code*]
|
||||
[31:31][*Comment about getting an intern*]
|
||||
[32:00][*Question regarding Twitch quality settings*]
|
||||
[32:27][Any chance you could stream earlier?]
|
||||
[33:25][Will you have an actual repo for the project?]
|
||||
[33:53][Which better-debugger Linux projects are you looking forward to?]
|
||||
[34:17][Windows 7 doesn't support AVX2.]
|
||||
[34:42][*Question regarding repo again (answered in 33:25)*]
|
||||
[35:04][Did you consider doing a Kickstarter for this series?]
|
||||
[37:43][*Remark about Twitch stream quality*]
|
||||
[37:55][*Almond milk powerup confirmed*]
|
||||
[38:15][*Setting up a poll to decide best time to stream on Fridays*]
|
||||
[38:40][What do you think about learning math concepts on Wikipedia?]
|
||||
[39:25][*C++ interfacint with API that deals with a dedicated graphics card*]
|
||||
[39:40][*We are all excited that you're doing this in C*]
|
||||
[40:11][*Another Kickstarter comment*]
|
||||
[40:46][*Remark about having a 3D sequel*]
|
||||
[41:56][Would you consider dropping the framerate/]
|
||||
[42:16][*Wrist glove powerup NOT confirmed*]
|
||||
[42:30][Could you recommend some good books? Tutorials?]
|
||||
[43:35][*Clearing up confusion with C++ structs (related: 52:35)*]
|
||||
[45:44][*How we'll transition to take advantage of hardware acceleration*]
|
||||
[46:10][Can you make constructors in C++ structs?]
|
||||
[46:29][*Yet another Kickstarter comment*]
|
||||
[47:32][Are you planning to have descriptive names for the Youtube archive videos?]
|
||||
[48:00][*30 FPS game confirmed*]
|
||||
[48:13][What's up with the Handmade Hero icon on the Twitch page?]
|
||||
[48:24][*Benefits of learning things from scratch*]
|
||||
[50:30][#milkhit]
|
||||
[50:35][Will you ditch the #include <Windows.h>?]
|
||||
[50:44][How often do you use the debugger?]
|
||||
[51:02][Why do you scope the for-loop the way you do? (Muratori For Syntax)]
|
||||
[51:31][*Micro-transactions are all the rage. Suggestion to use them*]
|
||||
[52:20][Will there be an option to pre-order as a gift for a friend?]
|
||||
[52:35][*Difference between C and C++ structs*]
|
||||
[53:12][*Suggestion on putting a green screen behind Casey*]
|
||||
[53:21][Will sound effects be implemented right away?]
|
||||
[53:46][*Twitch partnership is a possibility (?)*]
|
||||
[54:06][How do you plan to design a good game?]
|
||||
[56:50][Why start from scratch?]
|
||||
[1:02:10][Set up an official forum?]
|
||||
[1:04:02][Why not code in just pure C or pure C++?]
|
||||
[1:06:30][Is there a game dev company you really admire?]
|
||||
[1:08:17][Where do most of your audience come from?]
|
||||
[1:10:28][SDL or SFML?]
|
||||
[1:10:54][*Closing Remarks*]
|
||||
[/video]
|
|
@ -0,0 +1,11 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Opening a Win32 Window" vod_platform=youtube id=4ROiWonnWGk annotator=jacebennett annotator=dspecht annotator=Miblo annotator=Mannilie annotator=theinternetftw]
|
||||
[3:20][WNDCLASS Implementation start]
|
||||
[4:40][Struct explanation of why Windows Documentation is the way it is]
|
||||
[9:38][Initialization of WNDCLASS]
|
||||
[21:57][CALLBACK explanation and basic implementation]
|
||||
[36:41][Registering the WindowClass]
|
||||
[38:50][CreateWindowEx()]
|
||||
[44:10][Windows Message queue | GetMessage()]
|
||||
[51:00][Drawing something with WM_PAINT]
|
||||
[57:00][Switching between drawing BLACKNESS and WHITENESS]
|
||||
[/video]
|
|
@ -0,0 +1,20 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Opening a Win32 Window - Q&A" vod_platform=youtube id=d003_D-9EnY annotator=jacebennett annotator=Miblo]
|
||||
[1:32][Question about Atoms in Windows API]
|
||||
[2:17][Can you go fullscreen?]
|
||||
[2:40][Improving the way things are shown on stream]
|
||||
[3:02][What's the fastest path for getting a pixel on the screen on Windows?]
|
||||
[4:45][Dealing with ANSI strings]
|
||||
[6:09][Do you use always the same technique for creating a fullscreen window?]
|
||||
[6:38][Is the for-loop just for keeping the window alive?]
|
||||
[8:26][Can I preorder the Epilepsy Simulator?]
|
||||
[8:48][Do we want the player to resize our window?]
|
||||
[9:09][Can you experiment what happens when you take out CS_HREDRAW and CS_VREDRAW?]
|
||||
[10:31][Any considerations for 64-bit on tonight's code?]
|
||||
[13:42][Using const qualifier]
|
||||
[14:55][Compilation issue]
|
||||
[17:23][You're nesting quite a lot of blocks.]
|
||||
[18:04][My app doesn't respond to the window's close button]
|
||||
[20:15][for(;;) vs. while(true)]
|
||||
[22:29][Can you explain the Window Handler one more time?]
|
||||
[33:47][Closing remarks]
|
||||
[/video]
|
|
@ -0,0 +1,32 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Allocating a Back Buffer" vod_platform=youtube id=GAi_nTx1zG8 annotator=jacebennett annotator=Miblo annotator=Mannilie annotator=theinternetftw]
|
||||
[0:50][Short overview about a backbuffer]
|
||||
[2:56][Windows message callback]
|
||||
[4:43][Closing the window (PostQuitMessage function)]
|
||||
[9:10][about resource handling]
|
||||
[12:46][Back to closing the window]
|
||||
[15:56][about global variables]
|
||||
[17:00][Different meanings of static: internal, global_variable, local_persist]
|
||||
[22:47][Backbuffer, windows, GDI and us.]
|
||||
[23:29][resizeDIBSection() created]
|
||||
[26:06][GetClientRect()]
|
||||
[30:49][CreateDIBSection() created]
|
||||
[31:39][StretchDIBits()]
|
||||
[38:31][CreateDIBSection() usage and explanation]
|
||||
[48:19][About freeing and creating a new DIBSection]
|
||||
[53:42][Device context and Win32ResizeDIBSection()]
|
||||
[1:03:23][Q&A]
|
||||
[1:03:37][ssylvan: Remark on not needing to use CreateDIBSection/CreateCompatibleDC and just allocating the array ourselves]
|
||||
[1:06:47][Remark on the change to the archiving of Q&A sessions (they are now combined with the main day video)]
|
||||
[1:08:37][Will you be using sleep()?]
|
||||
[1:08:59][Could you go back through how you got Visual Studio to cooperate?]
|
||||
[1:09:52][Are other windowing systems less crazy to work with?]
|
||||
[1:12:20][Are you going to do a more detailed Intro To C series alongside this one?]
|
||||
[1:13:40][Can you explain what exactly a void* is? A pointer to nothing?]
|
||||
[1:20:03][Any new thoughts on IMGUI since you made that video a few years ago?]
|
||||
[1:21:15][ssylvan: Follow up on the previous remark about StretchDIBits, it can take a custom array as long as it is DWORD aligned]
|
||||
[1:23:13][When will the source be available?]
|
||||
[1:23:30][When using emacs, I find it hard to use meta key with F and B to skip words, how do you do it so fast?]
|
||||
[1:23:48][How come !=0 is true in C, and return values of main and functions is 0 if everything is okay?]
|
||||
[1:26:18][Sean Barrett: Remark on functions with multiple return values "Pre ANSI C didn't allow return structs"]
|
||||
[1:28:24][Any reason you put the type in a line above the function name?]
|
||||
[/video]
|
|
@ -0,0 +1,52 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Animating the Back Buffer" vod_platform=youtube id=hNKU8Jiza2g annotator=jacebennett annotator=Miblo]
|
||||
[0:30][Correction about StretchDIBits()/BitBlt()]
|
||||
[5:20][Writing our custom BitmapMemory allocator. (Note about aligned/unaligned byte access)]
|
||||
[7:13][Basic math to determine the bytes needed for BitmapMemorySize. 'Width * Height * BytesPerPixel']
|
||||
[7:57][Description and usage of VirtualAlloc(), the WIN32 memory allocation function we will be using]
|
||||
[13:15][Making sure we free any allocated memory before we resize, using VirtualFree()]
|
||||
[15:20][Aside about VirtualProtect(), useful to prevent stale pointers and "use after free" bugs]
|
||||
[16:49][Step through of Win32ResizeDIBSection()]
|
||||
[17:45][Changing Win32UpdateWindow() to use BitmapMemory]
|
||||
[19:30][Adding Bitmap dimensions as global variables (temporarily)]
|
||||
[20:00][Setting Bitmap Width/Height and using them in Win32ResizeDIBSection()]
|
||||
[20:20][Setting Window Width/Height in Win32UpdateWindow()]
|
||||
[21:57][Notes on storing a 2D image inside a 1D "block" of memory. Pitch/Stride.]
|
||||
[24:30][Setting biHeight to a negative number to ensure the window framebuffer uses a top-down coordinate system with its origin in the top left corner]
|
||||
[25:59][Note on getting MSVC to give full paths to files in the build output log. (Add -FC to build.bat) Allows emacs to jump between build errors]
|
||||
[27:00][BUGFIX: Win32UpdateWindow() definition change]
|
||||
[27:45][Drawing pixels into the bitmap]
|
||||
[29:05][Adding typedefs for specific type sizes]
|
||||
[30:39][Casting void* to different size types to make pointer arithmetic simpler for bitmap access]
|
||||
[33:36][Pixel component layout in memory on Win32. Flipped to read RGB when viewed in the memory registers.]
|
||||
[38:10][Drawing pixel colors based on the X and Y]
|
||||
[40:10][Moving bitmap rendering into RenderWeirdGradient()]
|
||||
[42:40][Adding animation and switching GetMessageA() for PeekMessage() so that Windows doesn't block]
|
||||
[45:23][Making sure we handle WM_QUIT inside our PeekMessage() loop]
|
||||
[46:23][Adding XOffset/YOffset variables to the main loop, ++1 them each time through the loop]
|
||||
[47:40][BUGFIX: Adding our window blitting function (Win32UpdateWindow()) to the main loop, so the bitmap will blit each time through the loop]
|
||||
[50:25][Changing "WindowHandle" to "Window" and "WindowRect" to "ClientRect"]
|
||||
[51:56][FINALLY ANIMATION!]
|
||||
[54:25][Changing DrawWeirdGradient() to use a 32-bit pointer and write each pixel in one call using bitwise operations]
|
||||
[58:38][Verification of lack of memory leaks]
|
||||
[59:44][TOTAL SYSTEM MELTDOWN]
|
||||
[1:02:07][Q&A]
|
||||
[1:02:10][Is there a reason you prefer using 0 instead of NULL?]
|
||||
[1:03:18][Clarification about sized typedefs]
|
||||
[1:04:58][What would happen if you called malloc() instead of VirtualAlloc()?]
|
||||
[1:05:32][What's the difference between malloc and new and HeapAlloc()?]
|
||||
[1:06:27][Do you think you could go as slow as you did previous days in the future?]
|
||||
[1:07:27][Are we going to use Valgrind in the future?]
|
||||
[1:07:43][Is the project going to take 2 years?]
|
||||
[1:08:10][Can you explain why we are using the user32.lib and gdi.lib in the build.bat?]
|
||||
[1:08:42][Would there be a significant performance increase if we allocated the memory for the bitmap on the stack instead of the heap?]
|
||||
[1:10:27][Do you know what the PAGE_WRITECOPY Memory Protection flag does?]
|
||||
[1:15:52][About bytes per pixel and bitmap memory layout. Pitch/Stride. Pitch is byte offset between rows.]
|
||||
[1:19:49][You mentioned xxBBGGRR because of little endian, why was the blue channel set in this case instead of the padding?]
|
||||
[1:21:30][Could the padding byte be used as an alpha channel here?]
|
||||
[1:22:06][Why are we having a wait symbol on the window?]
|
||||
[1:22:50][Could you explain the offset to X and Y?]
|
||||
[1:24:00][About the global_variables and the static keyword]
|
||||
[1:28:15][Static doesn't give you zero on initialization?]
|
||||
[1:29:38][Do you consider overflowing numbers to be a good coding practice?]
|
||||
[1:30:23][Note about statics and extern global variables being initialized to zero]
|
||||
[/video]
|
|
@ -0,0 +1,35 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Windows Graphics Review" vod_platform=youtube id=w7ay7QXmo_o annotator=jacebennett annotator=Miblo]
|
||||
[1:09][Brief overview of the week's work.]
|
||||
[2:13][Capture card considered unneccesary?]
|
||||
[3:07][Value of HREDRAW and VREDRAW]
|
||||
[4:48][Helping the compiler optimize by avoiding unnecessary pointers]
|
||||
[6:30][Explanation of pointer aliasing]
|
||||
[11:44][What difference does it make if I put a declaration inside a loop instead of outside it?]
|
||||
[18:30][Where to get Liberation Mono, the font Casey uses.]
|
||||
[19:34][Dealing with global variables more cleanly by bundling them up into structures]
|
||||
[28:58][Making a global backbuffer]
|
||||
[29:59][Explanation of Access Violations]
|
||||
[33:16][Aside about types of errors you find in code]
|
||||
[37:12][GetWindowDimension() created]
|
||||
[41:02][Why keep using Width/Height instead of win32_window_dimension?]
|
||||
[43:38][Changing the backbuffer to be fixed size]
|
||||
[47:17][Full step-through with in-depth analyis of program behavior]
|
||||
[52:44][Deep dive on the size of the stack]
|
||||
[55:50][STACK OVERFLOW ACHIEVED]
|
||||
[1:01:45][Step-through resumed]
|
||||
[1:23:35][Q&A]
|
||||
[1:24:06][Would it be a good or bad idea to get one DeviceContext at the beginning of the program and use that for every iteration of the main loop?]
|
||||
[1:26:06][Chihuahua on speed confirmed]
|
||||
[1:26:22][Why do you tell Windows you handle messages you don't really handle?]
|
||||
[1:29:06][I believe SetStretchBltMode() will allow you to get better quality stretching.]
|
||||
[1:29:40][Can you please explain pointer aliasing again?]
|
||||
[1:45:47][:Owl of Shame Moment: Pointer aliasing explanation fail]
|
||||
[1:49:26][Proper pointer aliasing explanation]
|
||||
[1:57:22][I was under the impression that the stack always grows downwards on little endian architectures, is that not true?]
|
||||
[1:58:10][Can you post interesting e-mails you get to the site?]
|
||||
[1:58:31][The compiler is allowed to, and actually does, assume that two pointers to different types never alias unless one of the types is char or unsigned char]
|
||||
[1:59:46][Win32DisplayBufferInWindow() is taking four unused parameters. WM_PAINT is the only part where we pass those, but we never use them. Will that change?]
|
||||
[2:01:02][Wouldn't it be better to keep comments in the code about the explanations you do?]
|
||||
[2:01:27][Why have BytesPerPixel as a variable? Do you expect it to have different values?]
|
||||
[2:03:04][On the uselessness of const]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Gamepad and Keyboard Input" vod_platform=youtube id=J3y1x54vyIQ annotator=jacebennett annotator=Miblo annotator=garlandobloom]
|
||||
[0:51][Getting input from a gamepad: XInput]
|
||||
[3:20][Using XInput in the codebase]
|
||||
[6:26][A look at the XInput API more in depth.]
|
||||
[7:40][Programming using XInput API]
|
||||
[9:09][Discussing the controller's state: using XINPUT_STATE struct]
|
||||
[11:30][Using XINPUT_GAMEPAD struct]
|
||||
[16:57][Handling unresolved external symbol XInputGetState]
|
||||
[26:03][Discussing access violations]
|
||||
[26:52][Safeguarding against access violations]
|
||||
[31:50][Defining and implementing Win32LoadXinput function]
|
||||
[37:22][Playing with the X and Y offset]
|
||||
[38:00][Casey looking for his gamepad]
|
||||
[38:50][Casey showcases pink controller]
|
||||
[41:09][XINPUT_VIBRATION]
|
||||
[43:05][#milkhit]
|
||||
[46:55][Testingand handling button/key presses]
|
||||
[55:10][(Extra) ANSI String Handling]
|
||||
[56:10][(Extra) Not passing something by value anymore]
|
||||
[58:10][Summary and things to come before beginning Q&A]
|
||||
[59:08][LParam 30 is always up for WM_KEYUP]
|
||||
[59:57][Why uppercase variable names?]
|
||||
[1:00:21][Can you explain your macro and referencing XInput functions again?]
|
||||
[1:03:15][What's the size when copying becomes problematic for a struct?]
|
||||
[1:04:27][About (premature) optimisation]
|
||||
[1:08:27][How does the linker find the XInput DLL on the users machine? \[...\] Can we distribute the DLL?]
|
||||
[1:12:52][Is \[the dynamic linker\] allowed to link XInput in compile time?]
|
||||
[1:14:02][Why you chose an if-else cascade for key input instead of switch statement? It's up for grabs.]
|
||||
[1:15:13][How do you know the XInput stub things work without testing it on XP computer without XInput installed?]
|
||||
[1:17:03][Is it a waste of time to check if GetProcAddress() returns zero?]
|
||||
[1:19:12][Modify code to use the controller stick]
|
||||
[1:22:14][Where do the WParam and LParam come from?]
|
||||
[1:24:17][Why did MS decide to use link and import library instead of true dynamic linking?]
|
||||
[1:25:13][When are we going to get @naysayer88 and @cmuratori combination game?]
|
||||
[1:26:19][On Unix you don't need to link to a .so file at all to use a .so file where as on MS platforms you need a .lib file]
|
||||
[1:27:33][In the far future will you use DirectX or OpenGL or what?]
|
||||
[1:28:05][We will be drawing the whole screen every frame.]
|
||||
[1:28:47][Why does Valgrind make it look so scary when you don't free()?]
|
||||
[1:29:48][It looks like WParam and LParam are 32bit on XP]
|
||||
[1:30:12][Is it possible to keep your framerate consistent while dragging the window around? Doing repaint on WM_MOVE is slow.]
|
||||
[/video]
|
|
@ -0,0 +1,36 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Initializing DirectSound" vod_platform=youtube id=qGC3xiliJW8 annotator=jacebennett annotator=Miblo annotator=theinternetftw]
|
||||
[0:53][Fix: Windows API return values and stubs]
|
||||
[2:29][Fix: XInput on Windows 8]
|
||||
[3:48][Fix: Restore Alt-F4 functionality]
|
||||
[9:21][Bool datatype idiosyncraries]
|
||||
[12:55][Review Alt-F4 fix]
|
||||
[13:55][Foreshadowing an XInput performance issue]
|
||||
[16:44][Intro to sound programming for games]
|
||||
[23:55][Initializing DirectSound Overview]
|
||||
[27:03][Load the library]
|
||||
[32:00][Create a DirectSound Object]
|
||||
[33:54][Configuring the DirectSound Object]
|
||||
[38:04][Creating and Configuring the Primary Buffer]
|
||||
[51:36][Creating and Configuring the Secondary Buffer]
|
||||
[56:38][Let's try it]
|
||||
[1:00:46][Final Thoughts]
|
||||
[1:02:05][Q&A]
|
||||
[1:04:05][Fixing WaveFormat order]
|
||||
[1:06:07][Do you use data-structures like linked-list, binary trees..?]
|
||||
[1:06:34][Can you explain again why you need two buffers instead of just doing everything in one?]
|
||||
[1:09:23][Are there any case we'd want more than two \[audio\] channels?]
|
||||
[1:11:05][If the framerate would ever drop, can there be audio dropouts?]
|
||||
[1:13:41][The nBlockAlign and nAverageBytesPerSecond are redundant.]
|
||||
[1:14:57][On Linux will we be doing ALSA or higher level like PulseAudio/Jack?]
|
||||
[1:16:00][What newer sound API would you recommend instead of old DirectSound?]
|
||||
[1:16:46][The two second buffer doesn't sound acceptable / not-noticeable if you're playing music.]
|
||||
[1:17:27][Have or do you work in the industry?]
|
||||
[1:17:54][Have you thought about guest programmers tagging in to teach things like linux or whatever topic is their expertise?]
|
||||
[1:18:35][VirtualAlloc: MEM_COMMIT to MEM_RESERVE|MEM_COMMIT]
|
||||
[1:20:23][About game development as a career field]
|
||||
[1:22:57][Will you show us how to use bone animations or will you use spritesheets?]
|
||||
[1:24:15][More on our usage of DirectSound (Not a buffer)]
|
||||
[1:25:33][About game programming optimisation]
|
||||
[1:27:56][Why don't we use the second buffer to grab the handle instead of creating something just to grab a handle?]
|
||||
[1:29:26][Isn't this learning how to carve stone with chisel instead of using modern machinery?]
|
||||
[/video]
|
|
@ -0,0 +1,36 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Writing a Square Wave to DirectSound" vod_platform=youtube id=uiW1D1Vc7IQ annotator=jacebennett annotator=Miblo annotator=theinternetftw]
|
||||
[1:04][Review of DirectSound init]
|
||||
[2:16][Tangent: methods and vtables]
|
||||
[8:52][Resume review of DirectSound init]
|
||||
[14:21][Writing to the sound buffer]
|
||||
[16:09][Discussion of waveforms for testing]
|
||||
[17:02][Locking the buffer]
|
||||
[18:19][Dealing with buffer pointers and locks]
|
||||
[21:09][The Lock() call]
|
||||
[22:59][Filling the buffer regions]
|
||||
[26:49][Generating a test tone]
|
||||
[35:28][Getting the WritePointer and BytesToWrite]
|
||||
[48:21][Refine square wave formula]
|
||||
[51:39][Review the code]
|
||||
[56:04][Start DirectSound playing]
|
||||
[57:27][HOLD YOUR EARS]
|
||||
[58:22][HOLD YOUR EARS]
|
||||
[59:22][Don't forget to Unlock the buffer]
|
||||
[1:00:58][Final Thoughts]
|
||||
[1:02:17][Review of mod operation and how we used it]
|
||||
[1:10:30][Q&A]
|
||||
[1:11:09][Will future broacasts use this Europe-friendly time?]
|
||||
[1:11:21][Why not XAudio2?]
|
||||
[1:12:43][Are we going to factor sound playing to a seperate function?]
|
||||
[1:13:45][Will we rename GlobalSecondaryBuffer?]
|
||||
[1:14:10][Challenge: XAudio2 is supported on XP]
|
||||
[1:14:49][Why keyboard events instead of polling?]
|
||||
[1:15:24][Will we be able to remap keys?]
|
||||
[1:15:43][Doesn't the size of the buffer increase latency?]
|
||||
[1:16:53][Will we write audio filters, like reverb?]
|
||||
[1:17:16][Will we factor the code into seperate files?]
|
||||
[1:18:06][It takes about a second to start playing, is that expected?]
|
||||
[1:22:39][Can you show a sine wave as well?]
|
||||
[1:23:02][What is acceptable latency?]
|
||||
[1:29:04][No Poop Sauce]
|
||||
[/video]
|
|
@ -0,0 +1,50 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Variable-Pitch Sine Wave Output" vod_platform=youtube id=8y9nPk1c45c annotator=jacebennett annotator=Miblo annotator=schme annotator=theinternetftw]
|
||||
[1:14][Review DirectSound init and square wave]
|
||||
[2:28][Story Time: The First Game Jam]
|
||||
[8:56][The moral of the story]
|
||||
[11:26][How to approach debugging the sound code]
|
||||
[15:40][Square vs Sine Wave]
|
||||
[17:33][Generating a Sine Wave]
|
||||
[17:56][Tangent: Intro to Floating Point]
|
||||
[20:38][C Libraries for sin]
|
||||
[24:55][Story Time: Before floating point hardware]
|
||||
[26:43][Tangent: Fixed-point math]
|
||||
[32:35][Tangent: IEEE Floating-point representation]
|
||||
[42:15][Implementing the Sine wave test tone]
|
||||
[48:09][Lets run it]
|
||||
[49:01][Debugging in earnest]
|
||||
[57:39][A different error]
|
||||
[57:58][Refactor for clarity]
|
||||
[1:03:46][Where did it go?]
|
||||
[1:04:08][Eureka!]
|
||||
[1:05:22][Victory]
|
||||
[1:09:52][Q&A]
|
||||
[1:10:07][In D this bug couldn't have happened. D always initializes variables.]
|
||||
[1:13:36][How do you know that ByteToLock is far enough ahead of the PlayCursor?]
|
||||
[1:15:40][Try \[compiling with\] -W3 or -W4]
|
||||
[1:15:54][Where do I look for standard C library docs?]
|
||||
[1:16:39][I think you can now remove the ByteToLock == PlayCursor case.]
|
||||
[1:17:58][Will we use the sin() in the actual game?]
|
||||
[1:18:07][Is autocomplete/intellisense a bad idea? You don't seem to use it.]
|
||||
[1:19:25][Re-explaining the last bug]
|
||||
[1:20:50][Is it possible for bits to spill over into neighboring variables? For example, when shifting.]
|
||||
[1:26:26][Will we use the same output buffer to overlay several sounds?]
|
||||
[1:26:33][Change tone frequency based on input, and the bug will resurface.]
|
||||
[1:26:37][Casey: That's a different bug, lets look at it.]
|
||||
[1:30:43][Fixed]
|
||||
[1:30:57][Diagramming the frequency change issue]
|
||||
[1:35:18][Let's map the pitch to the sticks.]
|
||||
[1:37:00][Theramin Simulator 2014 Tech Demo]
|
||||
[1:37:13][Let's lower the latency]
|
||||
[1:42:49][If we could live with a slightly less accurate sin, we could approximate it with polynomials.]
|
||||
[1:45:08][Will the art and audio be released into the public domain?]
|
||||
[1:46:20][Is it a good idea to use fixed point math for games that require deterministic simulation for multiplayer? Or can you use floating point across systems?]
|
||||
[1:48:48][Sometimes you use 'bool' and sometimes 'bool32']
|
||||
[1:49:30][Are you going to use ETW to log context switches for the game?]
|
||||
[1:49:42][Is this the audio api we will be using to ship the game?]
|
||||
[1:50:01][Is it safe to call DirectSound without initializing COM?]
|
||||
[1:50:47][Can we do an episode on emacs?]
|
||||
[1:51:33][Fix: XInput - missing dependencies]
|
||||
[1:53:45][Fix: Arithmetic for stick values]
|
||||
[2:01:55][Sign off]
|
||||
[/video]
|
|
@ -0,0 +1,59 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="QueryPerformanceCounter and RDTSC" vod_platform=youtube id=tAcUIEoy2Yk annotator=jacebennett annotator=Miblo annotator=theinternetftw]
|
||||
[1:19][The Intel Architecture Reference Manual]
|
||||
[3:49][RDTSC- Read Time-Stamp Counter, measures clock cycles]
|
||||
[7:40][QueryPerformanceCounter(), measures wall clock time]
|
||||
[15:30][Timing our frames]
|
||||
[17:02][Union types (LARGE_INTEGER)]
|
||||
[21:48][Method of determining time elapsed between frames]
|
||||
[23:19][QueryPerformanceFrequency()]
|
||||
[26:32][Using dimensional analysis to convert between unit types]
|
||||
[31:13][Converting seconds/frame to ms/frame]
|
||||
[32:36][Printing out MSPerFrame]
|
||||
[38:10][Finding Frames Per Second using dimensional analysis (cause we can)]
|
||||
[45:44][The dangers of wsprintf()]
|
||||
[50:10][Using RDTSC to find cycles per frame]
|
||||
[56:43][Use wsprintf() to print our timings as floats]
|
||||
[59:18][A bit more about wsprintf()]
|
||||
[1:02:05][Final Thoughts]
|
||||
[1:04:32][Q&A]
|
||||
[1:04:46][RDTSC returns unsigned int]
|
||||
[1:05:28][Explanation of how C handles division based on type]
|
||||
[1:07:34][How compiler optimizations affect the execution time]
|
||||
[1:09:58][Do the divide in doubles.]
|
||||
[1:13:26][It would be nice to have a roadmap...Would you consider doing a 24 hour stream?]
|
||||
[1:14:30][Will we be able to use a Playstation 2 controller?]
|
||||
[1:14:53][Can we expect more Jeff and Casey shows in the future?]
|
||||
[1:15:04][Is it safe to use 64-bit variables and functions on a 32-bit PC?]
|
||||
[1:16:17][Even though we are doing low level programming, sometimes we have to pass things to Windows, which makes it difficult to follow exactly what the computer is doing. Will this be the same when we go to other platforms?]
|
||||
[1:18:45][Do you use a profiler or mostly hand-coded timing calls?]
|
||||
[1:18:57][Why do you use PascalCase for everything?]
|
||||
[1:19:04][Is it a violation to set one member of a union and then read from another?]
|
||||
[1:19:15][@@mvandevander][ Was wondering when we would get around to using RawInput to handle DualShock 4 natively]
|
||||
[1:20:47][@@tom_forsyth][ Modern CPUs RDTSC returns nominal clocks not real clocks.]
|
||||
[1:22:14][Why are you avoiding doubles in your code?]
|
||||
[1:22:50][Are you opposed to ever using high level languages in making games?]
|
||||
[1:23:23][If you wanted to lock the FPS at a particular number, would you just sleep or do something more complex?]
|
||||
[1:24:55][Isn't RDTSC affected by variable processor technologies in modern processors like SpeedStep?]
|
||||
[1:26:54][Have you done Ludum Dare?]
|
||||
[1:27:10][Can we do a bonus stream on ASM?]
|
||||
[1:28:51][If you read the latency tables for SSE2 float vs double, you'll see that double isn't that much slower than float...]
|
||||
[1:37:18][What are your thoughts on Swift?]
|
||||
[1:37:23][What do you think of Jonathan Blow's programming language?]
|
||||
[1:37:50][Do you have any discussions with Jonathan Blow on his compiler and what sort of features you would like to see in it?]
|
||||
[1:38:59][Do you ever write functions like printf() that take variable arguments?]
|
||||
[1:39:07][Would you consider using a templated type-safe version of printf(), even though you hate templates?]
|
||||
[1:39:28][MULPD is only half as fast if you do millions of operations...]
|
||||
[1:40:03][What low level language would you suggest to someone new to programming?]
|
||||
[1:40:13][Are we using the Win32 API but compiling for 64-bits? Do we need to compile for 32-bits for Windows XP support? It looks like we have int64 and real64 in the cpp]
|
||||
[1:40:50][In game development, do you follow enterprise design patterns, or do you have some different design patterns?]
|
||||
[1:41:09][What do you use for collections if you do not use templates?]
|
||||
[1:41:18][I didn't get the outome of the MULPS/MULPD compare. The latency packing was the same, how does that end up being double time?]
|
||||
[1:44:04][RE MULPS/MULPD: If you're writing SIMD code then you care, otherwise you don't.]
|
||||
[1:45:58][Comment about compiler auto-vectorization]
|
||||
[1:47:43][Tom Forsyth's rant on double precision]
|
||||
[1:48:35][Will we take MSVC all the way to shipping or will we use LLVM even on Windows?]
|
||||
[1:50:03][What's an intrinsic?]
|
||||
[1:55:23][Switch back to debug build from optimized]
|
||||
[1:56:03][Isn't it a pain to work in Windows, especially as a programmer?]
|
||||
[1:57:05][Didn't we want to start adding warnings?]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="The Basics of Platform API Design" vod_platform=youtube id=_4vnV2Eng7M annotator=schme]
|
||||
[3:35][About platform specific code]
|
||||
[7:56][What is left to be done on the platform layer]
|
||||
[11:23][Topic of the day revealed!]
|
||||
[11:33][Portability and cross platformness]
|
||||
[13:37][How people used to make code be cross platform (preprocessor #if #else)]
|
||||
[18:48][About preprocessor #if #else cross platforming]
|
||||
[23:52][Separate platform files (e.g. linux_handmade.cpp) as the entry point]
|
||||
[31:41][Unity builds, building your project as one translation unit]
|
||||
[34:08][Virtualising the OS to the game (architecture style 1)]
|
||||
[34:23][Example implementation for virtualising a window wrapper]
|
||||
[42:54][Reasons why perhaps not to use style 1]
|
||||
[44:31][Game as a service to the OS (architecture style 2)]
|
||||
[47:15][Implementing style 2]
|
||||
[51:30][GameUpdateAndRender() - moving RenderWeirdGradient to game code]
|
||||
[1:01:00][Q&A]
|
||||
[1:01:23][Seems 'unsafe' to include the platform independent code after including the platform specific headers]
|
||||
[1:03:22][Would you always orchestrate how you do threading in the platform layer or does it make sense for the platform layer to also provide a more generic threading job service?]
|
||||
[1:05:12][You said last stream you didn't really like showing the FPS because you didn't find it useful. Can you explain that?]
|
||||
[1:09:48][On the scale from genius to totally awesome how can you remember all this?]
|
||||
[1:12:21][Do we currently have a hidden platform dependancy inside the bitmap memory or is BGRA something that happens on the other platforms too?]
|
||||
[1:15:18][It seems like your approach to handling platform dependant services is to prefer a many-to-one relationship instead of a one-to-many. \[...\]]
|
||||
[1:17:53][How did you setup Visual Studio to have that black theme?]
|
||||
[1:18:22][During coding is it easy to discipline yourself to make the code as clean and tidy as possible. \[...\] Do you think this is good in general or could it backfire?]
|
||||
[1:22:20][Would there be a way to build your platform dependant code in a separate entity in order to allow you to use it in the future?]
|
||||
[1:23:11][Will you be developing your own implementation of strings? (No) ]
|
||||
[1:23:52][Does the unity build approach work with parallel compilation?]
|
||||
[1:26:04][Do you feel it is necessary to make a flowchart before coding, or do you go with the flow?]
|
||||
[1:27:18][Why the #define part for the header file (include guards)]
|
||||
[1:29:09][Why do you specify void in function definitions when they don't take arguments?]
|
||||
[1:30:06][Do you have a specific method for solving programming problems or do you just write things and solve them in place?]
|
||||
[1:30:29][Why are you forward declaring game layer functions in the header when you include the whole documentation?]
|
||||
[1:31:17][Do you think it is realistic for someone with awful math skills to be an efficient game developer?]
|
||||
[/video]
|
|
@ -0,0 +1,43 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Platform-independent Sound Output" vod_platform=youtube id=5YhR2zAkQmo annotator=jacebennett annotator=Miblo annotator=theinternetftw]
|
||||
[0:57][Review basics of platform API design]
|
||||
[3:54][What the API needs to support]
|
||||
[4:53][Starting with moving sound across the API boundary]
|
||||
[10:30][How most games deal with time (poorly)]
|
||||
[11:06][What we are going to do]
|
||||
[14:55][Moving sound generation across the boundary]
|
||||
[19:30][Finding the seams]
|
||||
[22:49][Dealing with sound buffers abstractly]
|
||||
[25:50][Allocating a game sound buffer]
|
||||
[29:33][Tangent: buffer overruns and how the debugger helps]
|
||||
[31:09][Actually using the game-generated sound]
|
||||
[37:01][Cleaning up the old stuff]
|
||||
[42:16][A step back]
|
||||
[43:30][Tangent: memory management & alloca]
|
||||
[47:57][Nevermind, we'll put it on the heap]
|
||||
[50:57][Review]
|
||||
[53:54][The remaining jank]
|
||||
[57:27][Tweak the build.bat]
|
||||
[58:47][Final Thoughts]
|
||||
[59:30][Q&A]
|
||||
[1:00:16][Will we use alloca to store pointers to game objects that are local to the player?]
|
||||
[1:04:29][If the DirectSound Lock fails, you'll pass garbage pointers to the game logic.]
|
||||
[1:05:31][When you say 60fps may not be feasible do you mean on non-PC platforms?]
|
||||
[1:07:50][Are we not worried about clean builds?]
|
||||
[1:08:37][Allocating every frame was your bug with alloca. You were calling it in a loop.]
|
||||
[1:12:26][Can you explain again why our current sound buffer fill is problematic?]
|
||||
[1:15:43][Wouldn't updating graphics and sound on the same frame cause audio lag?]
|
||||
[1:17:08][Since alloca is just a function call, how does the compiler know to free the memory?]
|
||||
[1:17:44][Will we spilt game sound update out of GameUpdateAndRender so we can use it as a callback or on a different thread?]
|
||||
[1:18:16][alloca is deprecated, we should use malloca.]
|
||||
[1:20:17][can you provide a log of the chat on the website?]
|
||||
[1:20:43][malloca allocs on the stack if less than 1kB and malloc's if greater.]
|
||||
[1:21:33][How can you safely predict where the flip happens so you can write sound there?]
|
||||
[1:24:54][We know that you can't go below 30fps for 'smooth' video. Is there a similar rule of thumb for audio?]
|
||||
[1:26:29][alloca is deprecated because.... \[There are better options.\]]
|
||||
[1:30:49][How do you do 2 voices in 1 buffer?]
|
||||
[1:30:58][When will the first sprite be displayed in animation?]
|
||||
[1:31:11][I've heard the brain treats sounds within 10ms as in-sync?]
|
||||
[1:31:39][When you work with temporary memory are there dangers? How do we protect against them?]
|
||||
[1:33:21][As a rhythm game player, I can notice audio sync off as little as 10ms...]
|
||||
[1:35:03][Sign Off]
|
||||
[/video]
|
|
@ -0,0 +1,49 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Platform-independent User Input" vod_platform=youtube id=Lt9DfMzZ9sI annotator=jacebennett annotator=Miblo]
|
||||
[0:40][Overview of the day's goals]
|
||||
[2:35][Function Overloading (accidental and intentional)]
|
||||
[7:29][Extending GameUpdateAndRender() to take input]
|
||||
[8:33][Pulling structs into a header file for readability]
|
||||
[9:48][On iterating towards an API and avoiding premature design]
|
||||
[13:35][Writing our usage code first]
|
||||
[15:12][Diagram of input over time]
|
||||
[20:47][Looking at one common method of parsing game input]
|
||||
[23:43][An less expressive but simpler way]
|
||||
[28:29][But Casey, what about the stick?]
|
||||
[35:47][Writing usage for some game_input structures]
|
||||
[37:51][Adding the structures and filling them out]
|
||||
[40:45][Handmade Hero: Better than cooking shows!]
|
||||
[42:14][Porting our platform layer over to the new API]
|
||||
[46:16][Factoring out button processing into Win32ProcessXInputDigitalButton()]
|
||||
[48:47][Processing all the buttons]
|
||||
[51:11][ArrayCount() used but not implemented yet]
|
||||
[53:16][Swapping NewInput and OldInput, how do we want to do it?]
|
||||
[54:36][Finally defining NewInput and OldInput]
|
||||
[56:04][More explanation about swapping]
|
||||
[57:28][Defining the ArrayCount() macro]
|
||||
[58:50][But Casey, what about the stick?]
|
||||
[1:00:11][Normalizing our stick values]
|
||||
[1:04:54][Wrap up and Final Thoughts]
|
||||
[1:06:55][Q&A]
|
||||
[1:07:05][When normalizing the thumbstick value, is it worse to just add 32768 then multiply it by 2/65535 then subtract 1? I don't like the necessary if statement personally.]
|
||||
[1:08:45][Nitpick, but is it a bit misleading that the half transition count is zero or one, rather than an actual count?]
|
||||
[1:09:17][Will we be completely ignoring platform code for most of the rest of the series?]
|
||||
[1:09:48][Can you describe the struct inside of the union in more detail?]
|
||||
[1:13:37][Does it give any problems with capturing inputs over time when, due to some circumstances from Windows, the game lags and the frame timebase expands?]
|
||||
[1:16:03][Your normalizing code has an error, they both divide by positive.]
|
||||
[1:17:53][What happens if there's a name conflict between struct scope and a non-nested struct?]
|
||||
[1:18:35][Do you plan on abstracting the input more. For example, instead of having a player respond to a button press, have them respond to an action that is bound to a button or stick?]
|
||||
[1:20:01][Why is GameUpdateAndRender() internal when it's designed to be called from the platform layer?]
|
||||
[1:20:35][Comment about using re-bindable keys and buttons for left-handed people.]
|
||||
[1:21:17][When will you decide to actually remove all the TODOs in your code?]
|
||||
[1:21:51][Aside about rebindable keys.]
|
||||
[1:23:01][How is the old controller persisted across frames?]
|
||||
[1:23:59][Will the Windows callbacks for keyboard inputs require a great deal of extra work for you to implement?]
|
||||
[1:25:18][What about people who only have left arms?]
|
||||
[1:25:45][Will we eventually be using a timer to poll the controller input, or just a thread?]
|
||||
[1:26:40][timeBeginPeriod(1) will tick at 1 millisecond resolution.]
|
||||
[1:27:37][Have you done much physics coding, related to games or otherwise?]
|
||||
[1:28:25][Would you be fine with people using the platform as a base for making their own games, with attribution?]
|
||||
[1:29:49][How much will you need to explore other platforms before knowing what the abstraction API will look like?]
|
||||
[1:30:26][What kinds of numerical methods are used in game physics?]
|
||||
[1:31:26][Final Wrap Up]
|
||||
[/video]
|
|
@ -0,0 +1,54 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Platform-independent Game Memory" vod_platform=youtube id=tcENxzeTjbI annotator=jacebennett annotator=Miblo]
|
||||
[0:58][Intro to memory management.]
|
||||
[4:07][We won't be allocating.]
|
||||
[5:17]['Allocation Festivals']
|
||||
[5:35][Why talk about allocation now?]
|
||||
[7:35][What would 'normally' happen]
|
||||
[11:55][Problem: dynamic allocation spreads managment across code, makes it opaque]
|
||||
[13:18][Problem: allocation is another trip through the platform layer]
|
||||
[15:03][What we will do instead]
|
||||
[17:25][Adding memory to the platform abstraction]
|
||||
[20:41][Initializing with the new model]
|
||||
[21:17][Allocating the memory in the platform]
|
||||
[26:33][Yes, Virginia, memory comes zeroed.]
|
||||
[28:40][Put it where you want it.]
|
||||
[33:33][Debugging: Integral promotion]
|
||||
[36:38][Note that the clear to zero is cheap.]
|
||||
[37:27][Memory? Check.]
|
||||
[40:28][Intro to assertions]
|
||||
[44:33][Avoiding the runtime cost]
|
||||
[45:03][Build options]
|
||||
[48:08][Build options for memory]
|
||||
[50:31][Combining allocations]
|
||||
[51:30][Debugging]
|
||||
[55:07][Mission accomplished.]
|
||||
[56:24][TODO: Pass timing info to game]
|
||||
[58:24][Q&A]
|
||||
[59:20][Reasoning behind Main Memory Pool vs Dynamic Allocation?]
|
||||
[1:03:31][Why use the void* in game_memory?]
|
||||
[1:04:13][Elaborate on Permanent vs Transient storage?]
|
||||
[1:07:03][Will the code be on github \[be public\]?]
|
||||
[1:07:38][What do you mean by 'avoiding round trips'?]
|
||||
[1:12:55][Are you going to keep the sound buffer allocation seperate?]
|
||||
[1:13:14][Why didn't you use libc's assert macro?]
|
||||
[1:13:43][You're assert has issues.]
|
||||
[1:14:37][Why did you pick a BaseAddress so high up (2TB)?]
|
||||
[1:15:09][What is the difference between the memory columns in Task Manager?]
|
||||
[1:17:41][Tangent: PerfMon]
|
||||
[1:20:39][Recommended: Channel 9 video: Mark Russinovich Mysteries of Windows Memory Managment.]
|
||||
[1:21:04][Are there any guidelines for choosing a safe BaseAddress?]
|
||||
[1:21:46][What happens if the user doesn't have enough RAM?]
|
||||
[1:22:40][Isn't worrying about not having enough memory silly?]
|
||||
[1:23:25][Why are you using pools instead of static allocation?]
|
||||
[1:23:52][What mechanism will we use to assign memory out of our pools?]
|
||||
[1:24:17][Having Q&A after the episode is like code review. Was that your intent?]
|
||||
[1:25:16][What about i.e. modding support? You can't tell in advance if you've allowed enough memory for someone else's mod.]
|
||||
[1:26:34][Will our 64-bit allocation break on Raspberry Pi?]
|
||||
[1:27:27][Will the Transient storage be freed, or will you just take off its end until its gone?]
|
||||
[1:27:45][Is it better to keep track of how much memory is freed instead of total size?]
|
||||
[1:28:06][Why are you reluctant to have to constants be 64-bit integers?]
|
||||
[1:29:27][Did you pass different flags to VirtualAlloc for permanent and transient storage?]
|
||||
[1:29:54][What are the 'other reasons' for specifying a BaseAddress.]
|
||||
[1:31:01][Is it possible the pool will be fragmented?]
|
||||
[1:33:10][Sign Off]
|
||||
[/video]
|
|
@ -0,0 +1,42 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Platform-independent Debug File I/O" vod_platform=youtube id=kdAte9pdLv8 annotator=garlandobloom annotator=jacebennett annotator=schme annotator=Miblo]
|
||||
[01:26][Overview of the two classes of game file I/O]
|
||||
[05:30][Today's goals (building a minimal set of I/O functions)]
|
||||
[06:48][A brief lesson on the sad history of file I/O]
|
||||
[12:40][The modern and better way of handling files]
|
||||
[14:54][A first pass at the usage code]
|
||||
[18:56][Locking our janky code out of the release build]
|
||||
[22:01][Implementing the I/O functions in the platform layer]
|
||||
[23:46][File handles and CreateFile() breakdown]
|
||||
[29:07][GetFileSize() and GetFileSizeEx()]
|
||||
[35:03][A janky situation with ReadFile()]
|
||||
[37:07][An inline function, SafeTruncateUInt64()]
|
||||
[43:15][Step-through of our read function]
|
||||
[47:01][Making a write based on the read function]
|
||||
[50:19][Using the write function]
|
||||
[53:29][Step-through of the write function]
|
||||
[56:40][Editing the .emacs file]
|
||||
[58:27][Breaking the .emacs file]
|
||||
[1:00:19][An IMPORTANT note on the safety of file I/O code]
|
||||
[1:02:15][Q&A]
|
||||
[1:02:54][Will the game be able to carry on in spite of some big time failure, like a graphics device reset. And does software rendering make that easier to deal with?]
|
||||
[1:04:28][Would it make sense to call normal GetFileSize() and then assert that the high 32-bit value is zero?]
|
||||
[1:06:00][Would it be useful for us to write our own allocation function that specifically allocates sections of our already-reserved temporary memory? I am having trouble understanding why we are doing separate allocations.]
|
||||
[1:07:54][Will we implement some kind of cloud storage for the writes?]
|
||||
[1:08:55][I know you removed it for now, but wouldn't a reserve memory method with an arbitrary size still introduce a failure point since it could fail like VirtualAlloc() and we have simply moved the burden onto ourselves?]
|
||||
[1:09:59][You can reload your emacs settings without blowing everything up each time with evalbuffer.]
|
||||
[1:10:55][Are there any other benefits to doing one massive allocation, aside from having one failure point. Also does the order of properties in your structs matter when it comes to performance efficiency?]
|
||||
[1:16:00][Do games really usually write to a second file rather than using some soft of safe write function that won't overwrite it if it somehow fails?]
|
||||
[1:17:31][Do you miss multiple return values in C?]
|
||||
[1:18:30][Why don't we just map the file into memory?]
|
||||
[1:19:19][Will allocating a single amount of memory up front make it more difficult to selectively enable/disable certain features of the game, since there could be many combinations, each requiring different amounts of memory?]
|
||||
[1:20:32][Why does the order of fake_struct_a and b matter?]
|
||||
[1:21:10][Why did you do the byte macros, but hesitate on the swap? Is there some hidden complexity on pointer swaps?]
|
||||
[1:24:35][So structs with unions in them have bad performance issues?]
|
||||
[1:25:11][You mentioned IOCP (I/O Completion Ports) for async file I/O. Are you planning to use multiple worker threads? I've been doing some multithreaded epoll code on Linux, and it's a very janky API unless you're using one worker thread. There are even a few articles on LWN.net only about how to safely remove a file descriptor with epoll.]
|
||||
[1:26:27][On the swap, why does it have to be a macro. Wouldn't a function do the job and cover the janky complexity with types in the macro?]
|
||||
[1:27:06][Why don't you define the swap macro to be #define swap(a,b){ type_of(a) temp...?]
|
||||
[1:27:33][Does ArrayCount macro work with strings?]
|
||||
[1:27:46][Won Chun: Async file I/O in Linux is nutty.]
|
||||
[1:28:13][(Key Switches)Brown or blue?]
|
||||
[1:28:53][It (ArrayCount) actually works with string literals.]
|
||||
[/video]
|
|
@ -0,0 +1,32 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="VisualStudio Compiler Switches" vod_platform=youtube id=zN7llTrMMBU annotator=dspecht annotator=schme annotator=garlandobloom]
|
||||
[2:32][Explanation of Warning and the Warning levels]
|
||||
[5:20][Fixing warnings, and disabling warnings we don't want]
|
||||
[14:10][Other command line switches that Casey normally uses]
|
||||
[18:00][Compiler intrinsics command line switch]
|
||||
[19:00][Disabling Run time type information]
|
||||
[19:20][Disabling exception handling]
|
||||
[22:20][Configuring for a 32bit build]
|
||||
[31:00][Windows XP VM Testing]
|
||||
[39:32][-MT vs -MD and why it matters]
|
||||
[41:25][-Fm <map file path> Creating a map file and looking at it]
|
||||
[46:10][Why the names are mangled in the .map file produced with the compiler switch of -Fm]
|
||||
[50:10][Start moving keyboard input into the non-platform code]
|
||||
[1:02:52][Q&A]
|
||||
[1:04:33][Question: -Oi , Why would anyone not want it active]
|
||||
[1:06:02][Question: How do we add -Wx -W4 to the commandline switches if developing in VisualStudio]
|
||||
[1:07:07][Question: Would turning on -Od be a good idea to use in the normal build]
|
||||
[1:08:03][Question: Does compiler compilation always say finished in green]
|
||||
[1:08:45][Question: I think you mentioned something about not being a fan of rebindable keys, why no option]
|
||||
[1:09:51][Question: How much difference would be yielded if we disable the CRT]
|
||||
[1:10:26][Question: I could not see what you did to not have the key x messages not triggered]
|
||||
[1:12:13][Question: Would it be better to just pass which key was pressed to the non-platform code instead of in the platform code]
|
||||
[1:13:32][Question: If you build for say AVX2 but the user has a older processor, what happens]
|
||||
[1:14:03][Question: Will we move to a unified build system for all target platforms]
|
||||
[1:14:42][Question: Would not -Oi and -Od be clashing]
|
||||
[1:15:21][Question: Is there a way to make cl emit a human readable summary]
|
||||
[1:15:32][Question: Does the map file spit out data about struct memebers as well]
|
||||
[1:16:03][Question: Does not allowing key rebinding mess up on different keyboard layouts]
|
||||
[1:17:17][Question: Is the game currently linked to the dll version of the CRT]
|
||||
[1:17:51][Question: I know you won't be using any libraries, but how would you include unity clib and link to that]
|
||||
[1:19:42][Question: Is there any advantage to processing things in the main loop other then conceptual grouping]
|
||||
[/video]
|
|
@ -0,0 +1,42 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Unified Keyboard and Gamepad Input" vod_platform=youtube id=WDB718JId4M annotator=garlandobloom]
|
||||
[2:19][Overview of the previous day's work]
|
||||
[5:11][An introduction to functional programming]
|
||||
[10:44][Methods for making our programs more functional]
|
||||
[11:41][Rationale for moving keyboard handling out of Win32MainWindowCallback()]
|
||||
[14:37][Finishing the keyboard processing code]
|
||||
[15:55][Adding a fifth controller (the keyboard)]
|
||||
[17:00][Adding 32-bit and 64-bit compiler options to the build.bat]
|
||||
[19:54][Ensuring keyboard state persists across frames]
|
||||
[22:35][An Assert() that we didn't do anything stupid]
|
||||
[23:50][Finishing our directional stick code with deadzone processing, no zombies.]
|
||||
[29:36][Using the deadzone values from MSDN]
|
||||
[35:05][Iterating across all the controllers in GameUpdateAndRender()]
|
||||
[36:23][Testing new input code]
|
||||
[37:34][Changing game_controller_input to work across both keyboard and gamepad]
|
||||
[41:12][Adapting the keyboard and gamepad code to the new structure]
|
||||
[44:55][Connecting the stick input into a fake directional pad]
|
||||
[48:16][Hooking up the real DPad]
|
||||
[52:05][Adding an IsConnected member to game_controller_input]
|
||||
[53:07][Buffer Overrun encourages some bounds checking]
|
||||
[56:44][Why did we overrun the buffer?]
|
||||
[59:26][Adding some last minute keyboard inputs]
|
||||
[1:00:06][Final Thoughts]
|
||||
[1:02:28][Q&A]
|
||||
[1:02:50][Check the array in the Buttons union, you might want 12 now that you've added start and back]
|
||||
[1:08:54][Is that some copypasta, or is it really supposed to be all MoveLefts?]
|
||||
[1:11:24][Could it be good to apply some integration on the keys, so we don't just set the value to binary -1/1?]
|
||||
[1:12:56][Can you talk about the deadzone being round vs rectangular at hardware USB, HID, and XInput API layers?]
|
||||
[1:19:15][Maybe it's a round deadzone?]
|
||||
[1:23:40][I'm 16 days behind, is there a better way to catch up than watching all the days on YouTube?]
|
||||
[1:24:22][For the build.bat, you can build for Windows XP 64-bit using 5.2 instead of 5.1]
|
||||
[1:24:33][On the inline method for GetController(), what happens if you pass in -1 for index?]
|
||||
[1:25:50][Can you do struct buttons_type (name the structure) and still get the benefits..?]
|
||||
[1:26:39][I don't get using Win32 prefix for function names when compiling for 64-bit.]
|
||||
[1:27:34][I was thinking about processing game input in a separate thread so it is framerate independent, but I heard you could introduce input lag. Is that true?]
|
||||
[1:28:46][You said a circular deadzone would be good for gameplay, why don't you just make it circular? The deadzone would just be a little bit bigger.]
|
||||
[1:32:02][DirectInput vs XInput, which is better?]
|
||||
[1:33:17][You deleted the Min/Max macro TODO...]
|
||||
[1:34:03][So when you use the ZeroController, why not just go *NewKeyboardController = {}?]
|
||||
[1:35:29][stddef should include offsetof(), you can use that to make your assert a little simpler.]
|
||||
[1:37:56][Final Wrap-Up]
|
||||
[/video]
|
|
@ -0,0 +1,30 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Enforcing a Video Frame Rate" vod_platform=youtube id=TPpn2fee77M annotator=AndrewJDR annotator=dspecht annotator=jacebennett annotator=schme]
|
||||
[1:40][Discussion: Why we need to have an enforced video frame rate]
|
||||
[5:27][Drawing and explaining the frame computation and displaying timeline]
|
||||
[10:35][Explaining Variable Frame Rate Monitors]
|
||||
[18:00][Casey's Game Loop Design Overview]
|
||||
[20:15][The two audio choices we can use]
|
||||
[25:23][Multiple Monitor discussion]
|
||||
[32:10][Start implementing the enforced video frame rate]
|
||||
[36:20][Looping to ensure we are within the targetSecondsPerFrame]
|
||||
[38:40][Debugging: no input]
|
||||
[40:41][Compressing/Refactoring Clocking stats]
|
||||
[49:05][Implementing sleep to not melt our CPU]
|
||||
[53:20][Setting the Windows scheduler granularity with timeBeginPeriod()]
|
||||
[1:00:30][Q&A]
|
||||
[1:01:08][Question: If we are locking the frame rate. Would that not mean that someone with a lower end computer, would have a slower game speed to others]
|
||||
[1:02:41][Question: Even if you could get the refresh rate of the monitor, how do you sync with it on the vertical blink]
|
||||
[1:03:52][Question: Doesn't the sleep function go in the surrounding IF instead of the WHILE loop]
|
||||
[1:05:47][Question: Does Win32FillSoundBuffer need to come after the vsync loop]
|
||||
[1:06:54][Question: Check DWM.GetComposition if AERO is on]
|
||||
[1:07:13][Question: Could you explain the advantages or disadvantages to handling update and render on different threads]
|
||||
[1:09:26][Question: How would you adjust your memory management to work on devices with limited memory]
|
||||
[1:09:42][Question: Won't we miss frame rate due to the sleep]
|
||||
[1:12:58][Question: Can you fix the physics animation frame rate without fixing the missing frame issue]
|
||||
[1:16:10][Question: Why are we handling sound and video differently]
|
||||
[1:16:27][Question: Check if DDraw works on windows 8]
|
||||
[1:16:52][Question: Wouldn't you want to fill the screen buffer before you hit the flip point, so it can grab the screen at the flip point]
|
||||
[1:18:03][Question: Isn't DWORD an Interger]
|
||||
[1:18:41][Question: What do you think about having a fixed physics time unconnected to the drawn frame time]
|
||||
[1:20:00][Question: Any time you compute a world update should that not just set something that says if we get there early then wait.]
|
||||
[/video]
|
|
@ -0,0 +1,39 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Improving Audio Synchronization" vod_platform=youtube id=qFl62ka51Mc annotator=jacebennett annotator=garlandobloom annotator=Miblo]
|
||||
[2:13][Intro]
|
||||
[3:31][Audio Sync Conversation Begins (Summary)]
|
||||
[4:19][#milkhit]
|
||||
[4:28][Why audio sync is an issue]
|
||||
[5:30][Ways to minimize the issue]
|
||||
[6:40][Creating a Debug Diagram for audio sync debug code]
|
||||
[15:37][Finishing up audio sync debug code]
|
||||
[23:43][Explaining and debugging debug code]
|
||||
[30:00][Bug in debug code encountered]
|
||||
[31:31][Addressing bug]
|
||||
[35:00][Compiling and running successfully]
|
||||
[35:30][Observing weird gaps in sound]
|
||||
[35:55][Not tracking frame time correctly ]
|
||||
[38:30][Addressing the weird gaps]
|
||||
[50:00][Running new code for debug diagram. Sound card read seems unreliable]
|
||||
[53:00][Sound stream has to be continuous. Figuring out how far ahead of the current play cursor we should be writing]
|
||||
[58:48][Discussing possible solutions to improve audio sync]
|
||||
[1:02:35][Improving audio sync]
|
||||
[1:07:20][Making a running log]
|
||||
[1:08:40][Getting a log of our audio to do some important things]
|
||||
[1:12:00][How much granularity we have]
|
||||
[1:16:20][Audio latency issue found]
|
||||
[1:19:50][Closing remarks]
|
||||
[1:20:28][Q&A]
|
||||
[1:21:13][Are you setup to use ASI Sound Drivers?]
|
||||
[1:22:05][Is your audio pointer code calculating independently of the variable-fixed visual frames per second?]
|
||||
[1:24:35][What sort of problems can high audio latency introduce?]
|
||||
[1:27:18][Could you use that anonymous union struct trick to access the members of bitmap info header structure more easily?]
|
||||
[1:28:47][Question about switching Audio APIs]
|
||||
[1:31:42][Why are we ignoring write cursor?]
|
||||
[1:33:10][Would splitting related functionality in separate files help?]
|
||||
[1:34:10][If we use the play cursor as offset, could we not overwrite previously written audio data?]
|
||||
[1:39:37][Comments about Audio APIs again]
|
||||
[1:40:14][Would rendering at 60 FPS help with the audio latency?]
|
||||
[1:41:16][Could you change latency values?]
|
||||
[1:41:33][Is it possible that OBS is affecting the audio latency?]
|
||||
[1:42:02][Closing remarks]
|
||||
[/video]
|
|
@ -0,0 +1,62 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Debugging the Audio Sync" vod_platform=youtube id=hELF8KRqSIs annotator=jacebennett annotator=Miblo annotator=garlandobloom]
|
||||
[2:44][Fixing an off by one error]
|
||||
[5:12][Explanation of off by one errors]
|
||||
[7:13][Overview of the state of our audio code]
|
||||
[11:05][A breakdown of how time is spent during each frame]
|
||||
[14:07][A possible, though not great, solution to audio latency]
|
||||
[16:22][Tradeoff between audio lag and input lag]
|
||||
[17:51][Falling back to a little bit stupider]
|
||||
[21:58][Beginning to change the code for the audio output method]
|
||||
[22:48][Finding the minimum expected audio latency]
|
||||
[27:31][Converting to seconds using dimensional analysis]
|
||||
[31:34][Writing sound based on the audio latency]
|
||||
[34:14][Great aside about keeping code fluid and a bit messy in the early stages]
|
||||
[37:00][Determining the position to write the audio to]
|
||||
[46:27][How to deal with the low latency case]
|
||||
[51:16][A puzzling situation]
|
||||
[53:00][The aha moment]
|
||||
[55:34][The approach we will be taking for low latency]
|
||||
[57:36][The higher latency approach]
|
||||
[1:01:14][Another snag]
|
||||
[1:07:08][Putting our approach down in words]
|
||||
[1:13:02][Implementing the two case latency handling]
|
||||
[1:18:34][Do over due to deleted code]
|
||||
[1:20:08][Putting in the latency branching code]
|
||||
[1:23:35][Determining if the sound card is latent]
|
||||
[1:26:02][Mapping the WriteCursor and the PlayCursor into the same space]
|
||||
[1:27:51][Overview of the code determining how to write the sound]
|
||||
[1:30:00][Cleaning up]
|
||||
[1:31:22][How can we possibly predict how many bytes the game should write?]
|
||||
[1:33:02][Getting sound output separately with GameGetSoundSamples()]
|
||||
[1:36:45][More cleaning up]
|
||||
[1:37:43][Computing SafetyBytes]
|
||||
[1:39:06][Implementing GameGetSoundSamples() in the game code]
|
||||
[1:40:10][Testing is surprisingly successful, no bugs? NO WAY!]
|
||||
[1:42:47][Improving our sound output debug drawing]
|
||||
[1:48:25][Recording some additional details in our markers]
|
||||
[1:56:36][An assertion fires and some cleanup]
|
||||
[1:58:33][First look at the debug drawing output and adding global pause key]
|
||||
[2:02:38][Taking a good look at the debug drawing output]
|
||||
[2:04:40][A couple early questions]
|
||||
[2:05:47][Final Thoughts?]
|
||||
[2:06:42][Drawing another debug marker]
|
||||
[2:10:53][Improving our estimate of the PlayCursor position to reduce latency]
|
||||
[2:17:59][Taking a look at how our estimate lines up]
|
||||
[2:19:13][Drawing our 480 sample jitter window]
|
||||
[2:22:15][Q&A]
|
||||
[2:22:58][Did you try the audio without OBS?]
|
||||
[2:24:15][Is it inexpensive to query for the play cursor and the write cursor?]
|
||||
[2:25:03][Audio seems to be the most complex part until now, which will be the next most complicated thing?]
|
||||
[2:26:58][Audio asserts are a pain when you're debugging other things. Change to log messages.]
|
||||
[2:27:46][If we had a buffer that played from start to finish, would it be a valid syncing method to manually set AudioTimer = VideoTimer?]
|
||||
[2:28:45][Fully visualize waveforms and remove gradient. Turn entire thing into massive audio visualizer.]
|
||||
[2:29:42][Could you please increase ToneHz to 512, my crappy laptop speakers can't output 256?]
|
||||
[2:30:29][Will this audio system be able to handle music and sound, or will the game have to mux the audio for us?]
|
||||
[2:31:08][How will you make sure that you don't have regressions in some parts that are not that easy to spot right away?]
|
||||
[2:32:39][Why is the pitch of the sound changing after the game has been running a little while?]
|
||||
[2:31:54][I'm sorry if I'm being slow, but I still don't truly understand why exactly the audio is jumping. It just seems like we should be able to handle it more simply.]
|
||||
[2:39:55][Callback to earlier half of question: (I'm sorry if I'm being slow, but I don't truly understand why the audio is skipping.) The original audio skipped when we moved the latency to be inside of three frames.]
|
||||
[2:42:25][If it's not too much of an issue, can we have line numbers on the side when you are coding so we can get a grip of where you are.]
|
||||
[2:43:08][It's more likely to be the accumulation of a small value onto a larger value that is a numerical problem. Mantissas not lining up.]
|
||||
[2:44:03][Wrap-up]
|
||||
[/video]
|
|
@ -0,0 +1,33 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Loading Game Code Dynamically" vod_platform=youtube id=WMSBRk5WG58 annotator=schme annotator=Kelimion]
|
||||
[1:29][Intro to the episode]
|
||||
[3:06][About implementing and using a scripting languages]
|
||||
[6:15][Benefits of loading game code dynamically]
|
||||
[8:29][Starting on dynamic code loading]
|
||||
[11:38][Separating platform and game code to different translation units]
|
||||
[15:56][Getting functions from game dll to the platform executable]
|
||||
[24:29][Getting Functions from platform executable to the game dll]
|
||||
[31:00][Searching compiler flags for building a dll]
|
||||
[35:18][Dll main]
|
||||
[40:08][Exporting functions from a dll]
|
||||
[47:27][Loading and unloading the game dll on the fly]
|
||||
[50:17][Moving local persist variables from the dll to game_state]
|
||||
[52:31][Avoid locking the dll to allow rewriting]
|
||||
[1:02:00][Episode recap]
|
||||
[1:03:37][Q&A]
|
||||
[1:03:51][-LD to build a dll and removing incremental building]
|
||||
[1:06:23][Question: We have small code right now. How does dynamic linking and compiling to an exe work with huge games that are multiple gigs?]
|
||||
[1:07:39][Casey spoils tomorrows stream by telling people not to spoil it]
|
||||
[1:08:00][Short recap on loops]
|
||||
[1:10:28][Question: Do you recommend playing around with dll files, or are they mainly used in specific cases?]
|
||||
[1:11:05][Question: Can someone now create a dummy handmade.dll and use it to intercept the GameUpdateAndRender function to get a pointer to game memory and change stuff. Is security something you will cover in a later stream?]
|
||||
[1:13:34][Question: We've got a tiny application right now so if code takes minutes to compile, how are we going to do what we just did?]
|
||||
[1:16:08][Question: Would you be able to load the dll yourself using ReadFile() and implement getProcAddress() as well, assuming there's an easy way to make the memory executable like mmap()]
|
||||
[1:18:16][Question: Is this technique still possible without using passing of the large memory blob between the dll and the exe?]
|
||||
[1:21:00][Question: Does the dll prevent the compiler from inlining?]
|
||||
[1:21:47][Question: How are we going to implement dll's on Linux/Mac?]
|
||||
[1:23:02][Question: Are you ever going to write the platform layers for other platforms on the stream in the far future?]
|
||||
[1:24:02][Question: Is the process roughly the same for doing the Linux equivalent of sharing libraries?]
|
||||
[1:25:42][Question: Your #define typedef magic kinda bugs me, in that it hides the arguments/return type away from the implementation. How much of a win is having the signature in one place?]
|
||||
[1:26:54][Question: How does Windows manage memory in a dll? Is there a dll process page? Where are variables made/the statics stored? How is heap managed when allocated from a dll?]
|
||||
[1:37:14][Question: Doesn't Windows know \[who called it\] by the instruction pointers leading up to the VirtualAlloc() call?]
|
||||
[/video]
|
|
@ -0,0 +1,33 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Instantaneous Live Code Editing" vod_platform=youtube id=oijEnriqqcs annotator=dspecht annotator=jacebennett annotator=Miblo annotator=theinternetftw]
|
||||
[2:30][Recap, and cleaning up DLL creation code]
|
||||
[7:25][Trying to set the name of the .pdb file]
|
||||
[9:35][PDBPATH and setting the name of the .pdb file for handmade.cpp]
|
||||
[15:10][Found the command, now Setting random file name with %date% and some crazy batch syntax]
|
||||
[19:00][making DEL less intrusive, by piping output to a file]
|
||||
[24:00][making the reload of the .dll faster]
|
||||
[35:00][Compare File Times]
|
||||
[39:49][Finding the the dir of the executable so we can find the .dll]
|
||||
[50:25][String Processing Code]
|
||||
[1:01:25][Q&A]
|
||||
[1:02:24][Question: How do you manage to time your coding so perfectly]
|
||||
[1:02:34][Question: You mentioned yesterday you had something from a previous days but never did]
|
||||
[1:03:31][Question: Will this capability be in the shipping game or will it only be for debuging]
|
||||
[1:04:15][Question: Does the reload of the dll reset the game]
|
||||
[1:05:07][Question: How much time have you spent planning this game prior to even starting on day 001]
|
||||
[1:06:43][Question: Are you building the game in two sections, Games layer and a Platform layer]
|
||||
[1:07:21][Question: Since DLL's are not on linux or OSX how will we handle automatic reloading of the code]
|
||||
[1:08:13][Question: Why don't you use dynamic buffer allocation]
|
||||
[1:09:09][Question: You said that you are going to show us how to make a game well, what qualifications do you have for that]
|
||||
[1:11:16][Question: Could you expain your method of compressed programing in writing]
|
||||
[1:12:42][Question: When findFirstFile is called does windows actually read anything from disk]
|
||||
[1:13:06][Question: One way to abuse the fact that the game is in a seperate dll is to open the game part up to modders and modders tools]
|
||||
[1:14:03][Question: One common theme in the series so far is that you should not clearn up OS memory on shutdown but OS objects will possibly need to be cleaned up on DLL reload? correct?]
|
||||
[1:17:09][Question: Are we going to see the process of designing the game]
|
||||
[1:20:31][Question: Can you give some examples of code that won't play nice with the dynamic code reloading]
|
||||
[1:22:39][Question: Do you have any opinion on lua for a scripting language, config loading]
|
||||
[1:24:09][Question: Do you think this method of hot reloading of the code can be used in other types of software other then a game]
|
||||
[1:25:01][Question: Do you think there is a case for DSLs instead of using C]
|
||||
[1:26:20][Question: One benefit of lua is that you don't have to recompile]
|
||||
[1:26:45][Question: Is the game engine going to be generic or custom to this game]
|
||||
[1:28:16][Question: Do I recommend C over C++]
|
||||
[/video]
|
|
@ -0,0 +1,57 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Looped Live Code Editing" vod_platform=youtube id=xrUSrVvB21c annotator=schme annotator=garlandobloom]
|
||||
[2:45][Review of the live code editing feature]
|
||||
[4:13][Building a demo to show gameplay tuning workflow]
|
||||
[9:00][Testing the demo]
|
||||
[11:20][Adding jumping]
|
||||
[14:10][Necessary improvements to square drawing]
|
||||
[15:44][Jump tuning]
|
||||
[16:52][Problems with gameplay tuning and a solution]
|
||||
[18:19][Making a loop editor for code]
|
||||
[19:33][The ease of storing the input stream in memory]
|
||||
[20:25][Writing it out to disk instead]
|
||||
[21:49][Creating a win32_state structure that we can pass around]
|
||||
[22:30][Press L to record]
|
||||
[24:41][Usage code for recording and playback]
|
||||
[25:36][Implementing the record and playback functions]
|
||||
[28:14][Functions to handle the recording output file]
|
||||
[31:04][Functions to handle reading in the recording file]
|
||||
[32:22][Some code to loop the input playback]
|
||||
[34:56][Testing the recording and playback]
|
||||
[37:48][Bug-fixing]
|
||||
[40:06][Input record success, moving on to record game state]
|
||||
[42:27][Implementing recording of game state]
|
||||
[47:54][Testing, and a failure to loop]
|
||||
[49:43][Successful looped editing demonstration]
|
||||
[54:50][Playing around with window types]
|
||||
[59:47][Transparent Window! And Access Violation!]
|
||||
[1:01:56][Improvements to transparent window.]
|
||||
[1:03:47][Final Thoughts]
|
||||
[1:06:24][Q&A]
|
||||
[1:06:50][Does Win32PlayBackInput need to return status in case the file read fails and/or reaches the end, since in those cases the function output data structures will be stale or invalid?]
|
||||
[1:08:36][Will this break when you make changes to the game_state structure?]
|
||||
[1:11:30][Why didn't you use a switch for all the VKCode stuff?]
|
||||
[1:11:54][Since it's mostly zeroes, do you think it'd be worth writing out the game state in a sparse way using a simple RLE or something, or is performance sufficient? Or perhaps that would make performance worse?]
|
||||
[1:13:22][What's on the schedule for next week?]
|
||||
[1:13:57][Are you going to show how to create more debug tools like this?]
|
||||
[1:15:01][Regarding saving game state for recording, won't we run into problems if we port a system that doesn't allow us to specify a base address?]
|
||||
[1:16:08][Any chance for a high-level overview while cleaning up?]
|
||||
[1:16:45][Isn't a two gig snapshot of your game memory crazy huge though?]
|
||||
[1:19:17][I think your sine wave is a tad bit off on land of the jump.]
|
||||
[1:19:38][I'm thinking maybe less about the error and more about what happens at the end of the stream when it loops, doesn't that generate an extra repeated input event played back, or am I missing something?]
|
||||
[1:21:25][Can you clarify if function pointers are part of that game_state block, maybe elaborate on what could ever cause it to fail or misalign?]
|
||||
[1:24:26][How can we make the playback work if we have no base address?]
|
||||
[1:25:40][Wouldn't the address spaces of two game_state's clash?]
|
||||
[1:27:00][Would a memory-mapped file that doesn't commit to disk be faster to read/write from?]
|
||||
[1:27:58][I thought you were going to use the memory snapshot as a game save, but you're using it like a save state in an emulator.]
|
||||
[1:28:30][How easy do you think it is to re-arrange an existing codebase so that it supports the instant live code editing feature, and what steps would need to be taken to get there?]
|
||||
[1:30:02][Will there be a Christmas special?]
|
||||
[1:30:18][How will replay work once you have start-up logic for the game? How will it be skipped? Will it just work?]
|
||||
[1:31:04][Clarification of earlier question (How often do you look up code?) How often do you study code on your own?]
|
||||
[1:33:22][Perhaps ReBaseImage() regarding loading dll at location?]
|
||||
[1:33:51][Suggestion to add -mix to the linker for fixed dll location.]
|
||||
[1:35:14][How long did it take for you to get to a point where you can concieve of a feature and with little effort know exactly what you need to accomplish to realize that feature?]
|
||||
[1:38:43][Couldn't you create an offset pointer struct which overloads the unary * operator?]
|
||||
[1:40:43][Have you got some good explanation on how you architect code, is that in the text you wrote about your work on the Witness?]
|
||||
[1:42:06][I have to spend a lot of time unlearning what I was taught just to get to features which should be easy, but were made hard by the kind of programming I learned in school. Have you had a similar painful unlearning process?]
|
||||
[1:44:51][Wrap-up]
|
||||
[/video]
|
|
@ -0,0 +1,53 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Win32 Platform Layer Cleanup" vod_platform=youtube id=nBBTPRO8AMI annotator=garlandobloom annotator=theinternetftw]
|
||||
[1:05][Goals for the day]
|
||||
[2:50][Fixing a dumb audio bug]
|
||||
[8:18][Failing to find a supposed SUCCEEDED related bug]
|
||||
[9:48][Concerns about WasDown/IsDown]
|
||||
[12:25][Fixing a bug in our gamepad input handling]
|
||||
[14:37][Fun? with Krita]
|
||||
[16:47][Back to Paint to illustrate the input bugfix]
|
||||
[20:57][Changing our renderbuffer to have fixed dimensions]
|
||||
[23:39][Improving the build.bat file]
|
||||
[25:00][Changing the write location for our .hmi files]
|
||||
[27:37][Writing some helper functions to create the dll path]
|
||||
[33:51][Step-through]
|
||||
[36:12][Taking our helper functions and using them elsewhere]
|
||||
[40:23][Testing the changes to input recording]
|
||||
[41:22][Input Assert firing and turning off Topmost window]
|
||||
[42:45][Changing Win32GetLastWriteTime() to use GetFileAttributesEx()]
|
||||
[46:02][Using DeviceIoControl to potentially speed up input recording hitch]
|
||||
[51:06][Removing stub functions from handmade.h for easier porting]
|
||||
[53:50][Looking at improvments to our 1GB VirtualAlloc()]
|
||||
[55:12][Whiteboard illustration of virtual memory]
|
||||
[59:00][Looking at real world virtual memory addresses]
|
||||
[1:01:39][Translation of virtual memory addresses into physical memory by the TLB]
|
||||
[1:04:06][So what are large pages?]
|
||||
[1:05:26][Changing VirtualAlloc() to use large pages]
|
||||
[1:07:18][Putting aside the large page support for later]
|
||||
[1:08:26][Q&A]
|
||||
[1:09:50][Can we go over really fast an overview of the game recording code?]
|
||||
[1:14:16][When you're saving the game_state snapshot, how big is the file?]
|
||||
[1:15:25][Can you check if the StringLength() needs a win32 prefix, or is this game code?]
|
||||
[1:15:37][How many lines of code is the finished game estimated to be?]
|
||||
[1:16:02][Maybe use two randoms in your batch file to get a more unique file name?]
|
||||
[1:16:20][Any advice on where I could go or what to do to pick up a bit more coding or knowledge experience?]
|
||||
[1:17:05][What is a good example of well-written game code? Everyone talks about the DOOM source code.]
|
||||
[1:17:29][Assuming you want to record exactly what happens in the game, how would the looping handle random values; Say enemy bullets that are fired at random angles?]
|
||||
[1:18:23][If we dump memory to disk in a large-scale application, wouldn't that cause more than a 1GB footprint for every state?]
|
||||
[1:19:34][I don't get the stuff where you declare a variable without initializing it, and then you use the address to it in a function call. Is that a dummy thing, or what is it used for?]
|
||||
[1:21:49][You can make the recording instantaneous using copy-on-write pages.]
|
||||
[1:22:58][Would the sparse file flags dropped the .hmi file size?]
|
||||
[1:23:29][I'm still not sure why we're using the Windows API to get memory instead of the standard library. Why are we making Windows calls if we are supposed to be doing everything from scratch?]
|
||||
[1:24:49][As the game grows, how are you going to partition the game memory between systems to keep the record-and-playback feature working?]
|
||||
[1:25:20][Would it make sense to temporary lessen the size of game memory we don't use at the moment anyway?]
|
||||
[1:25:54][Are you happy with the timing FPS results? I found an old article on _rdtsc() for more accurate timing.]
|
||||
[1:27:01][When would the Mac code start? I am following with Windows in a VM and it's really slow.]
|
||||
[1:27:46][Is there any negative effects of making the page size bigger?]
|
||||
[1:29:47][How do you calculate the size of a struct?]
|
||||
[1:31:38][Can you add line numbers, so those of us following along have an easier time?]
|
||||
[1:33:50][I believe some people think that the game_state is saved every time with the input, whereas it is only saved at the beginning of the recording and then modified through input playback.]
|
||||
[1:34:21][Do you think the recording technique will run into problems if we have multiple threads using the game_state?]
|
||||
[1:35:07][If VirtualAlloc() does not guarantee contiguous memory, could this pose a hindrance to cache optimizations?]
|
||||
[1:36:45][Where can I get earlier versions of the code? The link only gives me the latest version.]
|
||||
[1:37:15][Wrap-up]
|
||||
[/video]
|
|
@ -0,0 +1,79 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Finishing the Win32 Prototyping Layer" vod_platform=youtube id=es-Bou2dIdY annotator=schme annotator=garlandobloom]
|
||||
[1:47][Plans for today]
|
||||
[4:20][Getting the actual monitor refresh rate with GetDeviceCaps()]
|
||||
[10:27][Testing monitor refresh rate getting]
|
||||
[11:17][Preparing for future multi-threading]
|
||||
[17:02][Adding mouse debug functionality to our game input]
|
||||
[23:38][Getting the state of the mouse buttons]
|
||||
[28:27][Testing mouse button functionality]
|
||||
[32:07][Making improvements to replay code]
|
||||
[33:20][It's time to get piggy!]
|
||||
[35:25][Allocating memory for our replay buffers]
|
||||
[38:01][Changing Win32BeginRecordingInput to write to memory]
|
||||
[42:19][Swapping out WriteFile() for CopyMemory()]
|
||||
[46:02][Testing our new recording technique to much disappointment]
|
||||
[49:00][Poor man's profiling]
|
||||
[52:28][Stepping through to find the real culprit]
|
||||
[53:46][Removing SetFilePointerEx() for a massive speedup]
|
||||
[55:31][What we were going to do with memory mapped files]
|
||||
[57:26][Let's try it anyway]
|
||||
[1:03:13][Pulling out input file processing into WinMain()]
|
||||
[1:07:25][Step-through and removal of an assertion]
|
||||
[1:08:55][Debugging the memory mapped file failure]
|
||||
[1:12:24][A peculiar fix]
|
||||
[1:13:18][Review of the recording code]
|
||||
[1:14:32][Splitting the file output into two streams for more speedup]
|
||||
[1:18:20][Testing with some notion of success]
|
||||
[1:21:14][What's the memory bandwidth of Casey's machine?]
|
||||
[1:25:16][Looking at multiple sequential records]
|
||||
[1:28:16][Removing/disabling some debug code for now]
|
||||
[1:30:29][Final Thoughts]
|
||||
[1:31:47][Q&A]
|
||||
[1:32:47][Maybe first copy is causing alloc and zero on fault, maybe a second copy would be fast]
|
||||
[1:35:28][An interesting part of this project is that you're implementing all the compenents yourself that you'd take as given in an existing game engine. That said, do you intend for these components to be reusable in future projects?]
|
||||
[1:36:32][Why the pig hat?]
|
||||
[1:36:44][Why don't you use the Visual Studio profiler and anaylze performance?]
|
||||
[1:37:06][Remark about 300ms being 10 frames, not 3 frames]
|
||||
[1:37:39][Does it lag if you save to a smaller file size?]
|
||||
[1:38:59][Isn't the CPU Memory bandwidth only valid for on-die memory?]
|
||||
[1:40:23][Is the intent of saving the complete game state to support something like a rewind function that Braid allows?]
|
||||
[1:41:07][Will you do a string pool?]
|
||||
[1:41:26][When you say the platform non-specific layer, does that mean game code and renderer and logging sorts of things, or is there a sharper distinction between some of those?]
|
||||
[1:42:15][A quick test on my PC gave me around 3 GB/s...]
|
||||
[1:43:17][Is it time to split the source into more files?]
|
||||
[1:43:40][Would a non-caching write be faster for the memory copy? You know the SSE write instructions that bypass the cache?]
|
||||
[1:45:14][When are the four .hmi files created?]
|
||||
[1:45:50][...An AMD A8-6400k (Follow-up to 3GB/s memory bandwidth mention)]
|
||||
[1:47:37][Are you going to do a moblie port? (Android for example) Would the game loop of a mobile game be any different?]
|
||||
[1:48:51][How about disk write speed and access time?]
|
||||
[1:49:30][Why is the CPU even involved in a memory copy like this?]
|
||||
[1:51:01][What was the reason for choosing GetCursorPos() instead of just responding to the WM_MOUSEMOVE message? Is the message pump not fast enough?]
|
||||
[1:51:25][Have you ever programmed in Java? For how long?]
|
||||
[1:52:27][(continuation of Why is the CPU even involved question) Wouldn't the copy speed mostly depend on how quickly memory from one part of the memory gets to the CPU and back? In fact, in my mind it seems like large copies are something that could skip the CPU entirely unless it has something to do with paging.]
|
||||
[1:54:32][Is it worth writing games in Java?]
|
||||
[1:57:03][Are you in dual-channel write mode on your system?]
|
||||
[1:57:13][Does the Megabytes have any effect on the performance of the memory?]
|
||||
[1:57:38][Tom Forsyth comment about modern DMA units not being available to users]
|
||||
[1:58:39][What do you think of Test Driven Development?]
|
||||
[1:59:27][Can you explain the bit shifting?]
|
||||
[2:04:24][You can create a performance heavy application in Java without the garbage collection if you configure it to run as real time instead of virtually]
|
||||
[2:06:33][Do you consider Visual Basic a programming language?]
|
||||
[2:07:16][On the memory CPU speed, I see the answer is that the hardware doesn't do this. I guess I'm just envisioning a system where the gigabyte of memory never visits the CPU. I am envisioning a system where the memory can receive an instruction that says locally move a gigabyte over to this location]
|
||||
[2:08:51][Tom Forsyth comment on using LARGE_INTEGER instead of the bit shifting]
|
||||
[2:11:00][In your mind, what would be a good way to demonstrate to a potential employer proficiency in the type of engine programming you are teaching?]
|
||||
[2:12:38][Thanks (And a comment from Casey on the success of the stream)]
|
||||
[2:13:29][What defines the boundary between a high-level language and a low-level language?]
|
||||
[2:16:40][When will you start actual game logic?]
|
||||
[2:16:53][Have you heard of the Rust language?]
|
||||
[2:17:31][Have you ever dealt with programmer burnout? Or how do you deal with the fact there are days almost no code gets written and on some days massive amounts of code gets written?]
|
||||
[2:20:28][Any source or book recommendation for understanding the concepts you used better?]
|
||||
[2:21:09][Have you seen Game Programming Patterns by Robert Nystrom? Are you going to use any design patterns?]
|
||||
[2:22:31][Do you find it useful to learn many different languages to gain perspective?]
|
||||
[2:25:11][What do you think about using VCS for one man projects?]
|
||||
[2:25:53][What's your mindset when looking at a problem that's new? How you approach a new coding problem that you have no pre-defined idea how to solve?]
|
||||
[2:26:33][Will you write a book after Handmade Hero is done?]
|
||||
[2:26:46][How long have you been in the industry?]
|
||||
[2:26:59][I've always been a hobbyist, the more I've learned over the last year, the more I love programming. In your opinion is going back for a four-year CS degree a waste if I want to make things that don't suck?]
|
||||
[2:27:22][Perhaps the problem with high-level languages is that they are less general, but more domain specific in the first place]
|
||||
[2:28:05][How does your source code control differ from something like Git or SVN?]
|
||||
[/video]
|
|
@ -0,0 +1,48 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Introduction to Game Architecture" vod_platform=youtube id=rPJfadFSCyQ annotator=theinternetftw]
|
||||
[0:00][First day of Programming the Actual Game]
|
||||
[2:56][We'll know how everything happens above the platform layer]
|
||||
[6:05][Software Architecture]
|
||||
[6:50][...vs. Real Architecture]
|
||||
[9:40][Taking the metaphor literally: UML as Blueprint]
|
||||
[11:00][The problem with that]
|
||||
[13:17][An alternative view: Software Designer as Urban Planner]
|
||||
[15:15][The freedom of software: malleable architecture]
|
||||
[17:25][Software Design: How the city works]
|
||||
[20:35][The Art of Defining Boundaries]
|
||||
[21:36][Why you want boundaries]
|
||||
[25:41][Metrics for Architecture]
|
||||
[34:12][Game Architecture]
|
||||
[34:55][What we've done]
|
||||
[38:07][What's to come]
|
||||
[39:05][Principles]
|
||||
[42:28][Input->Update->Render]
|
||||
[44:54][Coupling and the Cache]
|
||||
[48:54][Resources: Load vs Stream]
|
||||
[55:58][Immediate mode vs. Retained mode]
|
||||
[1:03:00][Is Immediate Mode/Retained Mode like IoC (inversion of control) / Dependency Injection \[n.b. No it's not -ed\]]
|
||||
[1:03:14][Is it okay that we're using a fixed time step when users might not make 30fps?]
|
||||
[1:04:20][Game won't run at a fixed timestep: we'll take in t as a param]
|
||||
[1:05:05][Are you going to work with Virtual File Systems to store resources?]
|
||||
[1:05:34][On rendering while updating: What about when the render of something at the top of update() would've changed if we'd known about something that's at the bottom?]
|
||||
[1:06:25][Update dependencies are a general problem that should be solved by the architect]
|
||||
[1:07:25][What happens when you need to render in a different order than you update?]
|
||||
[1:08:14][Explain the variable, demands Naysayer88]
|
||||
[1:09:16][How do you handle update/render at different frame rates?]
|
||||
[1:10:00][When you say do update/render together, do you mean do it per entity?]
|
||||
[1:10:35][Are we planning on networking?]
|
||||
[1:11:00][How are you going to handle shaders?]
|
||||
[1:11:11][What language are you using primarily? Where can we view old streams?]
|
||||
[1:12:10][Would a memory mapped virtual filesystem be a bad move?]
|
||||
[1:13:39][Will handmade use loading or streaming?]
|
||||
[1:13:52][Can you go over how streaming fits in to the GUAR?]
|
||||
[1:15:09][Will combining update and render limit multithreading?]
|
||||
[1:16:47][Treatise on threading]
|
||||
[1:20:43][Since the eye can only see at 70fps \[citation needed -ed\], should we set a max fps?]
|
||||
[1:21:28][How will we handle vsync?]
|
||||
[1:22:08][Couldn't you store groups together to win some on a split update / render?]
|
||||
[1:23:25][Async job system?]
|
||||
[1:24:20][Whennn willl youuu worrrkkk onnn theee gammmeeee?!?!?!?!?!11!!]
|
||||
[1:24:53][Will we make a physics engine?]
|
||||
[1:25:17][Is it okay to post a js/html5 port on my github?]
|
||||
[1:26:54][Thanks / Next time on... / Holiday Hours]
|
||||
[/video]
|
|
@ -0,0 +1,66 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Exploration-based Architecture" vod_platform=youtube id=Mi98zVBb6Wk annotator=theinternetftw]
|
||||
[0:00][Welcome]
|
||||
[2:22][Evolution of a Project]
|
||||
[6:43][How to drive towards an unknown destination]
|
||||
[9:36][The dangers of pre-planning]
|
||||
[12:27][The exploration two-step]
|
||||
[16:22][Game engine goals]
|
||||
[17:01][LoZ Influence]
|
||||
[19:56][Tile Map - What to modernize, what to keep]
|
||||
[24:12][Goals for Procedural Generation of Levels]
|
||||
[31:12][Rich Combinatoric Interactions]
|
||||
[34:44][There's no plan, folks]
|
||||
[36:06][The coding begins]
|
||||
[36:30][Add something we forgot]
|
||||
[38:08][Clean out old debug visuals/sounds]
|
||||
[42:35][Resolution goals]
|
||||
[47:30][Let's draw a rectangle]
|
||||
[49:30][What to know about bounds for drawing geometry]
|
||||
[54:21][Coding drawRectangle]
|
||||
[1:02:48][Rounding floats to ints]
|
||||
[1:05:32][Testing drawRectangle]
|
||||
[1:10:48][What's that link error when you compile?]
|
||||
[1:11:52][What things are good to put in a portfolio?]
|
||||
[1:12:15][Does this work?]
|
||||
[1:12:26][Thought on making this all completely functional?]
|
||||
[1:14:10][How do you do compression programming with big teams?]
|
||||
[1:16:00][Do you think writing structs for things like vectors is good?]
|
||||
[1:17:35][Are you going to use linear texture layout or something fancy?]
|
||||
[1:17:50][If C didn't exist what language would you use?]
|
||||
[1:18:50][Where can we find out info on engine architectures?]
|
||||
[1:19:46][Particulars on procedural generation? Will dungeons regenerate every time you enter]
|
||||
[1:20:49][Will the game be generated as you go?]
|
||||
[1:21:58][What with Jon Blow and Variables?]
|
||||
[1:23:07][Will you use fixed point?]
|
||||
[1:23:47][How old were you in the picture on mollyrocket.com?]
|
||||
[1:24:19][Why are subpixels better than pixels?]
|
||||
[1:25:26][Will you be growing a beard?]
|
||||
[1:25:38][Are you going to use linear texture layout or something fancy and swizzly (repeat, but answered this time)?]
|
||||
[1:26:23][Would the player really notice a 1-2 frame lag of sound in this game?]
|
||||
[1:27:28][How different would initial rendering be if the game was vector-based?]
|
||||
[1:28:15][You cut me deep, Casey.]
|
||||
[1:28:32][What's bad about OOP?]
|
||||
[1:30:50][I'm having trouble understanding the sound stuff, should I worry?]
|
||||
[1:31:53][Did you work on NWN2?]
|
||||
[1:32:51][Can the compiler optimize the rect draw based on (lack of) aliasing?]
|
||||
[1:34:30][Will we be doing Antialiasing?]
|
||||
[1:34:36][Future old-man baldness strategies?]
|
||||
[1:34:54][Can you explain the subpixel stuff via video?]
|
||||
[1:35:10][Are you making a runescape clone?]
|
||||
[1:35:15][What do you suggest for mobile game dev?]
|
||||
[1:35:30][Will we be using DX11 for the rendering layer?]
|
||||
[1:35:45][Pokemans? \[no\]]
|
||||
[1:35:56][Disparaging Python?]
|
||||
[1:36:39][Dinosaurs? \[are cool\]]
|
||||
[1:36:43][How can I get a (good) job (like you)?]
|
||||
[1:36:54][Lazer sharks? \[also cool\]]
|
||||
[1:36:58][Mounts? \[probably not?\]]
|
||||
[1:37:01][How often do tech limitations matter?]
|
||||
[1:38:02][Member functions?]
|
||||
[1:38:16][Owl of shame is navi?]
|
||||
[1:38:31][How will you use the game memory block?]
|
||||
[1:39:01][What if MinX and MaxX are both less than 0?]
|
||||
[1:40:05][In a perfect world... Pokemans? \[no\]]
|
||||
[1:40:29][Moral message? Hired a writer?]
|
||||
[1:40:47][Handy Links / Holiday Hours / Happy Coding]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Drawing a Tile Map" vod_platform=youtube id=QGmQ714rlAc annotator=powerc9000 annotator=dspecht annotator=schme annotator=theinternetftw]
|
||||
[0:54][Overview of the day]
|
||||
[3:30][Floating point color discussion]
|
||||
[16:50][Actually doing the color in floating point]
|
||||
[23:40][Showing some of the possible structs we will want to pull out]
|
||||
[25:03][Starting a basic tile map]
|
||||
[28:10][Looping through the tilemap to draw]
|
||||
[37:32][Getting a player to the screen]
|
||||
[46:26][Basic character movement]
|
||||
[48:00][Debugging slow player movement]
|
||||
[58:34][Q&A]
|
||||
[59:00][Question: Is Sleep() still making us miscalculate the fps]
|
||||
[1:01:15][Question: dtForFrame is only in one of the inputs]
|
||||
[1:03:07][Question: Maybe we should sync our frames with vsync due to it dropping our frames]
|
||||
[1:03:50][Question: On the topic of tilemap size maybe use smaller tiles then use 2 tiles for doors]
|
||||
[1:04:26][Question: Why not use anything created before like sdl, opengl, and so on (new person question)]
|
||||
[1:05:43][Question: Fixed-point or floating point]
|
||||
[1:06:22][Question: Would not anyone expect 4pixels per frame at 60fps be a little jerky]
|
||||
[1:07:28][Question: Yesterday you discussed explorative programming. How do you compare that with AGILE development style?]
|
||||
[1:10:05][Question: Was procrastination a problem for you?]
|
||||
[1:11:33][Question: Could all the print output cause the lag in the input?]
|
||||
[1:12:07][Question: Use space on top/bottom for UI]
|
||||
[1:12:34][Question: Can we pack the colors in a struct?]
|
||||
[1:12:41][Question: Is there a reason to set the tiles to a square other than ease of use?]
|
||||
[1:13:20][Question: Do you add anything to your almond milk other than soaked almonds and water?]
|
||||
[1:13:24][Question: From yesterday's stream how can you tell the difference in how to change the direction of your design or is that a fundamentally hard problem]
|
||||
[1:16:17][Question: Would it be bad to do a rectangle tile, since you get a rectangle by doing an ortho view of it anyway?]
|
||||
[1:18:07][Question: What debugger do you use on Linux?]
|
||||
[1:19:35][Question: Why do we see 9 threads on the program exit?]
|
||||
[1:23:03][Question: Are we locked into a tile size once we get going or can we make that dynamic per level or room in the future?]
|
||||
[1:24:37][Question: What about selling t-shirts?]
|
||||
[1:24:58][Question: With your compression based programming do you find yourself writing facades for everything so you and others can interact with the modules]
|
||||
[1:26:15][Question: Why not use Clang?]
|
||||
[/video]
|
|
@ -0,0 +1,29 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Tile Map Collision Checking" vod_platform=youtube id=EwhVulgF16g annotator=schme annotator=theinternetftw]
|
||||
[2:30][Review of what's currently been done]
|
||||
[3:17][Clearing the screen to black and offsetting the drawable area]
|
||||
[6:49][Player collision with the tilemap]
|
||||
[17:23][Moving player initial position inside the map]
|
||||
[20:31][Clearing only the parts of the screen not drawn on]
|
||||
[23:10][Function for checking if a point is occupied and tile_map struct]
|
||||
[27:05][Accessing tilemap data as 1-dimensional array]
|
||||
[35:16][Adding player width to the collision]
|
||||
[37:50][Making player change the map when walking through a door]
|
||||
[43:56][About storing all tilemaps in one big structure]
|
||||
[50:28][Start on storing and accessing multiple tilemaps and the world struct]
|
||||
[1:01:00][Short recap on where we are]
|
||||
[1:02:16][Q&A]
|
||||
[1:03:10][John Blow points out we haven't initialised the world struct members]
|
||||
[1:03:43][Question: Why does player sometimes stop a pixel before the wall?]
|
||||
[1:14:36][Question: Are your variables for tilemaps too similar to each other or am I just easily confused?]
|
||||
[1:16:12][Question: Is there an advantage on using bool32 instead of using bool 8-bit?]
|
||||
[1:17:07][Question: Can you go over briefly how to encode the tile data in a single uint32?]
|
||||
[1:17:55][Question: Why does left and right side collision work but not the top and bottom?]
|
||||
[1:20:43][Question: Why save TileWidth and Height if those values never change?]
|
||||
[1:21:02][Question: What are the differences between structs and classes?]
|
||||
[1:23:14][Question: Do you always put int32 or can you use only int?]
|
||||
[1:24:45][Question: So int32 is because you want to make the game for 32bit computers?]
|
||||
[1:26:05][The player moves faster diagonally than it's supposed to. Are you planning on fixing that?]
|
||||
[1:27:10][Question: I'm not familiar with #define, what is it used for?]
|
||||
[1:28:34][Question: When you use int32 does it have a different influence on the code than normal ints?]
|
||||
[1:30:05][Making the platform header C compliant]
|
||||
[/video]
|
|
@ -0,0 +1,29 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Moving Between Tile Maps" vod_platform=youtube id=J7suWih0ITQ annotator=schme annotator=theinternetftw]
|
||||
[3:10][Recap]
|
||||
[6:36][About the process of writing code; Messy first, clean after]
|
||||
[7:58][Passing information about tilemap]
|
||||
[10:47][Checking if player is moving to a different tilemap]
|
||||
[12:51][Finding the next tilemap and querying the point]
|
||||
[36:07][Calculating the position in the new tilemap]
|
||||
[42:55][Storing X and Y positions relative to the tile]
|
||||
[56:07][Moving the player on to the new tilemap]
|
||||
[1:00:49][Floor instead of truncate]
|
||||
[1:10:48][Q&A]
|
||||
[1:11:52][Question: Can you talk about the inline keyword? Do you apply any strategies to make sure the compiler does not ignore the request?]
|
||||
[1:13:13][Question: Are we using C or C++?]
|
||||
[1:14:47][Question: How did we start the code for the game?]
|
||||
[1:15:07][Question: What's so bad about including math.h?]
|
||||
[1:15:54][Question: Why not substract 1 if input is under 0, instead of using floor()?]
|
||||
[1:17:09][Question: I thought integers were faster to compute than floats, even if the cpu has a floating-point unit.]
|
||||
[1:19:43][Question: How do you decide when to pack things in a struct?]
|
||||
[1:27:28][Question: Why would we care about screen coordinates? Isn't that just platform code.]
|
||||
[1:29:26][Question: Are you going to make walls obstruct the player the same way the player currently obstructs the walls?]
|
||||
[1:30:17][Question: Can you explain the raw_position and canonical_position again?]
|
||||
[1:32:16][Question: Instead of checking three points on the player, wouldn't it be better to check only the side the player is moving towards?]
|
||||
[1:34:39][Question: Why not have a single set of coordinates for the player that maps the player to a world position?]
|
||||
[1:42:14][Question: Are there any consequences of using inline in early development, i.e harder debugging?]
|
||||
[1:43:22][Question: Wouldn't it be better to call the X and Y variables something more descriptive?]
|
||||
[1:45:52][Question: The game will happen in whole screens without any scrolling or camera movement?]
|
||||
[1:48:13][Question: Could you explain how pointers/references are working or what you use them for and why?]
|
||||
[1:49:02][Question: Was there ever a point in your career where you used these unfortunate structure packing practices?]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Tilemap Coordinate Systems" vod_platform=youtube id=lDp4rqcigZs annotator=theinternetftw]
|
||||
[0:00][Welcome / Recap]
|
||||
[3:46][On Scrolling]
|
||||
[4:54][Scrolling for Free]
|
||||
[6:44][Preview of Coming Attractions: Math Functions]
|
||||
[11:13][Looking at floorf]
|
||||
[13:07][SSE2]
|
||||
[19:48][Optimization flags: letting the compiler do it for you]
|
||||
[24:19][Math utility layer]
|
||||
[27:27][Trig/Vector Math Looms]
|
||||
[28:48][Coordinate Systems: Why we want them]
|
||||
[33:01][Screen coordinates vs All Math Ever]
|
||||
[40:04][Defining size in pixels and meters]
|
||||
[48:00][TODO: Packing our tilemap indexes]
|
||||
[57:34][TODO: Resolution-independent tile-relative position]
|
||||
[59:28][Q&A]
|
||||
[1:00:04][Will we be making a map editor?]
|
||||
[1:00:25][What were you talking about in terms of fast floor?]
|
||||
[1:01:09][Do enough people have SSE4? (n.b. steam hardware survey: ~77% have SSE4, ~99.8% SSE3)]
|
||||
[1:03:57][Can you not store anything and just regenerate everything from seed?]
|
||||
[1:06:51][Suggestions for speeding up floor (/fp:fast)]
|
||||
[1:11:09][Why do you do 'Result = foo(); return Result;'?]
|
||||
[1:14:25][Is it a good idea to be drilling down into intrinsics this early on?]
|
||||
[1:15:47][Is tile-relative for the real32 coordinates better than tilepage-relative?]
|
||||
[1:18:30][Why not just store location in world coordinates and div/mod to get tile info?]
|
||||
[1:19:56][Could our sparseness let us better use the top 28 bits of the tilepage index?]
|
||||
[1:24:02][Do you know of the intel intrinsics guide?]
|
||||
[1:25:26][Why is all our game-specific work so far in handmade.cpp?]
|
||||
[1:26:45][Are we going to move the origin to the bottom left?]
|
||||
[1:27:14][Line-drawing suggestion]
|
||||
[1:28:03][Will you be able to find ARM equivalents to your intel-specific instructions?]
|
||||
[1:29:36][How are we going to deal with different types of tiles?]
|
||||
[1:30:35][Week Roadmap / Outro]
|
||||
[/video]
|
|
@ -0,0 +1,31 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Unified Position Representation" vod_platform=youtube id=vI39C4iR8P0 annotator=schme annotator=theinternetftw]
|
||||
[1:37][Recap on what we're set out to do]
|
||||
[6:15][About canonical position and using it for the player position]
|
||||
[13:07][GetCanonicalPosition() to RecanonicalPosition()]
|
||||
[32:02][Debugging the new code]
|
||||
[38:14][Movement units from pixels to meters per second]
|
||||
[41:09][Recanonicalize edge case debugging after assertion fail]
|
||||
[50:04][Back to changing movement units]
|
||||
[53:40][Casey enjoying the little things]
|
||||
[57:41][Debugging player position]
|
||||
[1:03:42][Q&A]
|
||||
[1:04:19][Would this be the time to put on screen text for debug info?]
|
||||
[1:05:15][What is the variable called 'Gray'?]
|
||||
[1:05:55][How does the difficulty of conceptualising this type of code compare to say coding the backend to a web application?]
|
||||
[1:07:03][The window title bar is a nice place to spit out some text!]
|
||||
[1:07:37][About replay buffers: I don't think we ever use the 0th buffer in the Win32State]
|
||||
[1:13:01][When do you decide to add visual cues to help with debugging?]
|
||||
[1:14:28][What are your thoughts on the progress you make daily?]
|
||||
[1:16:05][Does the code actually handle skipping a tilemap?]
|
||||
[1:16:57][Can the player go diagonally through two wall tiles joined by corners with the current collision detection code?]
|
||||
[1:18:19][Why are you so fond of inline?]
|
||||
[1:20:38][Are you going to have input envelopes for feel like acceleration and fricksion?]
|
||||
[1:21:04][Can you explain what you meant by canonicalization in some simpler terms?]
|
||||
[1:26:11][Would this kind of code be good for unit tests/fuzz tests to make sure strange corner cases don't creep around?]
|
||||
[1:27:10][Are there reasons why programmers of older adventure games chose to move the character around the map and not vice versa?]
|
||||
[1:29:32][Earlier you said const is ugly? Ugly because of how it looks or for some other reason?]
|
||||
[1:31:49][What's your preferred 2D coordinate system? Y going up or down?]
|
||||
[1:32:48][Now that there's no raw_position can we rename canonical_position to position and recanonicalize to fix or rebase?]
|
||||
[1:33:18][Will we be using the tilemap for path finding or some other way to get smoother movement?]
|
||||
[1:33:51][Will you release your version control system?]
|
||||
[/video]
|
|
@ -0,0 +1,39 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Virtualized Tile Maps" vod_platform=youtube id=iHSAOSYOt9E annotator=jacebennett annotator=theinternetftw]
|
||||
[2:03][Review of position representation]
|
||||
[2:35][Today's agenda]
|
||||
[3:55][world_position and changing y-axis]
|
||||
[12:00][the problem with floating point for positions]
|
||||
[16:38][solution: integers and floats]
|
||||
[19:33][sidebar: scrolling the screen works fine too]
|
||||
[20:07][big idea: tile chunks and sparse storage]
|
||||
[26:33][implementing our new coordinate system]
|
||||
[30:56][tangent: toroidal topology]
|
||||
[35:55][back to implementation of new coordinates]
|
||||
[37:18][extracting chunk coordinates from a world_position]
|
||||
[44:05][implementing tile chunks]
|
||||
[50:21][Setting up test data]
|
||||
[50:50][emacs keyboard macro roulette]
|
||||
[54:06][rendering from chunks using new coordinate system]
|
||||
[54:47][super piggy!]
|
||||
[58:45][debugging commences]
|
||||
[1:00:48][success]
|
||||
[1:01:20][greed: simple scrolling]
|
||||
[1:07:39][success again... finally]
|
||||
[1:08:24][Q&A]
|
||||
[1:09:06][Why not compute the chunk mask from the chunk shift?]
|
||||
[1:14:04][How did you generate the map? (A: he hasn't yet, it was typed in)]
|
||||
[1:14:26][How will you do a third dimension in the new coordinate system?]
|
||||
[1:16:04][How will you handle screen boundaries with the new chunk size?]
|
||||
[1:17:06][Is a chunk a quarter of our test map?]
|
||||
[1:17:38][How about operator overloading?]
|
||||
[1:18:18][Shouldn't we be thinking about networking and threading from the start?]
|
||||
[1:19:35][What does 0xFFFFFFFF represent?]
|
||||
[1:20:42][I'm surprised by your choice to flip the y-axis. Does it really make the math that much easier?]
|
||||
[1:22:57][I've never used hex literals, I use UINT32_MAX]
|
||||
[1:23:57][Why not program at a higher level?]
|
||||
[1:26:09][Why introduce meters?]
|
||||
[1:27:03][Will you be checking code complexity, introducing smaller functions?]
|
||||
[1:27:43][Did you set up a Kickstarter?]
|
||||
[1:28:08][Wouldn't it be nice if tiles were 1.0m instead of 1.4m?]
|
||||
[1:28:53][Closing thoughts]
|
||||
[/video]
|
|
@ -0,0 +1,38 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Tile Map Memory" vod_platform=youtube id=IJYTwhqfKLg annotator=abnercoimbre annotator=Miblo annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[4:38][The more you know]
|
||||
[8:25][Time to program]
|
||||
[9:30][Adding smooth scrolling]
|
||||
[12:22][Scrolling works - next test code from yesterday]
|
||||
[14:00][Change position offset to be from the tile center]
|
||||
[17:15][Calculating new tile from center offset (discussion)]
|
||||
[22:10][Implement tile offset from center]
|
||||
[28:10][Player moves faster for testing]
|
||||
[29:53][Make a larger world]
|
||||
[36:40][Start creating a new tile map procedurally]
|
||||
[43:30][Persistent game storage]
|
||||
[49:50][Size type]
|
||||
[1:04:30][Going for it]
|
||||
[1:09:10][Fate]
|
||||
[1:11:00][Summary of the day]
|
||||
[1:14:40][Q&A]
|
||||
[1:16:05][Garlandobloom says hi.]
|
||||
[1:16:18][Can you explain the motivation behind controlling the page granularity.]
|
||||
[1:22:35][Is the memory arena for more temporary objects than we're storing in the game state directly?]
|
||||
[1:25:30][Why not have smooth scrolling?]
|
||||
[1:26:20][We already have the -Oi compiler flag set.]
|
||||
[1:29:32][Does using the memory arena still allow you to hotload your code?]
|
||||
[1:31:31][Will we be implementing our own trig functions?]
|
||||
[1:32:00][Will there be enough memory to store the entire sparse tile map?]
|
||||
[1:32:43][Why not just allocate a large 1D array?]
|
||||
[1:35:40][You're using a lot of pointers here. (Rant)]
|
||||
[1:39:33][Will the memory arena be aligning the assigned memory?]
|
||||
[1:39:52][Don't forget to disable -O2 again.]
|
||||
[1:40:05][Comment on calling sin/cos for x86]
|
||||
[1:40:57][Why don't you use lookup tables for sin/cos (Rant)]
|
||||
[1:42:42][How can you say you don't need to free up memory?]
|
||||
[1:43:28][Is memory access slower than MOV?]
|
||||
[1:44:45][Why are tiles used? What is the real benefit of tile mapping?]
|
||||
[1:46:02][Remark on x87]
|
||||
[1:46:32][Conclusion]
|
||||
[/video]
|
|
@ -0,0 +1,40 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Sparse Tilemap Storage" vod_platform=youtube id=i5-oY8EHkzw annotator=abnercoimbre annotator=Miblo annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[2:10][Making some rooms]
|
||||
[3:30][Making some doors]
|
||||
[5:19][Lots of small rooms and Tile ID values]
|
||||
[8:45][Now you can see the limits of the world]
|
||||
[9:20][Make rooms only in some places - Random Numbers]
|
||||
[11:00][Yangtian Li's Talent]
|
||||
[11:43][Back to random map generation]
|
||||
[27:18][Not sparse yet]
|
||||
[33:30][Making doors]
|
||||
[41:07][Going back to display single room]
|
||||
[44:13][Tile map review]
|
||||
[48:50][Adding the ability to go up and down]
|
||||
[56:50][Continue the madness and add some stairs]
|
||||
[1:03:50][Up and down]
|
||||
[1:07:00][Q&A]
|
||||
[1:07:42][Would you use DeMorgan's Laws?]
|
||||
[1:10:18][Do you have emacs commands with Visual Studio?]
|
||||
[1:10:45][Have you already decided what PRNG algorithm you're going to use?]
|
||||
[1:11:02][As you put the tile map in 3D dimensions, could this be related to a voxel octtree algorithm?]
|
||||
[1:14:18][Is there a reason for the chunk size to be a power of 2?]
|
||||
[1:16:34][When do you use #define instead of local variables?]
|
||||
[1:19:12][Why are you using inline in variables?]
|
||||
[1:19:30][Why not use bit flags for floors and such?]
|
||||
[1:20:14][Why would you prefer an array of tile chunks?]
|
||||
[1:24:30][Are you following Robert C. Martin Rules?]
|
||||
[1:24:40][Are we planning to load/unload tile chunks on demand?]
|
||||
[1:25:40][How much of this code will be used in the final procedural generation?]
|
||||
[1:26:26][Are we planning on making the tile map layered?]
|
||||
[1:27:02][Microphone question.]
|
||||
[1:27:15][Why suffix types with 32 such as bool32?]
|
||||
[1:28:35][Will we need compression for basic sparse tilemap storage?]
|
||||
[1:29:18][How computationally expensive is the sparse storage?]
|
||||
[1:33:12][Should rooms only be created when the player is close to them?]
|
||||
[1:39:01][Are you worried about memory leaks?]
|
||||
[1:39:31][Are ternaries bad?]
|
||||
[1:40:02][Why is not possible to save the full map?]
|
||||
[1:40:25][Conclusion]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Loading BMPs" vod_platform=youtube id=USFTH9mcaKw annotator=schme annotator=abnercoimbre annotator=theinternetftw]
|
||||
[00:00][A recap of previous stream]
|
||||
[2:05][New test assets for Handmade Hero project]
|
||||
[4:46][Introduction to loading BMP files]
|
||||
[6:28][Handle player moving up and down 'stairs' before the BMP loader]
|
||||
[9:20][Context-switch cost]
|
||||
[10:46][Moving up an down implementation]
|
||||
[14:45][Difference between tile map system and tile map positioning system]
|
||||
[15:54][Implementation continued]
|
||||
[17:13][Fixing generation code]
|
||||
[21:45][Generation code fixed]
|
||||
[22:38][Implementation complete. Working tile map system]
|
||||
[25:07][Loading BMP files]
|
||||
[26:30][A talk on the game's screen resolution]
|
||||
[36:10][Implementing loader]
|
||||
[39:20][Crash course on how to read file formats]
|
||||
[43:58][Debugging a BMP file in memory]
|
||||
[49:00][Processing the BMP file header]
|
||||
[50:43][Packing a struct to avoid padding]
|
||||
[53:53][Processing the BMP pixels]
|
||||
[59:20][Q&A]
|
||||
[59:44][Perfect pitch would sell that!]
|
||||
[1:00:58][I missed the part where you handled the endianness of the file, or are bitmaps always the same?]
|
||||
[1:01:56][Do you prefer #pragma pack or gcc-like annotation?]
|
||||
[1:02:28][What's your threshold for number of function parameters before putting them into a single structure?]
|
||||
[1:03:17][Could you please describe how the sparse tilemap storage is done so far?]
|
||||
[1:11:13][Why not use a function template to read raw bytes into any struct you cook up, one primitive at a time, instead of compiler annotations?]
|
||||
[1:14:59][How will we handle memory when reading files? Would it be wasteful to read into our memory pool, then only use part of it?]
|
||||
[1:16:41][Could you explain how to handle platform specific data?]
|
||||
[1:19:56][Would it be easy to implement a generic sparse array to solve our tilemap problem (possibly overloading)?]
|
||||
[1:21:02][So we have world chunks and -tiles, didn't we also have screens?]
|
||||
[1:21:45][Why wouldn't you use a function template in the example mentioned before?]
|
||||
[1:27:11][Will you write asset exporters/importers to get the assets into an efficient format or will you rely on the asset creators tools?]
|
||||
[/video]
|
|
@ -0,0 +1,37 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Bitmap Rendering" vod_platform=youtube id=ofMJUSchXwo annotator=schme annotator=Miblo annotator=theinternetftw]
|
||||
[0:19][We're goin' in][quote 164]
|
||||
[2:10][Recap on where we are]
|
||||
[4:12][Debugging image file formats 101, creating structured art]
|
||||
[8:57][Viewing the structured art in the debugger]
|
||||
[11:35][Changing the art to give better information]
|
||||
[13:38][Reverse engineering the byte order]
|
||||
[16:55][Why to know how to do this]
|
||||
[19:09][Shifting the alpha values to align with our pixel format]
|
||||
[22:19][Top-down vs bottom-up and filling the backbuffer]
|
||||
[29:14][Loading the actual test art]
|
||||
[31:55][Return relevant information about the bitmap]
|
||||
[34:52][Loading hero bitmaps]
|
||||
[45:07][Displaying hero bitmaps]
|
||||
[46:10][Debugging busted hero bitmaps]
|
||||
[1:03:08][Getting more info from the bitmap headers]
|
||||
[1:07:37][Q&A]
|
||||
[1:08:10][Stream spots a typo]
|
||||
[1:08:40][Stream spots another typo]
|
||||
[1:09:09][Will we stick to using bitmaps for the duration of handmade hero, or delve into the lands of PNG?]
|
||||
[1:10:19][What's the advantage to defining the bitmap header yourself instead of using Windows's?]
|
||||
[1:11:04][Are we converting our loaded images to a runtime texture format?]
|
||||
[1:11:40][Why not use a simple custom format for assets?]
|
||||
[1:11:50][PNG is lossless]
|
||||
[1:12:37][Are you going to do different blending modes than alpha blending?]
|
||||
[1:14:10][Should asset loading code be in the platform specific or independent code?]
|
||||
[1:15:03][Correction to alpha blending question: sub-pixel rendering]
|
||||
[1:19:32][When we get alpha blending, will we think about gamma correction?]
|
||||
[1:20:37][Will we be doing resampling to get bitmaps on screen with arbitrary sizes?]
|
||||
[1:20:56][Will Handmade Hero have Mordenkainen's faithful watchdog?]
|
||||
[1:21:35][Cool command line texture is homemade]
|
||||
[1:21:43][Are bitmaps going to be in an atlas file? *reminder on what kinds of questions to ask*]
|
||||
[1:23:28][I saw a height * (width - 1), should that have been (height * width) - 1?]
|
||||
[1:26:56][In tiles code, will the area where it's possible to move be imported in bitmaps too?]
|
||||
[1:27:56][You can simplify DrawBitmap() by changing MaxX initialisation to MinX+Bitmap->Width, same for height]
|
||||
[1:29:00][Why not embrace the inverted bitmap format?]
|
||||
[/video]
|
|
@ -0,0 +1,42 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Linear Bitmap Blending" vod_platform=youtube id=ydiHNs1YQoI annotator=schme annotator=effect0r annotator=theinternetftw]
|
||||
[0:00:00][Prestream stuff]
|
||||
[0:09:18][Intro and welcome]
|
||||
[0:10:52][Where we left of from last time]
|
||||
[0:11:17][Fixing the hero's color]
|
||||
[0:16:16][Figuring out what the shift values are]
|
||||
[0:18:48][Bitscanforward]
|
||||
[0:27:53][Renaming bitscanforward to FindLeastSignificantSetBit]
|
||||
[0:29:36][The intrinsics thing]
|
||||
[0:30:16][Finding out what compiler we're on]
|
||||
[0:31:27][Making a comprimise: Allowing the intrinsics file access to the platform layer]
|
||||
[0:33:20][Determining what compiler is being used]
|
||||
[0:41:20][Simple version of using the alpha channel]
|
||||
[0:45:20][Alpha as an opacity value]
|
||||
[0:46:36][Implementing 0-128 off, 129 onwards on for alpha]
|
||||
[0:49:20][The dumb, slow way to do alpha blending.]
|
||||
[0:50:04][Krita crashes..]
|
||||
[0:50:47][Blackboard session explaining alpha blending using the background value]
|
||||
[0:51:01]['Deriving' the formula for a linear blend]
|
||||
[0:58:02][The cannonical form of a linear blend]
|
||||
[0:58:45][How the 't' works in the linear blend formula]
|
||||
[1:00:35][Implementing the floating point version of linear blend]
|
||||
[1:06:55][Drawing the herohead at the location of the player]
|
||||
[1:07:23][Q&A]
|
||||
[1:08:06][Stream spots a typo!]
|
||||
[1:08:37][Stream suggests to assert the bitmap assertion mode!]
|
||||
[1:09:12][You do not need #pragma intrinsic if you include <intrin.h>]
|
||||
[1:10:53][Would it be worthwhile to avoid converting to float while doing the alpha blend?]
|
||||
[1:12:46][Why is the Windows-logo still visible at the top?]
|
||||
[1:14:11][Are there other ways to alpha blend and should you be taking into account which colors are easier to see?]
|
||||
[1:21:06][Are we at all concerned with the destinations alpha?]
|
||||
[1:25:28][Will the final blend favor the source over the destination, or is linear good enough?]
|
||||
[1:25:59][How would you deal with other picture formats such as png, jpeg, etc.]
|
||||
[1:26:53][Why is the mask so complicated to use?]
|
||||
[1:27:51][Did you mean the other compiler LLVM or Clang?]
|
||||
[1:28:37][In the bitscan function what about returning index negative one if not found?]
|
||||
[1:29:04][Can you go over the linear alpha blend diagram again?]
|
||||
[1:34:36][Is the large VirtualAlloc() at the beginning similar to Linux mmap()?]
|
||||
[1:35:51][What bitvalue is 50% brightness?]
|
||||
[1:37:34][Does the display bitmap operation actually do anything with the alpha channel?]
|
||||
[1:37:58][The solid curve on Wikipedias gamma correction is the linear space intensity. Should be what you're looking for.]
|
||||
[/video]
|
|
@ -0,0 +1,48 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Bitmap Rendering Cleanup" vod_platform=youtube id=R8BiV_uYT6E annotator=effect0r annotator=theinternetftw]
|
||||
[0:00:00][Intro and Welcome]
|
||||
[0:04:55][HeroBitmaps structure]
|
||||
[0:05:38][Loading all hero bitmaps]
|
||||
[0:08:03][Drawing loaded bitmaps in the correct order]
|
||||
[0:09:32][Update hero by facing direction based on movement]
|
||||
[0:11:41][Centering the hero on his rectangle]
|
||||
[0:14:20][Finding the center of alignment]
|
||||
[0:15:28][Drawing the bitmap based on alignment]
|
||||
[0:17:35][The bitmap-changing macro]
|
||||
[0:20:09][Changing DrawBitmap() to be based off of top and left alignment]
|
||||
[0:23:29][Explanation of how to draw hero based on alignment]
|
||||
[0:25:45][Changing the game such that the camera stays centered]
|
||||
[0:27:10][Adding the camera's position]
|
||||
[0:29:45][Computing where the player actually is]
|
||||
[0:32:16][Tile map difference]
|
||||
[0:33:56][Accounting for the AbsTile]
|
||||
[0:37:10][Fixing the movement]
|
||||
[0:40:25][Moving the camera to the player in Z]
|
||||
[0:41:09][Keeping the camera locked to the player]
|
||||
[0:47:25][Fixing left and top clipping]
|
||||
[0:48:15][Explanation of how to fix clipping]
|
||||
[0:51:40][Checking the framerate]
|
||||
[0:52:38][Fixing live code loading]
|
||||
[0:59:29][Testing if hotloading is still functioning]
|
||||
[1:00:35][Q&A]
|
||||
[1:01:46][Can you do that live code with a function call? That could just be a poke. -Geneticspecies]
|
||||
[1:02:05][Enumerations. Am I correct to say you've not used them in Handmade Hero yet? I'm guessing this is simply because it's too early to know what will eventually require enumerations and not some other reason.]
|
||||
[1:02:38][Why not layer the individual bodyparts into a single bitmap that way you only have to draw one image instead of three?]
|
||||
[1:03:20][Are you wearing a blue cape like the Handmade Hero today?]
|
||||
[1:03:31][I just wanted to point out that there is a magnifying tool in windows that came with aero]
|
||||
[1:05:09][Don't you want to test the hotloading? -Andysz]
|
||||
[1:05:39][HAHA YOU SWORE! -Garlandobloom]
|
||||
[1:06:07][Can you add a <stddef.h> include to handmade.h?]
|
||||
[1:07:56][Why does the guy have no feet?]
|
||||
[1:08:17][How do you know which compiler options, like clr and standard headers, you want to use?]
|
||||
[1:10:46][Changing the literal value of a variable is a peak and poke technique. Poking a value to a memory address...]
|
||||
[1:13:23][What will happen if you have an item that is infront in one view but in the back in another? Since it seems you have hard coded the order in which they are drawn, will you reorder them based on the view or on some other technique?]
|
||||
[1:14:50][Why don't you use the emacs calc?]
|
||||
[1:15:25][Comment on zoomin being at sysinternals.com]
|
||||
[1:16:34][When you panned off the min edges can you explain how the head was redrawing over the body?]
|
||||
[1:22:02][Do you ever write test or does the average game not have unit tests?]
|
||||
[1:23:34][Does this form of live coding work with adding member variables to structs?]
|
||||
[1:24:24][How does this test code help with the future architecture since it all gets dumped?]
|
||||
[1:26:05][I'm not sure if this is true. I'm assuming you're making the guy clip when leaving the screen, but why make it clip if you can just make it follow the yellow box which might clip the guy itself. Again I really..]
|
||||
[1:26:35][If streaming assets will be required to display all visual information will their be some type of manual limit placed on the procedural generation to ensure that all assets will never be required for a single room?]
|
||||
[1:27:00][End Q&A and closing statements]
|
||||
[/video]
|
|
@ -0,0 +1,31 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Cursor Hiding and Fullscreen Support" vod_platform=youtube id=YBCOijN2fNA annotator=Miblo annotator=schme annotator=effect0r annotator=theinternetftw]
|
||||
[0:00:03][Intro and welcome]
|
||||
[0:02:10][What we're going to do today]
|
||||
[0:03:30][Cleaning up tSine]
|
||||
[0:03:53][The reasoning behind internal, local_persist, and global_variable]
|
||||
[0:09:36][Searching for static]
|
||||
[0:09:54][static_check.bat]
|
||||
[0:14:40][Cleaning up the TODO(casey): list]
|
||||
[0:16:20][Tackeling SetCursor]
|
||||
[0:17:45][Spy++]
|
||||
[0:21:45][LoadCursor()]
|
||||
[0:25:50][Setting up dynamically controled cursor visability]
|
||||
[0:34:12][Trying to figure out how to stop the 'loading' cursor]
|
||||
[0:37:53][Fullscreen support[ref
|
||||
site="The Old New Thing"
|
||||
page="How do I switch a window between normal and fullscreen?"
|
||||
url="http://blogs.msdn.com/b/oldnewthing/archive/2010/04/12/9994016.aspx"]]
|
||||
[0:51:09][Discussion on his method of going fullscreen in Windows]
|
||||
[0:54:45][Going over the notes]
|
||||
[0:55:30]['Hackey' way to fill the entire screen with the game]
|
||||
[0:58:50][Q&A]
|
||||
[0:59:57][You said you want your artist to leave an alpha apron around your bitmaps. Why is that?]
|
||||
[1:02:15][Sour trolli worms or Haribo gummy bears?]
|
||||
[1:02:36][We've got a fair bit of if statements that clamp values. Would a macro make sense?]
|
||||
[1:03:26][Why do you size of the variable and not the type for MonitorInfo()?]
|
||||
[1:04:38][Do you prefer separate files for sprite frame elements or a single sheet of them?]
|
||||
[1:06:26][My asserts in RecanonicalizeCoord() fire up often. Is it a problem?]
|
||||
[1:07:18][Is supporting different screen sizes part of the plan? (aspect ratios)]
|
||||
[1:08:26][Could you explain how transient memory storage works?]
|
||||
[1:09:04][How would you implement a vector? Would you use macros, metaprogramming or something else]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Overview of the Types of Math Used in Games" vod_platform=youtube id=WN3_d_QcJZE annotator=abnercoimbre annotator=schme annotator=theinternetftw]
|
||||
[00:00][Intro]
|
||||
[1:58][Discussing the reason for a math discussion.]
|
||||
[3:58][Overview of math in programming]
|
||||
[8:20][Arithmetic & Algebra]
|
||||
[10:07][Euclidean Geometry]
|
||||
[12:35][Trigonometry]
|
||||
[14:02][Calculus]
|
||||
[18:12][Complex Numbers]
|
||||
[19:58][Higher-level mathematics in game programming.]
|
||||
[20:49][Linear Algebra]
|
||||
[29:22][Partial Differential Equations]
|
||||
[33:59][Ordinary Differential Equations]
|
||||
[41:03][Non-euclidean Geometry]
|
||||
[48:04][Topology]
|
||||
[51:20][Minkowski Algebra]
|
||||
[53:54][Control Theory]
|
||||
[55:02][Interval Arithmetic]
|
||||
[57:00][Graph Theory]
|
||||
[58:32][Operations Research]
|
||||
[59:48][Probability & Statistics]
|
||||
[1:00:10][Discrete mathematics]
|
||||
[1:02:33][Q&A]
|
||||
[1:03:11][Do you even breathe bro?]
|
||||
[1:03:20][Doesn't toroidal topology also apply to spheres?]
|
||||
[1:07:58][Laptop battery dies]
|
||||
[1:10:07][Q&A Resumes]
|
||||
[1:10:36][Is it important to clarify many of these subjects can be learned when you need them, not needed as a baseline?]
|
||||
[1:11:41][Most of 3D games is in euclidian geometry]
|
||||
[1:12:25][What happens in partial differential equations if Scott Meyers is in a gorilla suit..]
|
||||
[1:13:23][Don't the tiles near the inner part of the torus get smaller compared to outside?]
|
||||
[1:15:59][How is dealing with complex numbers in four dimensions more useful for doing rotations?]
|
||||
[1:24:39][Ever do anything with laplace transforms?]
|
||||
[1:25:36][What type of math is used in AI?]
|
||||
[1:26:05][Is all of the things shown in math classes useful?]
|
||||
[1:27:01][Quaternions as you use them in rotations are not euclidian!]
|
||||
[1:27:37][Can we talk a bit about what out of the master list do we expect to use in this game?]
|
||||
[1:28:45][Will the next two weeks cover the basic functionalities of the parts that are math heavy?]
|
||||
[1:29:22][Did you learn most of your math from books or did you take courses?]
|
||||
[1:29:37][I heard Markov chains are also useful crossing control theory with probability. Will we use these?]
|
||||
[/video]
|
|
@ -0,0 +1,47 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic 2D Vectors" vod_platform=youtube id=eE-D_wSUd0g annotator=abnercoimbre annotator=schme annotator=theinternetftw]
|
||||
[00:00][Intro]
|
||||
[00:22][Character movement code.]
|
||||
[01:45][Recap]
|
||||
[2:50][Issues with current character movement code.]
|
||||
[4:25][What we want to do with the movement code.]
|
||||
[4:53][What makes a game engaging.]
|
||||
[6:30][Reason for vector math.]
|
||||
[7:00][What to start fixing.]
|
||||
[7:35][Vector math intro.]
|
||||
[11:36][Sketches]
|
||||
[19:06][A scalar problem for the viewer.]
|
||||
[24:53][Correcting player's diagonal motion.]
|
||||
[26:10][Transitioning to vectors.]
|
||||
[30:30][Vector notation]
|
||||
[33:13][Basic Vector Operations]
|
||||
[37:46][Multiplication in Vector Space]
|
||||
[43:30][Adding vector routines to the code]
|
||||
[48:25][Replacing scalar code with vector code.]
|
||||
[1:01:53][Q&A]
|
||||
[1:02:28][How do union types work in C++ and what are the drawbacks?]
|
||||
[1:04:42][About vector conventions]
|
||||
[1:05:07][In the first version of vector, weren't you just missing an anonymous struct in the union?]
|
||||
[1:07:23][How do you remember all these commands?]
|
||||
[1:08:47][Is there a performance reason not to use constructors for v2?]
|
||||
[1:10:16][When would the fact that objects members are private or public come in to play?]
|
||||
[1:12:04][You should be able to have compound assignments outside the object.]
|
||||
[1:14:02][If you're using vertical bars for vectors, how would you notate the determinant?]
|
||||
[1:14:02][If you're using vertical bars for vectors, how would you notate the determinant?]
|
||||
[1:15:23][Can't you make the whole vector struct an union?]
|
||||
[1:16:30][Does the altered v2 work now if you comment out the constructor?]
|
||||
[1:18:09][What libs are you using?]
|
||||
[1:18:17][Just tested the v2 struct in llvm and it compiles fine.]
|
||||
[1:18:40][If I remember correctly, both gcc and llvm complains about the union struct]
|
||||
[1:19:33][Do you have any book recommandations for vector math?]
|
||||
[1:22:14][Will you define vector and scalar addition?]
|
||||
[1:25:15][Any particular reason to not supporting both vector-scalar and scalar-vector operators?]
|
||||
[1:26:19][The earlier struct-syntax is C99]
|
||||
[1:26:37][Does not returning real32 instead of v2 in *= operator trim your y-value?]
|
||||
[1:28:25][In C++11 you can do (v2){5, 2} as v2{5, 3}]
|
||||
[1:29:43][Don't you need some graphics library to place stuff not in a console?]
|
||||
[1:31:20][It's time to upgrade your copyright notice!]
|
||||
[1:32:19][Do you have use for constants like v2up, v2down etc?]
|
||||
[1:33:50][Copyright should cover all years in which content was contributed]
|
||||
[1:34:48][How about adding const references to function parameters to avoid copy by value]
|
||||
[1:35:53][Doesn't const help the compiler optimize?]
|
||||
[/video]
|
|
@ -0,0 +1,37 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="The Equations of Motion" vod_platform=youtube id=LoTRzRFEk5I annotator=abnercoimbre annotator=schme annotator=theinternetftw]
|
||||
[01:02][Intro to equations of motion.]
|
||||
[2:53][Recap of yesterday's stream.]
|
||||
[5:08][Motion in-depth: rigid body dynamics.]
|
||||
[9:15][Linear dynamics.]
|
||||
[13:53][Fundamental equation of motion.]
|
||||
[17:55][Revisiting vectors.]
|
||||
[23:50][How we computed motion.]
|
||||
[25:35][Some calculus.]
|
||||
[28:57][Computing motion differently.]
|
||||
[36:31][How it's currently done in the code.]
|
||||
[37:10][How we want to change it for our new equations.]
|
||||
[40:17][A talk on delta time.]
|
||||
[42:46][Piece-wise functions.]
|
||||
[43:35][Implementation.]
|
||||
[49:13][A look at the game now. We notice player has no friction.]
|
||||
[51:22][Implementing some friction.]
|
||||
[58:26][Closing remarks.]
|
||||
[1:00:40][Q&A]
|
||||
[1:01:23][Why use real physics and not something custom you can handtune?]
|
||||
[1:06:59][Why not add an opposite directional deceleration when collisions occur?]
|
||||
[1:07:29][Are you concerned that actual physics will retract from the beauty and elegance of the worlds greatest jump code?]
|
||||
[1:08:06][What would you need to store if you wanted to rewind time ala Braid?]
|
||||
[1:12:53][Is the character a bitmap?]
|
||||
[1:13:22][Are we going to normalise the vector from the input, instead of having a special case for diagonals?]
|
||||
[1:14:01][Will there be a map function to help determine terrain for friction and collisions?]
|
||||
[1:14:37][Why v2 instead of vec2 or vector2?]
|
||||
[1:15:13][Why not break the code into smaller functions?]
|
||||
[1:16:36][Shouldn't you use a max speed variable?]
|
||||
[1:17:32][Someone: Friction negative acceleration based on current velocity would feel better]
|
||||
[1:18:06][Can you derive the 1/2at^2 part of the position equation again?]
|
||||
[1:23:54][Do you think something like bullet or box2d for player movement is appropriate?]
|
||||
[1:25:38][When would you use other integration methods?]
|
||||
[1:34:20][Will we use rigid body even after the hero is bouncy and all that?]
|
||||
[1:35:00][Correction on question from someone]
|
||||
[1:35:49][If we had terrain (ice or mud), we could have an easy convincing example]
|
||||
[/video]
|
|
@ -0,0 +1,43 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Reflecting Vectors" vod_platform=youtube id=2nyNOJoVC8M annotator=schme annotator=debiatan annotator=theinternetftw]
|
||||
[00:33][Importance of vector math]
|
||||
[02:09][Recap of last episode]
|
||||
[03:36][On the homogeneity of scalar and vector math notation]
|
||||
[05:45][Goal for today: bouncing off of walls]
|
||||
[07:06][Blackboard diagram of expected bouncing behavior]
|
||||
[07:47][Axis-aligned vector reflection]
|
||||
[12:26][General-case vector reflection]
|
||||
[15:02][The inner/scalar/dot product]
|
||||
[23:41][Applications of the inner product: vector length]
|
||||
[27:15][Applications of the inner product: measurement of vectors on new reference frames]
|
||||
[34:22][Solving general reflection using the inner product]
|
||||
[40:24][Implementing the solution]
|
||||
[43:22][Placeholder code to detect orientation of colliding walls]
|
||||
[49:19][Short comment on loss of energy and coefficient of restitution]
|
||||
[50:25][Challenge to the stream: how do you run along the wall?]
|
||||
[51:51][Answer to the challenge]
|
||||
[53:28][Discussion on sticky behavior]
|
||||
[58:13][Q&A]
|
||||
[59:31][Can you explain again why the hero was sticking against the wall?]
|
||||
[1:02:43][When do we scale down the hero?]
|
||||
[1:03:11][Have you considered using sin(0) to sin(90) as a non-linear inertia curve?]
|
||||
[1:03:51][Will you eventually handle player and monsters in some kind of physics engine?]
|
||||
[1:04:32][Do you need to code in different collision detection for the enemies?]
|
||||
[1:05:09][Will you add comments to the source for those who preordered?]
|
||||
[1:05:45][Do you plan on having non axis-aligned walls in the maps?]
|
||||
[1:07:12][What do you think about position based dynamics?]
|
||||
[1:08:42][Are we going to do continuous collision detection?]
|
||||
[1:09:08][Is the computational cost of functions something you only learn by experience?]
|
||||
[1:11:08][Will you end up in problems when walking into corners after the sticking fix tomorrow?]
|
||||
[1:11:27][Will there be a minimum distance to the wall?]
|
||||
[1:12:03][Will computing a vector where the player will stop just before the wall solve the sticking?]
|
||||
[1:13:13][Additional explanation to the bounce vector calculation]
|
||||
[1:19:25][Is there a way to speed up the DrawBitmap -code?]
|
||||
[1:21:15][Suggestion to remove reblitting the background to improve performance]
|
||||
[1:22:08][Stream notes Casey drew the cos/sin triangle wrong]
|
||||
[1:23:39][A wish to mention formal keywords to help people look things up]
|
||||
[1:24:53][Was the Witness collision trick to try maintain the distance traveled?]
|
||||
[1:25:21][Why does wall bouncing not seem to cause sticking, but sliding does?]
|
||||
[1:27:06][Stream mentions KhanAchademy for learning math]
|
||||
[1:27:20][Will the rendering code be able to squash bitmaps?]
|
||||
[1:28:01][Could you/would you benefit from unrolling the collision loop ... ?]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Geometric vs. Temporal Movement Search" vod_platform=youtube id=bERy-zhosqY annotator=csnover annotator=schme annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:28][Recap]
|
||||
[2:30][Sticking problem recap]
|
||||
[4:14][2 ways to handle problem: search in T, search in P]
|
||||
[9:20][Problems with search in T]
|
||||
[11:16][Solving the problem The Witness way]
|
||||
[15:30][Problems with search in position]
|
||||
[18:22][How to implement search in P in Handmade Hero]
|
||||
[21:55][Why you need a flood fill]
|
||||
[22:28][The problem with players with volume]
|
||||
[28:10][Implementing search in P]
|
||||
[31:25][Breaking apart code]
|
||||
[32:40][Casey on messy code (rant)]
|
||||
[35:55][Simplifying the movement code]
|
||||
[38:30][Problem with unsigned integers on the zero boundary]
|
||||
[40:17][Finding the closest tile for each loop]
|
||||
[42:05][Check for empty tiles]
|
||||
[44:55][Defining the valid player region inside the tile]
|
||||
[47:20][How to perform the search]
|
||||
[56:00][Getting the length of a vector]
|
||||
[57:40][Cleaning up to finish on day 46]
|
||||
[58:47][Q&A]
|
||||
[1:00:01][Why different versions of GetTileValue()?]
|
||||
[1:03:57][You start variables uppercase and structs lowercase. Why?]
|
||||
[1:04:47][When npc's are introduced, will they reuse some of the code shown here?]
|
||||
[1:05:54][Are you going to implement push/squeeze through doorways?]
|
||||
[1:07:31][It seems like the possible movement is more like a pizza-slice?]
|
||||
[1:08:36][How would we, using this system, handle when the player would be killed by collision?]
|
||||
[1:10:07][Will we have to push boulders out of the way of doors?]
|
||||
[1:10:24][Will you ever fall for some of the dogmatic traps when coding?]
|
||||
[1:13:11][Does the search method here give the sense of rounded corners?]
|
||||
[1:14:14][I don't really understand this. Why not just change the players vector with normals?]
|
||||
[1:16:21][Are you going to worry about how many objects the collision detection system can handle?]
|
||||
[1:18:12][For search in p, don't you have a problem with passing through walls?]
|
||||
[1:19:35][Will the search code work if he hits a small notch that would make him bounce back?]
|
||||
[1:21:15][Will you implement secrets when none of us are watching?]
|
||||
[1:22:20][Will the characters have skeletal animations?]
|
||||
[1:23:39][Will the search in p work with moving objects?]
|
||||
[1:25:20][A great deal of the problems you've faced seems to be around tradeoffs..]
|
||||
[/video]
|
|
@ -0,0 +1,63 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Multiplayer Support" vod_platform=youtube id=BU5xBpUMdPA annotator=schme annotator=Miblo annotator=effect0r annotator=theinternetftw]
|
||||
[0:00:00][Intro and welcome]
|
||||
[0:01:25][Where we were..]
|
||||
[0:01:50][Addressing a bug that was found by the forums]
|
||||
[0:04:30][Thinking about how to handle imput]
|
||||
[0:06:24][Which controller maps to which character?]
|
||||
[0:09:04][How we're going to handle this problem]
|
||||
[0:10:36][Maping a controller to a character]
|
||||
[0:11:36][Pulling player info into the 'entity' structure to support multiple players]
|
||||
[0:12:50][Modifying game_input to allow for multiple players]
|
||||
[0:14:31][Changing his mind about how to handle this]
|
||||
[0:18:59][CameraFollowingEntityIndex]
|
||||
[0:19:11][Making the camera follow a certain player]
|
||||
[0:22:07][Drawing all of the players]
|
||||
[0:24:38][Fixing HeroFacingDirection]
|
||||
[0:28:21][AboluteValue intrinsic]
|
||||
[0:29:31][Adding an entity to the game]
|
||||
[0:31:23][Initializing a player]
|
||||
[0:33:40][Crash!]
|
||||
[0:36:24][MovePlayer()]
|
||||
[0:39:24][Moving player width/height into InitializePlayer()]
|
||||
[0:42:15][Calling the movement code]
|
||||
[0:43:24][Debugging the movement code]
|
||||
[0:47:08][Some days, you just have to fire yourself.][quote 2]
|
||||
[0:49:06][Fixing facing direction, again]
|
||||
[0:50:42][Retuning movement constants]
|
||||
[0:52:09][What we're going to do tomorrow]
|
||||
[0:53:00][BRB, controller!]
|
||||
[0:53:59][Demo of mult-player support]
|
||||
[0:54:30][Q&A]
|
||||
[0:55:08][On split-screen what kind of resolution were you thinking for each?]
|
||||
[0:56:15][You once said visualizing problems is never a wasted effort. Should we use it for collision detection?]
|
||||
[0:56:52][Are entities just for players or all game objects?]
|
||||
[0:57:23][How input be handled when both players trigger an action at the same time?]
|
||||
[0:57:46][Who is the camera following with multiple players? \[code change\]]
|
||||
[1:00:44][When you decided to have multiple players you decided to call them entities. Why?]
|
||||
[1:01:56][How do you make the characters not run through the trees?]
|
||||
[1:03:50][Why are we doing physical based movement?]
|
||||
[1:04:37][Will we be doing any image manipulation with code?]
|
||||
[1:04:47][Any reason to catch failing to load art assets? \[code change\]]
|
||||
[1:06:54][Is the notion of having all entities in a single array something that'll stay for long?]
|
||||
[1:07:22][Why do you not use an auto-compiler?]
|
||||
[1:07:51][How would disconnected controllers mid-game gracefully handled?]
|
||||
[1:08:53][When comparing a float to zero shouldn't we be checking withing a tolerance instead?]
|
||||
[1:09:26][Will there be diagonal movement sprites to the hero?]
|
||||
[1:10:29][Since small velocities were brought up, will we account for small inputs i.e. deadzones?]
|
||||
[1:12:01][About storing entities in an array. If there's massive operations on many of them, can this be exploited?]
|
||||
[1:13:03][Why didn't we use the bitmap masks directly?]
|
||||
[1:15:22][Are there any games that you've personally developed that are available to the public?]
|
||||
[1:17:39][Why do you use the function call macros?]
|
||||
[1:18:33][Will you wait for Jon to finish his presentation tomorrow?]
|
||||
[1:18:54][Can you explain what you mean by 'deadzone on the controller'?]
|
||||
[1:22:54][Do controllers have an outside deadzone?]
|
||||
[1:23:58][Addition to bitmap loading question: 'You && with a 32bit value and use what you get']
|
||||
[1:26:31][Can you ever talk about the code you made that shipped 2000+ times?]
|
||||
[1:28:00][Will we be using a component system?]
|
||||
[1:28:20][Any estimation where GUIs will appear?]
|
||||
[1:28:55][Chat says: there are rotation instructions ]
|
||||
[1:33:05][\[code change: Using rotation instructions\]]
|
||||
[1:39:45][Rotate will work but it's microcoded, so don't use them if you want performance]
|
||||
[1:40:16][Doesn't the rotate mess with the XP compatibility?]
|
||||
[1:40:54][Pondering about microcode speed]
|
||||
[/video]
|
|
@ -0,0 +1,32 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Vector Lengths" vod_platform=youtube id=5KzJ0TDeLxQ annotator=csnover annotator=schme annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:33][Recap]
|
||||
[2:50][Diagonal move recap]
|
||||
[4:40][New analog stick problem]
|
||||
[10:33][Changing vector length without changing direction]
|
||||
[14:00][Doing it aggressively]
|
||||
[15:48][An important note about ratios and squares]
|
||||
[18:27][Why use length=1?]
|
||||
[20:10][Back to the wall sticking problem!]
|
||||
[21:36][Explanation of search in T implementation]
|
||||
[26:07][Equation for search in T]
|
||||
[29:37][Simplest possible case]
|
||||
[32:20][Division by zero]
|
||||
[35:57][The equation to solve for infinite vertical and horizontal walls]
|
||||
[37:15][Fixing equation for finite wall sizes]
|
||||
[38:30][Implementing the new collision code]
|
||||
[40:40][How to find the tiles to check]
|
||||
[45:50][What to do about multiple wall collisions]
|
||||
[54:13][Q&A]
|
||||
[55:25][Why did you change from search in p to search in t?]
|
||||
[59:32][How does it handle the state of two separate players on different floors?]
|
||||
[1:00:18][Why is the code complexity for p-search so much bigger than t-search?]
|
||||
[1:03:19][Why not treat the map as a matrix and validate objects and collisions through coordinates?]
|
||||
[1:04:23][Can you elaborate more on how the coordinate system works with the collision detection?]
|
||||
[1:06:51][Can this be extended to 3D collision?]
|
||||
[1:07:04][Could you check the player position and check if it's in the inner side of the wall vectors?]
|
||||
[1:10:42][What's your point on zero-length vector normalization?]
|
||||
[1:12:54][How come sometimes players can glitch through walls or corners? Is it art or programming?]
|
||||
[1:17:04][Do you need to do the math with solid walls and objects or is it basic program arithmetics?]
|
||||
[1:18:42][Chat adds: I think he means graphically. Walls can be hollow inside.]
|
||||
[/video]
|
|
@ -0,0 +1,28 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Line Segment Intersection Collisions" vod_platform=youtube id=rWpZLvbT02o annotator=csnover annotator=schme annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:23][Recap]
|
||||
[2:55][Continuing yesterday's work on collision detection]
|
||||
[6:56][Writing the wall intersection detection]
|
||||
[10:38][Fixing backward movement]
|
||||
[12:02][Fixing divide by zero]
|
||||
[14:20][Actually move the player]
|
||||
[18:08][Description of partial wall penetration]
|
||||
[19:00][Adding the remaining wall tests]
|
||||
[23:08][New problem: walking through the top wall due to floating point precision loss]
|
||||
[25:27][Implementing a temporary fix]
|
||||
[29:15][Looking for another bug causing the character to stop early]
|
||||
[30:06][Debugging an assertion failure]
|
||||
[32:50][More collision bugs; time to write a better collision detection system!]
|
||||
[33:38][Observing the problems with the current collision detection system]
|
||||
[35:25][What we want from the new system]
|
||||
[43:26][Q&A]
|
||||
[43:53][Can you change the whiteboard colors?]
|
||||
[46:33][Do you plan on getting into calculus to get better collision detection?]
|
||||
[47:05][Do you think any need to prototype some features in some other language?]
|
||||
[47:43][If we changed the resolution of the game, would it change the size of the objects?]
|
||||
[48:25][Can you do collision detection based on if a bitmap and a pixel has alpha?]
|
||||
[51:15][Is it interesting to have a tutorial on floating-point computations?]
|
||||
[52:05][Why not use the old collision system and use the new one only if it finds a collision?]
|
||||
[53:03][What about the tiles? Will they stay the same if you change resolution?]
|
||||
[54:53][What is dynamic loading? I thought C code has to be compiled.]
|
||||
[/video]
|
|
@ -0,0 +1,55 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Debugging Canonical Coordinates" vod_platform=youtube id=CIe8J9ScmRo annotator=csnover annotator=schme annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:20][Recap]
|
||||
[2:05][Wraparound problem]
|
||||
[7:25][Thinking about the problem]
|
||||
[15:09][Changing the collision detection loop]
|
||||
[25:45][Why is X changing?]
|
||||
[28:45][Debugging all the things]
|
||||
[31:20][Fixed! The problem with RecanonicalizePosition]
|
||||
[33:30][Testing the new wraparound solution]
|
||||
[37:30][Fixing camera position]
|
||||
[38:50][Describing the camera position problem]
|
||||
[42:40][Changing topography from toroidal to disc]
|
||||
[45:50][Making the collision detection better using areas instead of points]
|
||||
[48:00][Fixing canonicalization]
|
||||
[53:14][Talking about the future of the tile map]
|
||||
[56:50][Q&A]
|
||||
[58:09][Do you use diagrams a lot in your actual work?]
|
||||
[58:26][What do you recommend for learning c++?]
|
||||
[58:45][Try setting handmade hero start at the midpoint between tiles]
|
||||
[1:00:14][What are your initial thoughts on DX12?]
|
||||
[1:00:56][Why is your code over 900 lines?]
|
||||
[1:01:13][How about using signed values for the top coordinates?]
|
||||
[1:01:40][Stream went offline]
|
||||
[1:01:58][Why don't you like private?]
|
||||
[1:02:34][Is there any background information you can give us new viewers?]
|
||||
[1:02:59][Do you see any complications broadcasting sound from float space in the next room?]
|
||||
[1:05:23][What is your preferred scripting language?]
|
||||
[1:05:37][I'm curious if you have to do with memory misalignment?]
|
||||
[1:06:08][Any reason you're making it somewhat more complicated than it should?]
|
||||
[1:07:10][How are you supposed to draw the game in Windows 10 without a HoloLens?]
|
||||
[1:08:05][Is the system rendering offscreen objects in the background?]
|
||||
[1:08:31][The struct name abc initialisation looks odd]
|
||||
[1:09:15][What's the estimated date for the release of Handmade Hero?]
|
||||
[1:09:36][Have you ever pair programmed?]
|
||||
[1:09:47][Do you go hard in the pain?]
|
||||
[1:10:15][Could you remove the old RenderWeirdGradient()?]
|
||||
[1:10:30][Why is there an issue with wrapping?]
|
||||
[1:11:39][Where did you get your education at?]
|
||||
[1:11:48][Does C handle pointers any different than C++?]
|
||||
[1:12:15][Do you use version control?]
|
||||
[1:12:39][Why not change the tilewidths and heights to 8x16 to wrap the camera with power of two?]
|
||||
[1:13:55][Can you explain how you use Minkowski addition in the collision?]
|
||||
[1:15:19][Are you eventually going to add tile entities?]
|
||||
[1:16:15][How much focus are you going to give to tile entities?]
|
||||
[1:17:15][How tall are you?]
|
||||
[1:17:33][What if you translate a 9x9 tilegrid to the player as origin before doing any world map?]
|
||||
[1:18:08][What do you use to draw?]
|
||||
[1:18:49][For wrapping you could just check if the new value is between uint_max and the nearest multiple of 9x17]
|
||||
[1:19:11][Can you explain what float-space is exactly]
|
||||
[1:25:18][Will you create a map editor?]
|
||||
[1:25:34][Seems like you could use bitfields or union to combine the different coordinates?]
|
||||
[1:25:55][What's the best way to learn how to code?]
|
||||
[1:26:41][I thought floats and doubles are the same speed in the FPU?]
|
||||
[/video]
|
|
@ -0,0 +1,46 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Minkowski-based Collision Detection" vod_platform=youtube id=_g8DLrNyVsQ annotator=csnover annotator=schme annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[0:33][Recap]
|
||||
[2:39][To do today: Gliding/skating and area-based collision detection]
|
||||
[3:47][Review of collision detection up to this point]
|
||||
[5:06][Area-based collision detection (Minkowski sum/difference)]
|
||||
[6:55][Example: A player with size passing through two blocks]
|
||||
[8:50][Introduction of Minkowski algebra: algebra with shapes]
|
||||
[12:21][Chumped by Krita]
|
||||
[15:24][Back to the Minkowski sum: rectangle + circle]
|
||||
[16:45][Similar shapes]
|
||||
[17:45][Dissimilar & complex convex shapes: GJK algorithm]
|
||||
[20:58][Rectangles-only collision detection]
|
||||
[25:55][Taking entity size into account]
|
||||
[33:45][Sticky walls appear]
|
||||
[36:05][Changing the origin point of the player]
|
||||
[38:00][More sticking walls debugging]
|
||||
[43:45][Implementing gliding]
|
||||
[48:00][Correcting velocity during collision]
|
||||
[56:10][Debugging final sticking bug]
|
||||
[1:00:40][Moving the epsilon to stop directly on the wall]
|
||||
[1:03:20][Or not…]
|
||||
[1:04:20][Debugging first loop through the wall collision loop]
|
||||
[1:09:58][Debugging the second loop through the wall collision loop]
|
||||
[1:18:05][Moment of enlightenment]
|
||||
[1:19:22][Q&A]
|
||||
[1:21:05][Why is the heros head 1.5 meters in diameter?]
|
||||
[1:21:29][How would you handle concave objects with Minkowski?]
|
||||
[1:22:41][Why isn't the game split up in smaller, more modular files?]
|
||||
[1:24:51][Is the alpha channel in the art assets created by the artist?]
|
||||
[1:25:21][How many years since you started doing games?]
|
||||
[1:26:37][I usually just hope the framerate stays high enough for the velocity not to get too high]
|
||||
[1:28:57][Can't you have multiple views of the same file with emacs?]
|
||||
[1:29:26][Will you be able to use minkowski with rotating and diagonal objects?]
|
||||
[1:33:30][How long have you been working on this game?]
|
||||
[1:33:57][Is it possible to make an assert that lets you continue on failure?]
|
||||
[1:34:17][Are you doing any cyclomatic complexity analysis?]
|
||||
[1:34:43][How would you represent a large sidescroller 2D world?]
|
||||
[1:35:43][Is it possible to determine the point of collision?]
|
||||
[1:36:11][Seems like the inability to represent convex objects is a major for problem for physics]
|
||||
[1:37:15][I meant determining the point of collision with the general GJK algorithm]
|
||||
[1:38:27][Are we doing a Raspberry Pi port just for the heck of it?]
|
||||
[1:39:24][Cyclomatic complexity: a direct measure of the number of linearly independent paths through the code]
|
||||
[1:39:50][BeagleBone black is better than Raspberry Pi I think]
|
||||
[1:41:01][Can't you do straight on hardware on the PC?]
|
||||
[/video]
|
|
@ -0,0 +1,30 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Separating Entities By Update Frequency" vod_platform=youtube id=RQUP4ql86k0 annotator=csnover annotator=schme annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[2:00][Recap]
|
||||
[5:18][What we're doing and why]
|
||||
[7:23][The state of the world coordinate system today]
|
||||
[9:06][The vision of the new entity system]
|
||||
[11:25][Ballparking entity limits]
|
||||
[18:18][Scaling to large numbers of entities]
|
||||
[20:45][Low- & high-frequency entities]
|
||||
[21:53][Addressing other entities]
|
||||
[25:10][The initial approach for addressing entities]
|
||||
[29:50][Handling re-offsetting in local coordinate space when the camera moves]
|
||||
[34:16][Interaction between low- & high-frequency entities]
|
||||
[35:45][Updating code to add entities with different frequencies]
|
||||
[40:40][Implementing the inefficient version]
|
||||
[43:05][A note about split-screen camera]
|
||||
[45:02][Updating GetEntity to support different entity frequencies]
|
||||
[48:53][Updating InitializePlayer]
|
||||
[52:05][Updating AddEntity]
|
||||
[54:25][Getting the code compiling again]
|
||||
[59:46][Q&A]
|
||||
[1:00:15][How about hot/cold/frozen instead of high/low/dormant?]
|
||||
[1:01:10][Chat reminds: wrap intrinsic rotations \[code change\]]
|
||||
[1:05:28][Is it a good idea to update the low entities in a separate thread?]
|
||||
[1:06:32][In a dynamically based language how would you handle refactoring without the compiler help?]
|
||||
[1:08:11][I've noticed some game physics break when you increase the fps]
|
||||
[1:10:23][You're just shifting, not rotating \[code change: shift-or rotate\]]
|
||||
[1:18:52][Is there any gameplay reason why we want entities alive even off screen?]
|
||||
[1:20:14][About shifting negative values \[code change\]]
|
||||
[/video]
|
|
@ -0,0 +1,49 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Entity Movement in Camera Space" vod_platform=youtube id=TfZUAFh-WJg annotator=csnover annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:40][Recap]
|
||||
[3:12][Thinking about removing the tile map and making tiles entities]
|
||||
[5:27][Test entities against every other entity (O(n*n))]
|
||||
[6:17][Update MovePlayer to perform collisions on active entities]
|
||||
[9:14][Relative position between entities]
|
||||
[11:04][Thinking about different actions for different types of collisions]
|
||||
[14:34][Implementing walking on “stairs”]
|
||||
[17:42][Fixing compiler errors]
|
||||
[19:28][Implementing ChangeEntityResidence]
|
||||
[22:00][Thinking about entity types using a cache to keep high/dormant entity positions consistent]
|
||||
[25:00][An aside on programming technique (rant)]
|
||||
[26:20][Recalculating the position into tile space on entity update]
|
||||
[29:26][Mapping entities into camera space]
|
||||
[31:40][Exploring the code in debugger]
|
||||
[35:20][Changing residence of entities when higher residence is requested]
|
||||
[39:30][Debugging entity collisions]
|
||||
[42:05][Debugging sticky collisions]
|
||||
[44:57][Restoring camera movement]
|
||||
[50:58][Todos for tomorrow]
|
||||
[53:23][Q&A]
|
||||
[54:13][Why can't infrequent entity updates happen in the entity's update logic?]
|
||||
[56:57][Why do you want to use a 3D vector for position when the Z value is always going to be an integer?]
|
||||
[1:01:25][Does Minkowski collision detection have to be axis-aligned?]
|
||||
[1:03:06][Didn't you just implement a bare-bones relational database? Do you think that's a good mental model for understanding today's code?]
|
||||
[1:05:57][I noticed your characters do not collide with each-other. I thought you changed that?]
|
||||
[1:07:08][How good is this addressing scheme for the cache?]
|
||||
[1:08:02][When jumping you just need x, y, z coordinates to make it happen? \[code changes\]]
|
||||
[1:16:23][Will we switch to some kind of sparse storage for example for the high res entities?]
|
||||
[1:16:54][How would you handle jumping on a ledge or surface to adopt a new base height?]
|
||||
[1:18:19][What do you think about physics for character or mob movement in a platformer game, meaning that I press right but it starts to accelerate instead of just move?]
|
||||
[1:19:16][Now make him jump through the ceiling into the next floor.]
|
||||
[1:19:54][Why is he so huge?]
|
||||
[1:20:27][Will the floor area of the zones be flat or will it have slopes and 3D zones a.k.a. hills?]
|
||||
[1:22:09][Can you change the yellow tile beneath his feet quickly and easily to be greyish and round so it looks like a jumping shadow? Completely not required but why not! \[code change\]]
|
||||
[1:26:21][If you add walls in the middle of rooms would they be handled as entities for the purpose of collision detection or separately?]
|
||||
[1:27:04][Too fast!]
|
||||
[1:30:35][How much has changing the rectangle to a bitmap instead of a rectangle impacted your player-on-player collision calculation?]
|
||||
[1:30:53][How many zombie DLCs will there be?]
|
||||
[1:32:02][Shouldn't you be doing this blending in a linear color space?]
|
||||
[1:33:06][When does the core mechanics of the game come into play? Earlier or later in the dev cycle?]
|
||||
[1:35:19][Is there an easy way to translate from circle to ellipse collision detection?]
|
||||
[1:35:50][Do you recommend learning to make a game engine rather than using engines like Unity or Unreal for people new to game development?]
|
||||
[1:37:50][The rectangle box which you have alpha assigned, is that the same box you would assign hit points to in case the character is injured by enemies or obstacles?]
|
||||
[1:39:05][How common or practical is pixel by pixel collision check vs overall shapes collision check? Which one is more interesting to you?]
|
||||
[1:39:50][What are your thoughts on the Allegro library?]
|
||||
[1:40:00][Stream end]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Environment Elements as Entities" vod_platform=youtube id=KAZrNrcgrRc annotator=csnover annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:22][Recap]
|
||||
[2:42][Fixing a crash reading off the end of a buffer]
|
||||
[11:45][Making walls into entities]
|
||||
[14:25][Pulling out camera movement code]
|
||||
[17:56][Removing entities from the high entity set that are too far away from the camera]
|
||||
[19:20][A note on pointer access]
|
||||
[21:20][A note on rectangle bundling]
|
||||
[26:38][Calculating the bounds of the high entity area]
|
||||
[29:41][Preparing to add entities to the high entity set that are close to the camera]
|
||||
[33:09][Putting wall entities in the tile map]
|
||||
[34:08][Changing InitializePlayer to AddPlayer]
|
||||
[35:43][Adding AddWall function]
|
||||
[39:09][Adding the walls right away instead of waiting for the collision detector]
|
||||
[50:13][Adding entities to the high entity set that are close to the camera]
|
||||
[55:09][Calling SetCamera at the start of the game]
|
||||
[58:15][Out of time! Where we'll start tomorrow]
|
||||
[59:19][Q&A]
|
||||
[1:00:02][Aren't some of the signs in the MinTileX wrong?]
|
||||
[1:01:12][What does “internal” modifier which is applied to the SetCamera function? I mean what is the difference between non-static and static function?]
|
||||
[1:07:10][Why do we consider a wall an entity?]
|
||||
[1:08:27][Will tile chunk and tile map structures go away and walls will be stored only as entities?]
|
||||
[1:08:44][We have to do some cool screen shakes and some whip pan transitions between screens.]
|
||||
[1:08:54][Will there be a dormat enemy?]
|
||||
[1:09:21][Can we have some old man that transforms you into a dog and says “you're the dog now man”?]
|
||||
[1:10:45][Fixing calculation bug in collision detector \[code change\]]
|
||||
[1:16:03][What do you think of message buses and what is your favorite implementation of one?]
|
||||
[1:16:20][Are you planning on having any game screens that pan the camera?]
|
||||
[1:17:15][Have you ever played Path of Exile or heard of it? They have this desync problem that they claim is unfixable because they handle stuff server-side. Just wondering if you have heard of that game and its notorious bugs.]
|
||||
[1:17:57][Are you using a stylus in Krita or a mouse?]
|
||||
[1:18:18][Does forcing a game to a certain refresh rate introduce lag?]
|
||||
[1:19:08][End]
|
||||
[/video]
|
|
@ -0,0 +1,33 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Removing the Dormant Entity Concept" vod_platform=youtube id=yqM04duWiiU annotator=csnover annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[1:17][Recap]
|
||||
[3:15][Rationale for removing dormant entities]
|
||||
[5:56][Ideas on decoupling low and high entity arrays]
|
||||
[10:23][Creating things only in the low entity list by default]
|
||||
[15:40][A note about the memory of the high entity array]
|
||||
[21:38][Thinking about using a free list instead of compacting the array]
|
||||
[23:27][Implementing array compaction]
|
||||
[26:46][Changing GetEntity to GetLowEntity and GetHighEntity]
|
||||
[29:05][Changing AddEntity to AddLowEntity and updating AddWall]
|
||||
[30:56][A note on refactoring/rewriting code]
|
||||
[31:42][Updating AddPlayer and MovePlayer]
|
||||
[39:12][Updating SetCamera changing residence from high to low]
|
||||
[41:35][A moment of clarity; description of trouble iterating over a mutating array]
|
||||
[46:05][Handling controlling entities]
|
||||
[53:54][Debugging crashes]
|
||||
[55:50][Debugging missing walls and positioning problems]
|
||||
[1:02:08][Q&A]
|
||||
[1:03:12][Is there an advantage of making the size of the LowEntity and HighEntity arrays a power of two?]
|
||||
[1:04:22][This is a third-person game right?]
|
||||
[1:04:34][What process would you have gone through for creating the controls and movement if this were a 2D side-scrolling platformer?]
|
||||
[1:05:28][Do you feel today will be rewritten during optimization?]
|
||||
[1:06:40][I don't know if it's been answered before but did you consider large fixed point integers for both entity types like Tom Forsythe seems to prefer instead of the swap between the floating point and the high frequency entities?]
|
||||
[1:08:58][Wouldn't be easier to keep a list of empty entity slots to add them there instead of always moving and changing one of the pointers?]
|
||||
[1:09:51][Are you familiar with slot maps for game object storage and do you think you'd use them for this project? We use them for our engine.]
|
||||
[1:11:22][Any thoughts on controls for HH on controllerless touch screen devices like tablets?]
|
||||
[1:12:27][(follow-up) I think a slot map is just an implementation of handles doubly indirect referenced through a table.]
|
||||
[1:12:57][Will Handmade Hero always be 20 scale feet tall?]
|
||||
[1:13:06][What are you drinking?]
|
||||
[1:13:16][(follow-up) What I call a slot map is an array that can have arbitrary empty slots and each slot has a version number for self-validation.]
|
||||
[1:15:20][End]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Hash-based World Storage" vod_platform=youtube id=WyXBawK1jpE annotator=csnover annotator=debiatan annotator=theinternetftw]
|
||||
[0:00][Intro]
|
||||
[2:05][Fix typo in SetCamera]
|
||||
[3:00][Recap of world coordinate wrapping problem & sparse world storage design]
|
||||
[10:17][Introduction to hash tables]
|
||||
[15:16][Hash functions]
|
||||
[18:44][Hash collisions]
|
||||
[20:49][Handling hash collisions: External chaining]
|
||||
[25:16][Handling hash collisions: Internal chaining]
|
||||
[31:52][Replace tile chunk counts with a hash table]
|
||||
[36:24][Creating the hash function]
|
||||
[43:30][Looking up entries in the hash table and creating new entries in the table]
|
||||
[47:10][Reviewing the code that has been written]
|
||||
[58:00][Moving the world origin]
|
||||
[1:00:45][Debugging missing entities]
|
||||
[1:09:50][Q&A]
|
||||
[1:10:34][Why not center the world at 0,0,0 and use signed ints for the tile position? \[code change\]]
|
||||
[1:15:42][Is a hash map essentially just a creatively shaped tile chunk? If that's the case could you preempt the hash function by contributing more bits from the Z coordinate as opposed to the X and Y for a towery map for example? Am I thinking about this right?]
|
||||
[1:19:11][What do you think about, and do you ever do, “free” optimizations in early or late stage development such as \[…\] and instead trying to fail as early as possible? Best case scenario you only did one comparision rather than four.]
|
||||
[1:22:32][What sort of cookie is best for programming?]
|
||||
[1:22:40][What do you think about splitting the hash map code from the tile code such that you can use hash map for other stuff later on?]
|
||||
[1:25:12][You're not passing the arena to the hash lookup function.]
|
||||
[1:25:46][Is the world going to be generated on the fly or at game startup?]
|
||||
[1:26:45][Instead of chunks have you thought about spatial hashing? I'm considering it for my game to allow an open generated world but not confined to grid aligned tiles or fixed size objects.]
|
||||
[1:27:21][What about using an octree for sparse style storage rather than a hash map?]
|
||||
[1:30:33][Since you are using a memory arena for all allocations how will you handle dynamic amount of objects like enemies, particles, etc.?]
|
||||
[1:30:54][Shouldn't the safe margin be INT32_MAX minus margin?]
|
||||
[1:31:39][When will this little guy have feet?]
|
||||
[1:31:50][Isn't the explanation where one letter points to the next letter until the end of the word?]
|
||||
[1:33:13][I think you said that a hash table was just one of many ways to store the sparse data. Could you briefly mention one or a couple of the other methods?]
|
||||
[1:37:24][Does starting at 0 cause a problem with the tile chunks since now we are using that as the uninitialized variable? \[code change\]]
|
||||
[1:38:54][Shouldn't Chunk->TileChunkX=0 be Chunk->NextInHash->TileChunkX? \[code change\]]
|
||||
[1:39:34][Will you write an analog function to malloc?]
|
||||
[1:40:05][(follow-up) I see. I guess what I was thinking about was what the full 4Bn x 4Bn map would look like if you passed each index in the hash map the opposite way through the hash function. It seems like it doesn't matter in any case becafuse no matter what it's always going to be better than O(n) and most of the time it's O(1) with a tiny bit of performance cost to throw the coordinates through the function.]
|
||||
[1:40:31][Most of your comments are notes and todos. Do you ever add section title comments to separate long blocks of code?]
|
||||
[1:40:53][Do you see any value in adding unit tests for certain bits of this functionality?]
|
||||
[1:41:43][Can you visualize the shape of the map so I can understand why a hash table is better than an array?]
|
||||
[1:44:40][The randomized map only goes up and to the right at the moment. Is it good enough to catch bugs?]
|
||||
[1:45:07][Will the renderer be a separate piece of code as like the platform player so that it can be substituted with something like OpenGL?]
|
||||
[1:45:18][End]
|
||||
[/video]
|
|
@ -0,0 +1,32 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Switch from Tiles to Entities" vod_platform=youtube id=NMfx9eVrNmQ annotator=csnover annotator=schme annotator=debiatan]
|
||||
[0:00][Intro]
|
||||
[1:44][Recap]
|
||||
[5:18][Scaling low-frequency entity updates]
|
||||
[16:45][Revising the tile map]
|
||||
[18:30][Thinking about changing tile map to store entities instead of tiles]
|
||||
[22:48][Options for how to reference entities in memory]
|
||||
[29:26][Storing entities in tile entity blocks]
|
||||
[33:32][Thinking of a technique to improve low entity access]
|
||||
[34:34][Going in the other direction]
|
||||
[36:09][Removing invalid code]
|
||||
[38:04][Thinking about the size of the tile_map TileChunkHash]
|
||||
[41:45][Renaming tile_map to world]
|
||||
[55:55][Debugging refactoring]
|
||||
[57:00][Recap]
|
||||
[58:37][Q&A]
|
||||
[58:59][Do you still expect the gameplay to be broadly grid-based even without tiles?]
|
||||
[59:44][Could you use reflection to help handle the entities and world chunks?]
|
||||
[1:00:53][Will everything in the game be an entity even if it does not need collision detection or movement?]
|
||||
[1:02:02][Don't you think most of the storage concerns stem from having just high and low entities and would be solved by having more granularity there so you have more and smaller arrays of entities with some particular aspect?]
|
||||
[1:02:47][You mentioned considering having the world chunks store a fixed entity count and then add multiple chunks to the hash table if necessary to store more entities. If you were to go that route, how would you compare one chunk to another? Multiple chunks would have the same X,Y,Z.]
|
||||
[1:04:16][In terms of handling entity compression and decompression, where would you grab/store the state of objects that are coming in and out of the update scope?]
|
||||
[1:04:47][Why do you call C compiled with a C++ compiler “C++”?]
|
||||
[1:05:23][Why can't world_position just have a pointer to a world_chunk instead of all those AbsTiles? Then Offset_ is relative to the world_chunk.]
|
||||
[1:07:24][I didn't get to watch the entire stream so I don't know if you considered it, but why don't you have a flag for “about to be deleted” that every entity checks against and nulls pointers. Have it visible for all entities for one frame.]
|
||||
[1:08:27][Do you think the todo puzzler will be handled tomorrow, and do you often sleep on decisions like that?]
|
||||
[1:09:31][(follow-up) What I was getting to is that we seem to be working towards what's called the Entity Component system where what we call now “high” and “low” are just components alongside anything else we want to add to entities later.]
|
||||
[1:10:38][Seeing that the computer handles 1 million entities without lagging, do we really need to worry about the performance hit coming from one extra pointer dereference?]
|
||||
[1:12:30][Will entities be able to transfer from one chunk to another?]
|
||||
[1:12:52][Will we start using the entity system for something other than players/walls soon or will the renderer come first?]
|
||||
[1:13:58][End]
|
||||
[/video]
|
|
@ -0,0 +1,39 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Spatially Partitioning Entities" vod_platform=youtube id=nAFuhA8xqTk annotator=schme annotator=Miblo]
|
||||
[1:15][Recap]
|
||||
[3:11][handmade.cpp: Create more rooms]
|
||||
[4:22][Debugger: Inspect GameState while traversing the world]
|
||||
[7:20][Consider creating a spatial partition]
|
||||
[10:55][Blackboard: Spatial partitions]
|
||||
[13:59][handmade_world.cpp: Introduce ChangeEntityLocation]
|
||||
[18:13][handmade_world.h: Rename AbsTile to Chunk and add ChunkSideInMeters to world]
|
||||
[19:59][handmade_world.cpp: Continue writing ChangeEntityLocation]
|
||||
[22:36][Discuss making FirstBlock a pointer rather than doing the block copy]
|
||||
[25:02][handmade_world.cpp: Continue writing ChangeEntityLocation]
|
||||
[31:56][Blackboard: Keeping the free space at the head of the list]
|
||||
[33:10][handmade_world.cpp: Continue writing ChangeEntityLocation]
|
||||
[37:28][Blackboard: Moving the final entry into the newly freed space]
|
||||
[38:51][handmade_world.cpp: Continue writing ChangeEntityLocation]
|
||||
[42:15][On spending time thinking about data structures vs memory management]
|
||||
[43:18][handmade_world.h and handmade_world.cpp: Manage the memory]
|
||||
[46:51][handmade_world.cpp: Update InitializeWorld and remove GetChunkPositionFor]
|
||||
[48:09][Update the sense of AreOnSameTile]
|
||||
[49:06][Introduce IsCanonical]
|
||||
[52:06][Continue cleaning up]
|
||||
[55:58][handmade.cpp: Change to using ChunkZ]
|
||||
[56:53][Introduce ChunkPositionFromTilePosition]
|
||||
[58:34][Write ChunkPositionFromTilePosition]
|
||||
[1:02:12][Unplug and plug the keyboard back in]
|
||||
[1:03:03][handmade_world.cpp: Finish cleaning up]
|
||||
[1:04:14][Q&A]
|
||||
[1:05:39][Q: Can you please go over the lasagne code again that goes through the linked list and moves around the entities? And can you remove the note in RecanonicalizeCoord about toroidal topology?]
|
||||
[1:15:22][Q: Are you dropping frames? Things are glitchy]
|
||||
[1:15:51][Q: Do you use Bink for videos?]
|
||||
[1:16:17][Q: For someone who does a lot of coding, nothing seems to be going your way today, including the stream integrity]
|
||||
[1:16:33][Q: What is your opinion on things like bunny-hopping or other movement mechanics that are bugs in the code, but contribute to gameplay, e.g. if there was a technique for getting speed in your game, albeit difficult? Would you keep it?]
|
||||
[1:17:13][Q: What do you think about namespacing functions like Entity_GetLocation instead of GetEntityLocation?]
|
||||
[1:17:50][Q: About PushStruct, isn't it true that it can actually fail if you are out of preallocated memory? So wouldn't you still have to check if your custom block allocation fails if your world gets too big?]
|
||||
[1:19:04][Q: Why do you need if(Chunk) after Assert(Chunk)?]
|
||||
[1:19:26][Q: Can you please explain, when you comment your code, what's the logic of having less comments on very big chunks of code?]
|
||||
[1:21:37][Q: When you said the code today wasn't that performance critical, I instantly thought about a machine gun - stone thrower battle just across a chunk edge]
|
||||
[1:22:01][We are done with questions]
|
||||
[/video]
|
|
@ -0,0 +1,64 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Using the Spatial Partition" vod_platform=youtube id=W_z9VN1m2Oo annotator=schme annotator=Miblo]
|
||||
[0:28][Assets: handmade_hero_test_assets_002.zip is released]
|
||||
[2:01][Recap]
|
||||
[3:28][handmade.cpp: Pull in entities by chunk, rather than tile]
|
||||
[5:12][Blackboard: Pulling entities into the working set]
|
||||
[8:46][handmade.cpp: Figure out the CameraBounds situation]
|
||||
[15:25][Make a version of MakeEntityHighFrequency to be called at the lower level]
|
||||
[16:21][Introduce GetCameraSpaceP]
|
||||
[17:41][Continue writing these versions of MakeEntityHighFrequency]
|
||||
[20:18][Use these functions in SetCamera]
|
||||
[21:41][handmade_math.h: Introduce GetMinCorner, GetMaxCorner and GetCenter]
|
||||
[22:52][Debugger: Step through and see what's happening]
|
||||
[24:14][handmade.cpp: Fix the Assertion in MakeEntityHighFrequency]
|
||||
[24:34][Look at AddWall]
|
||||
[25:51][handmade_world.cpp: Look at Subtract and ChunkPositionFromTilePosition]
|
||||
[26:44][Debugger: Step in to AddWall]
|
||||
[28:56][handmade.cpp: Call ChangeEntityLocation in AddLowEntity and make it pass world_position P]
|
||||
[30:29][Pass the world_position P to AddPlayer and finish implementing the spatial partition]
|
||||
[34:53][Run it and see what's happening]
|
||||
[35:59][Debugger: Step into AddPlayer]
|
||||
[36:47][handmade.cpp: Tweak AddLowEntity]
|
||||
[38:02][Debugger: Continue debugging AddPlayer]
|
||||
[38:37][handmade_world.cpp: Tweak ChangeEntityLocation]
|
||||
[39:40][Debugger: Step through the loop in OffsetAndCheckFrequencyByArea]
|
||||
[41:25][handmade.cpp: Add an assertion in OffsetAndCheckFrequencyByArea]
|
||||
[42:37][Debugger: Step through and hit this assertion]
|
||||
[43:34][handmade.cpp: Introduce ValidateEntityPairs]
|
||||
[45:56][Debugger: The MakeEntityHighFrequency routine in SetCamera is the problem]
|
||||
[47:04][handmade.cpp: Pass the correct Index to this routine]
|
||||
[48:05][Run the game and note that the spatial partition is nominally working]
|
||||
[48:48][handmade.h and handmade.cpp: Test the new assets]
|
||||
[50:40][Run the game and find that the new trees are drawn at the wrong locations]
|
||||
[51:04][handmade.cpp: Stop drawing the textured background]
|
||||
[52:51][Assets: Find the base point for the tree in GIMP]
|
||||
[53:37][handmade.cpp: Set the tree's alignment and do DrawRectangle as well]
|
||||
[54:32][Run the game and observe our new trees in their correct positions]
|
||||
[57:44][Q&A]
|
||||
[58:52][Q: For zooming out, could you somehow modify MetersToPixels to make things smaller as you zoom?]
|
||||
[59:39][Q: What is inline v2?]
|
||||
[1:01:04][Q: Why use Emacs versus Visual Studio's IDE?]
|
||||
[1:02:36][Q: Is Emacs better than Vim, or is it just preference?]
|
||||
[1:03:43][Q: Do you think that how fast code runs is the best metric for good code, or do you value simplicity or extensibility as well?]
|
||||
[1:05:59][Q: Why are you using Visual Studio here if you use Emacs?]
|
||||
[1:06:34][@swagkitty69][Did you ever figure out a fix for Emacs whenever you try to create a new file and the patch changes?]
|
||||
[1:07:03][Q: What's guiding you to make steps towards completing the game, i.e. a list of requirements for the game?]
|
||||
[1:08:54][Q: Do you ever get annoyed with reading a high depth of nested for loops?]
|
||||
[1:09:55][Q: Was watching some ROM hacking earlier and watching the registers and memory update in real time was really cool. Do you think a debugger for C could work as well as that?]
|
||||
[1:10:39][Q: How much time do you spend outside the stream in thinking about the code and game design? If you coded eight hours a day, would you be able to code consistently with the same pace as during your stream?]
|
||||
[1:11:38][Q: Can you please put in a proper PRNG before you write world gen algorithms?]
|
||||
[1:12:46][Q: Do you ever feel the need to use recursive functions?]
|
||||
[1:13:15][Q: Do you build with build.exe in command prompt or batch file?]
|
||||
[1:14:11][Q: When you say "renderer", what exactly does that mean? If the drawing you have now isn't rendering, then at what point do we go from drawing to rendering?]
|
||||
[1:15:55][Q: Have any of your friends voiced disagreement with design decisions you've made in this engine?]
|
||||
[1:16:22][Q: How do you distinguish between what a lot of people might called "premature optimisation" versus ensuring a good design that allows for high performance? The difference there seems really subtle. I feel that designing for high performance is simply organising the code and writing in such a way that does not unnecessarily slow down the code and prevent future optimisations, while premature optimisation is simply optimising something because you think something will be slow without evidence]
|
||||
[1:19:52][Q: 4096 random numbers]
|
||||
[1:20:03][Q: Will we have positionless entities? Would something like the current price of Almond Milk futures be an entity?]
|
||||
[1:20:22][Q: Will you be making a level / tile map editor for this game, for easier level creation?]
|
||||
[1:20:40][Q: What is your algorithm for a collision with three and more entities?]
|
||||
[1:21:21][Blackboard: Moving in 1/30th sec]
|
||||
[1:23:15][Q: Do you plan to use some form of logging for debugging purposes?]
|
||||
[1:23:48][Q: When you remove a LowEntity from the Chunk list, you swap another into its place. Won't that mess with references?]
|
||||
[1:24:15][@happy_vertex][Even for slow frequency entities?]
|
||||
[1:24:59][We have come to the end of the questions]
|
||||
[/video]
|
|
@ -0,0 +1,51 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding a Basic Familiar Entity" vod_platform=youtube id=KBCNjjeXezM annotator=schme annotator=Miblo]
|
||||
[2:29][Recap and plan for the day ahead]
|
||||
[5:34][handmade.h: Add EntityType_Familiar and EntityType_Monster]
|
||||
[6:21][handmade.cpp: Introduce AddMonster and update AddLowEntity]
|
||||
[10:49][Add a monster]
|
||||
[12:04][Run the game and see the monster]
|
||||
[13:37][Reiterate the fact that it is the SetCamera call that brings everything into the HighEntity set]
|
||||
[14:29][handmade.cpp: Write cases for drawing each EntityType]
|
||||
[16:47][Run the game and see our Monstar for the first time]
|
||||
[17:10][handmade.cpp: Add a familiar]
|
||||
[18:16][Run the game and see our Familiar for the first time]
|
||||
[19:40][handmade.cpp: Consider how to update the HighEntities]
|
||||
[21:04][Introduce UpdateEntity]
|
||||
[22:30][Consider the "jump code" and do some clean up]
|
||||
[25:52][handmade.h: Introduce entity_visible_piece and entity_visible_piece_group]
|
||||
[27:52][Change DrawBitmap calls to PushPiece]
|
||||
[37:09][Consider doing the rendering directly, rather than deferring it]
|
||||
[38:06][Finish implementing PushPiece]
|
||||
[41:05][Run the game and note that we're doing the exact same thing we were doing]
|
||||
[41:18][handmade.cpp: Add Update calls for the entities]
|
||||
[42:22][Compute the ShadowAlpha incorrectly for now]
|
||||
[42:52][Implement these Update calls and give the Familiar some logic]
|
||||
[49:09][Implement EntityFromHighIndex]
|
||||
[51:22][Change MovePlayer to MoveEntity]
|
||||
[52:23][Give the Familiar some movement logic towards the Hero]
|
||||
[53:51][Run the game and tweak the Familiar's logic]
|
||||
[54:48][Moment of realisation: The player's speed is baked into MoveEntity]
|
||||
[55:04][Make the Familiar move at half the speed of the Hero and check it out in-game]
|
||||
[56:41][Q&A]
|
||||
[58:09][Q: Why "Monstar" and not "Monster"?]
|
||||
[58:58][Q: If someone rewrites your code using OOP and it runs faster, what would you do?]
|
||||
[59:24][Q: Why do you want to be able to outrun your familiar? Doesn't having to stop for him to catch up get annoying?]
|
||||
[1:00:44][Q: Could you make the head bob up and down while following the player?]
|
||||
[1:03:49][Q: Could you write Pong real fast, so I can see how to start?]
|
||||
[1:04:03][Q: "Monstar" would be confused with "Mon*", a pointer to a Mon]
|
||||
[1:04:19][Q: Are we going to eventually use a component-based entity system, instead of using an enum of entity types? If not, why?]
|
||||
[1:05:50][Q: Would you think about doing some proportional integral derivative control for familiars to follow?]
|
||||
[1:06:50][Q: I have a bad feeling about that switch on EntityType. Do you think it will probably go away as we get closer to the final architecture?]
|
||||
[1:07:35][Q: Would collision be an XY-only thing, or would you take into account Z, as in jumping over another entity?]
|
||||
[1:08:49][Q: I have a feeling your Low entities will be quite big if they have AI and stuff. Won't this be a problem for the huge world? Maybe it would have made sense if you had kept the tile data in chunks so you can deflate some entities just when needed]
|
||||
[1:09:47][Q: The performance boost off the low / high shuffle: when will we see this come into play?]
|
||||
[1:10:33][Q: Could we spawn a ton of these floating head things?]
|
||||
[1:30:46][Q: How will the Z work exactly?]
|
||||
[1:31:35][Q: Will there be a flock system for all the floating heads following the Hero?]
|
||||
[1:31:43][Q: What kind of path finding will be implemented for High entities and how will they differ from faraway Low entities? And will Low entity NPCs who are always on the move really far away always resolve? It would be interesting to come across a very live world full of history, dead bodies, etc. due to constant AI acting, but would that be feasible?]
|
||||
[1:32:19][Q: How easy would it be to chain multiple bobbly heads to follow each other?]
|
||||
[1:35:25][Q: CameraTileY + OffsetY not OffsetX in AddFamiliar call]
|
||||
[1:36:04][Q: I was very glad to hear that you deem classes to be basically garbage. I spent too much time with C# trying to learn object inter-jugglery between them]
|
||||
[1:36:19][Q: About the chaining familiars, could each familiar check if the hero has a familiar already and, if it does, then try to follow the familiar instead?]
|
||||
[1:36:44][We've come to the end of the questions]
|
||||
[/video]
|
|
@ -0,0 +1,49 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Hitpoints" vod_platform=youtube id=0_xzS8zxuq4 annotator=Miblo annotator=schme annotator=wheatdog]
|
||||
[1:55][Recap and plan for the day ahead]
|
||||
[3:46][Describe the "sumo mandarin" still being eaten]
|
||||
[4:46][Fix jump shadow]
|
||||
[7:13][Modify shadow alpha on floating head]
|
||||
[10:43][Reiterate the fact that PushPiece is in pixel space]
|
||||
[11:46][Make the familiar stop a little way from the hero]
|
||||
[13:41][Add Hitpoint to hero]
|
||||
[15:25][handmade.h: struct hit_point]
|
||||
[16:02][Should hitpoints themselves be entities?]
|
||||
[17:18][Draw those hitpoints]
|
||||
[23:38][Blackboard: How to center hitpoints around the guy?]
|
||||
[29:30][Implement the code to draw these hitpoints in the right place]
|
||||
[30:45][Change the Offset in PushPiece into meter]
|
||||
[38:51][Run the game and watch the Familiar bob heavily]
|
||||
[39:03][Reduce the BobSin multiplier]
|
||||
[39:36][Place the hitpoints in their correct positions]
|
||||
[41:24][Blackboard: Explain why hitpoints stick together]
|
||||
[42:08][Flip the y coordinate in PushPiece]
|
||||
[43:20][Unify PushPiece and PushRect]
|
||||
[46:03][Fix jump hitpoints]
|
||||
[46:19][Basic v3 and v4]
|
||||
[51:56][Explain why templates are bad]
|
||||
[55:14][Q&A]
|
||||
[56:17][Q: Isn't making a struct for HP is preprogramming a little?]
|
||||
[57:48][Q: Why not just use HitPointMax = 12 instead of dividing into 3 hearts and 4 segments?]
|
||||
[58:24][Q: I noticed the floating head was always behind the player. Are you going to go for a depth buffer approach or draw back-to-front to handle this?]
|
||||
[1:07:36][Q: Would it be entirely possible to completely reconstruct the current code by following every episode of the series without preordering the game?]
|
||||
[1:08:08][Q: Do you think that I, as a totally new person of programming, would be able to follow along with the pace you are working at, doing rapid changes to the code without sometimes telling us why?]
|
||||
[1:09:11][Q: Is there ever gonna be a moment of reflection at some point in the future where you provide a somewhat high level overview of the engine components we have been encountered so far, what they will provide and why we need them?]
|
||||
[1:10:34][Q: I think it would be really cool if you implement a smooth scrolling room-based combination]
|
||||
[1:11:19][Q: Is the translucent thing you were talking about hard to do on 2D UI? Do you write the UI in the same Z-buffer or is it separate?]
|
||||
[1:12:51][Q: Will you be implementing more memory handling code and, if yes, what kind of things?]
|
||||
[1:14:58][Q: If you do a bounding box, which is an inset X amount of meters / tiles from the room edge, you could use the collision of the player with the bounding box to start smooth scrolling to the next room, etc.]
|
||||
[1:15:36][Q: How will we be handling resolution variance?]
|
||||
[1:16:41][Q: What kind of error handling / logging do you have in place now, and how will that possibly change?]
|
||||
[1:17:35][Q: Why are strings such a problem for so many engines?]
|
||||
[1:17:45][Q: How hard is it to port a 32-bit game engine to compile a 64-bit output client if the origin game splits executables to surpass the 4-gig cap?]
|
||||
[1:18:30][Q: Zelda had scrolling when you transition between rooms. Are you going to have something similar?]
|
||||
[1:18:47][Q: Would you mind giving a brief walkthrough of the memory management going on right now in the code from the game boot and forward?]
|
||||
[1:22:21][Q: Why is it impossible to resize a raster image and why does everything have to be rasterized for drawing? Why can't textures be vector-based?]
|
||||
[1:24:51][Q: Couldn't we build handmade.cpp and win32_handmade.cpp in separate threads? Is there a way to pipe the error messages in a sane way using the build.bat approach?]
|
||||
[1:25:57][Q: SWTOR does it (about 32-bit splits into 2 separate processes question)]
|
||||
[1:26:54][Q: Binding of Isaac does have scrolling between rooms, albeit a very quick transition]
|
||||
[1:27:37][Q: What is the drawing app we are using?]
|
||||
[1:28:13][Internet: Check out the scrolling in The Binding of Isaac]
|
||||
[1:29:54][We've finish up on the stream]
|
||||
[1:29:59][Save our giant drawing in Mischief]
|
||||
[/video]
|
|
@ -0,0 +1,37 @@
|
|||
[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]
|
||||
[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]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Basic Moving Projectiles" vod_platform=youtube id=F7feQINaRnk annotator=Miblo annotator=schme annotator=wheatdog]
|
||||
[0:32][Announce that we will save blackboard.art into handmade/misc/]
|
||||
[2:41][Recap]
|
||||
[4:10][handmade.cpp: Make the sword actually be thrown]
|
||||
[6:02][Talk about the annoying and ugly entity usage]
|
||||
[8:05][Back to implementing sword throwing]
|
||||
[9:27][handmade.cpp: UpdateSword]
|
||||
[11:00][For now only, turn off collision detection if the entity doesn't collide]
|
||||
[11:50][Run the game and find out the sword is slowing down]
|
||||
[12:13][Pull out move notions into move_spec and introduce DefaultMoveSpec]
|
||||
[19:20][Run the game and see the slow sword]
|
||||
[19:35][Speed up the sword and make sure the sword can only travel certain distances]
|
||||
[25:29][Run the game and hit the assertion]
|
||||
[27:54][An assumption of why we hit this assertion]
|
||||
[30:29][Use a hacky way to solve this problem]
|
||||
[31:46][Try to handle this problem more sanely]
|
||||
[35:56][Run the game and find a strange bug with the sword's velocity being set to zero]
|
||||
[36:20][Start debugging]
|
||||
[54:59][Realize that the bug is caused by the hacky code Casey just wrote]
|
||||
[56:11][Run the game and do some hookshot things]
|
||||
[56:51][Explain how these hookshot things happen]
|
||||
[1:00:24][Q&A]
|
||||
[1:01:01][@boondoggle42][Owl of SHAME!!!]
|
||||
[1:01:40][@senjai][Do you ever use gdb?]
|
||||
[1:01:46][@senjai][Do you test more than just using asserts?]
|
||||
[1:01:57][@plainflavored][Why did you create a struct for each vector type, instead of using plain float arrays?]
|
||||
[1:04:24][@deepmist][Do you think version control would help when you go off on a tangent for the stream? You can roll back hacks like that?]
|
||||
[1:04:45][@ttbjm][Not a question but that hookshot thing actually looked like it would be kinda fun to play with]
|
||||
[1:05:11][Reminder: Bendable shot which allows you to change direction of the shot once]
|
||||
[1:05:29][@plainflavored][What are your feelings on the vector multiply operator performing a dot product?]
|
||||
[1:06:37][@hanz_mantis][Do you keep your assertions for release code? If not, at what point do you remove them?]
|
||||
[1:07:00][@dsasilentsound][Why wouldn't you encapsulate each entity type into its separate classes?]
|
||||
[1:08:21][@tomforsyth][Correct, they use hadamard]
|
||||
[1:08:46][@mvargasmoran][Did you add the quick-calc hotkey?]
|
||||
[1:10:33][@vornayf][Is XML fair game in this project? It's not a library, but it still might not be handmade enough]
|
||||
[1:11:47][@xxxefwe][Don't you feel that Low entities have already too much extraneous stuff in them and it would be time soon to split them, and also things like the sword might not need the low part at all?]
|
||||
[1:13:50][@btngames][What will we do at 3PM PST when this game is finished?]
|
||||
[1:15:19][@celibdor][Are you happy with the current progress?]
|
||||
[1:15:59][@xxxefwe][More than memory footprint I was thinking about unwanted side effects, i.e. code that deals with the transfer of properties ends up triggering hard to debug shenanigans with the positioning etc.]
|
||||
[1:17:13][Wrap it up]
|
||||
[/video]
|
|
@ -0,0 +1,45 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Simulation Regions" vod_platform=youtube id=a7_vSEEgArQ annotator=schme annotator=jpike]
|
||||
[0:25][Recap on getting initial usage code down to avoid bad design]
|
||||
[2:03][Design constraints for high/low frequency entities]
|
||||
[4:46][Float precision problem for large worlds]
|
||||
[8:21][Problem of scaling to large entity counts]
|
||||
[10:06][Realizing the problem - wrong way to think about low frequency entities]
|
||||
[11:18][Realizing the solution - simulation regions]
|
||||
[16:18][Handling entities moving outside boundaries of simulation region]
|
||||
[18:39][Starting the code reorganization]
|
||||
[19:33][The sim_region struct]
|
||||
[21:10][How to alter SetCamera]
|
||||
[21:56][Ending simulation by mapping entities in a sim_region into low space]
|
||||
[24:18][Beginning simulation by mapping entities into a sim_region]
|
||||
[26:12][Simplifying entity structs]
|
||||
[27:26][More details on BeginSim]
|
||||
[29:11][Adding an entity to a sim_region]
|
||||
[34:23][Switching from camera space positions to simulation space positions]
|
||||
[38:02][Adjusting the entity structs]
|
||||
[39:48][Memory allocation for sim_regions]
|
||||
[42:45][Storing back to low entities in EndSim]
|
||||
[45:45][Deleting code that is no longer applicable]
|
||||
[48:53][Replacing SetCamera with getting a sim_region in the main loop]
|
||||
[51:04][Moving camera position update from main loop to EndSim]
|
||||
[51:48][Adjusting rendering for simulation regions]
|
||||
[56:00][Wrapping up for today - fixing compiler errors]
|
||||
[59:10][Q&A]
|
||||
[59:46][Recommendation for names - instead of stored entities you could have stasis_entity and stasis_region; for the high frequency, you would keep the sim_region and sim_entity.]
|
||||
[1:00:29][Since we know that an entity's speed is bounded, couldn't we calculate a sim_region with bounds such that no entity can move outside of it during the frame? That way anything that the entity could collide with would be pulled into the sim_region?]
|
||||
[1:02:29][How many TODOs do you have?]
|
||||
[1:04:36][How will you handle the disparity in update rate between offscreen and onscreen entities? Does it matter?]
|
||||
[1:05:40][Will the sim_region away from the player cause large timesteps from the normal?]
|
||||
[1:06:22][I missed whether this new system is based around discrete rooms or integer mapped coordinates. If it's based on rooms, would it be trivial to think in coords instead?]
|
||||
[1:06:44][What will happen if your sim_region and player location are at the same place? Will it bug out?]
|
||||
[1:08:11][Why is the low-high frequency system so important? Isn't creating basic gameplay rules and AI interactions in a small world more in-line with your philosophy of doing the simple thing first?]
|
||||
[1:13:34][How will we update low frequency regions given the sparse nature of the world?]
|
||||
[1:14:04][Is there a major advantage to using 'fors' instead of 'whiles'?]
|
||||
[1:15:10][What will the entities that are not visible on the screen be doing? I can't really think of examples of things that need to be updated if they're far from the player.]
|
||||
[1:17:33][How many low entities does it take to screw in a light bulb?]
|
||||
[1:18:26][For your sparse storage, why not store the (x,y,z) coords bit-shifted into an aligned integer to use it as a composite key into a dictionary or hash map?]
|
||||
[1:20:01][Do you approach design in a similar way to your architecture (i.e. exploration-based design, design sort of emerges itself organically, etc.)?]
|
||||
[1:20:24][Is multi-threading in the scope of topics for the project?]
|
||||
[1:21:20][If a far away room gets updated and the rooms around it are updated too, don't we have this recursive problem where the around rooms need their neighbor too?]
|
||||
[1:22:29][How much work would it take to turn the game you are making from a 2D world into a 3D world?]
|
||||
[1:23:07][To clarify my early design question, I just mean as far as your design decisions for Handmade Hero.]
|
||||
[/video]
|
|
@ -0,0 +1,33 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Mapping Entity Indexes to Pointers" vod_platform=youtube id=lHKso30LdU8 annotator=schme annotator=jpike]
|
||||
[1:33][Recap of where we are with simulation regions]
|
||||
[1:58][Reorganizing the entity structs]
|
||||
[5:05][Updating code for sim_entity within low_entity]
|
||||
[8:17][Setting the entity's StorageIndex]
|
||||
[11:07][Moving entity stuff out of handmade.h]
|
||||
[11:31][How to reference entities?]
|
||||
[14:39][Creating an entity_reference]
|
||||
[16:00][Populating an entity_reference in EndSim]
|
||||
[17:52][Loading from an entity_reference in BeginSim]
|
||||
[22:00][Storing an entity mapping in a hash table when adding an entity]
|
||||
[23:24][Functions for the entity mapping hash table]
|
||||
[24:04][Creating the entity mapping hash table]
|
||||
[27:03][Internal chaining for the hash table]
|
||||
[28:27][Implementing GetSimEntityFromIndex]
|
||||
[37:45][Implementing MapStorageIndexToEntity]
|
||||
[39:24][Loading entities recursively]
|
||||
[44:14][Addressing compiler errors]
|
||||
[45:14][Updating camera following code]
|
||||
[48:54][Addressing compiler errors]
|
||||
[50:27][Porting MoveEntity code to work with simulation regions]
|
||||
[56:29][Leaving notes for remainder of simulation region work]
|
||||
[57:03][Q&A]
|
||||
[58:53][Why don't you upload chat logs with videos somehow?]
|
||||
[1:01:08][There's a bug in your random number table. The numbers are limited to a range.]
|
||||
[1:02:15][Could explain your naming conventions or explanations behind using them? I've never seen a style similar to yours - it seems inverted.]
|
||||
[1:04:04][Do you want the stored entities to move like normal ones or simulate them? Like you mentioned stuff moving around with slower updates off-screen.]
|
||||
[1:05:21][Maybe if you change your Twitch server? \[in reference to dropped packets for stream\]]
|
||||
[1:06:15][What is the point of high and low entity? Would it make sense to just have one?]
|
||||
[1:07:13][Can entities reference each other? Do you need to check for cyclic references?]
|
||||
[1:09:03][When is a ground-up rewrite warranted? How often do you just burn everything down and start fresh?]
|
||||
[1:18:32][What are your opinions of Scrum and Agile methods?]
|
||||
[/video]
|
|
@ -0,0 +1,34 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Finishing the Simulation Region Change" vod_platform=youtube id=XfBTNH0nL4I annotator=schme annotator=jpike]
|
||||
[0:36][Recap on where we are with simulation region change]
|
||||
[3:55][Creating a separate file for entity behavior code]
|
||||
[6:20][Changing DrawHitpoints to operate on sim_entity instead of low_entity]
|
||||
[7:05][Separating code for updating player from controller processing code]
|
||||
[22:07][Fixing more compiler errors]
|
||||
[23:37][TODO for renaming sim_entity to entity]
|
||||
[24:23][Fixing more compiler errors]
|
||||
[25:03][Bringing in handmade_entity into the build]
|
||||
[25:23][Fixing UpdateFamiliar]
|
||||
[28:03][Fixing UpdateMonstar and UpdateSword]
|
||||
[29:38][Overview of remaining TODOs for sim region code]
|
||||
[29:55][Using transient storage for a SimArena]
|
||||
[38:01][Fixing remaining compiler errors]
|
||||
[38:32][Addressing TODO for clearing hash table]
|
||||
[42:33][Starting to debug the code]
|
||||
[47:17][Altering GetHashFromStorageIndex code to make inspection easier during debugging]
|
||||
[48:18][Continuing stepping through code]
|
||||
[52:09][Found a bug - forgot to update entity pointer]
|
||||
[52:45][Continuing stepping through code]
|
||||
[54:54][Assertion fired on null pointer in RecanonicalizeCoord]
|
||||
[55:20][Stepping through EndSim to figure out assertion]
|
||||
[58:35][Assertion caused by float precision problem?]
|
||||
[1:00:02][Adding epsilon to IsCanonical to prevent assertion]
|
||||
[1:01:35][Debugging camera positioning]
|
||||
[1:04:20][Adding TODOs since we have to stop for today]
|
||||
[1:06:21][Q&A]
|
||||
[1:07:13][Assuming we don't go wandering too much on our own, which week has accumulated enough code base for a basic, simple, fully functional game?]
|
||||
[1:09:04][Regarding high and low entities, would the following solution work? Using one entity struct, all entities are stored in one array, and frequently update the entity if the entity is within camera bounds, and use low-frequency updating if it's outside the camera bounds?]
|
||||
[1:11:45][Can you give a high-level overview of how entities work now? I get it in bits and pieces, but this week has lost me.]
|
||||
[1:19:59][I'm not sure I fully caught how short-lived/temporary/transient memory is? Is it only for single frames or longer lived? If for longer-lived memory, how do you make sure you don't wrap around and start overwriting memory still in use? Think some homing attack which takes many many frames to resolve.]
|
||||
[1:21:25][How do you determine how much time each sim region should be updated if they aren't updated each frame?]
|
||||
[1:21:54][How does the work during this experimental phase fit into the final code? Will we be re-using most of it or will we be starting from scratch?]
|
||||
[/video]
|
|
@ -0,0 +1,29 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding Support for Non-spatial Entities" vod_platform=youtube id=vXPAE5UfcbA annotator=schme annotator=jpike]
|
||||
[2:06][Where we left off with simulation regions]
|
||||
[2:52][Overview of limitation of simulation region - entities currently must have position]
|
||||
[4:40][Adding sim_entity_flags]
|
||||
[8:35][Updating code for moving collides member variable into a flag]
|
||||
[14:09][Making the sword non-spatial]
|
||||
[16:51][Handling non-spatial entities in MoveEntity]
|
||||
[18:59][Handling non-spatial entities in BeginSim]
|
||||
[19:59][Handling non-spatial entities in EndSim]
|
||||
[21:09][Handling non-spatial entities in AddEntity/LoadEntityReference/GetSimSpaceP]
|
||||
[25:21][Handling non-spatial entity in UpdateSword]
|
||||
[29:02][Improving ChangeEntityLocation]
|
||||
[35:05][Debugging GetWorldChunk assertion - problems with storing invalid positions and non-spatial flag]
|
||||
[39:31][Fixing camera following logic]
|
||||
[40:54][Fixing dZ of player]
|
||||
[43:03][Fixing initial camera position]
|
||||
[44:33][Restoring sword functionality]
|
||||
[46:39][Why is the sword's shadow so dark? - Multiple swords]
|
||||
[50:21][Guarding against having multiple entities in sim_region with same storage index]
|
||||
[57:23][Preventing sword being reset when holding down key]
|
||||
[58:42][Q&A]
|
||||
[1:00:06][Does the current collision code support walls that are not 90 degrees? Say if the wall is at 45 degrees, would the collision code still work?]
|
||||
[1:03:28][Why not set a boolean value 'to be removed'? It seems like setting the position to an arbitrary position isn't as explicit as setting a flag to say that the entity should be removed on the next update frame.]
|
||||
[1:05:03][The rearranging of code did \[introduce\] some errors into the code. Is this normal for daily coding?]
|
||||
[1:08:17][Do we expect most entities to be colliding? If so, does it make sense to have the flag be 'non-colliding' instead?]
|
||||
[1:09:03][Then why set null position?]
|
||||
[1:09:32][Would using a tagged union for entity references fix issues we're having with LoadEntityReference?]
|
||||
[1:10:01][Do you have the whole big picture game architecture in your head at every point, or do you have to check what you did from time to time?]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Making Updates Conditional" vod_platform=youtube id=lnnb49-FYqU annotator=schme annotator=jpike]
|
||||
[1:30][Reviewing the 'apron' idea for update regions]
|
||||
[11:04][Adding Updatable bool to sim_entity]
|
||||
[12:38][Setting Updatable bool in AddEntity]
|
||||
[15:21][Checking Updatable bool in simulation update]
|
||||
[16:26][Setting different bounds for sim_region (UpdatableBounds and Bounds)]
|
||||
[21:48][Does the sword still work? - No]
|
||||
[23:05][Bug - Not setting positions properly when loading entities from references]
|
||||
[26:53][Fixing updating of Familiar]
|
||||
[28:26][Removing non-spatial flag check for sword]
|
||||
[29:56][How to update MoveEntity for more advanced collision effects?]
|
||||
[33:44][Review of iterative movement]
|
||||
[35:12][How to have collision responses within iterative movement?]
|
||||
[35:46][Discussion of callbacks for handling collisions]
|
||||
[42:03][Alternative #1 to callbacks - how to break up MoveEntity]
|
||||
[43:57][Alternative #2 to callbacks - set acceleration and delay calling MoveEntity]
|
||||
[46:23][Implementing alternative #2]
|
||||
[51:12][Bug fixing - MoveEntity shouldn't be called for non-moving or non-spatial entities]
|
||||
[53:27][The sword shouldn't be moving forever...]
|
||||
[55:34][Q&A]
|
||||
[56:42][How will collision be done with moving backgrounds? Such as mazes and moving tiles? Or that won't be in this game?]
|
||||
[59:36][Why don't we use .c instead of .cpp?]
|
||||
[1:00:03][When you started with enums, why did you start with (1 << 1) instead of (1 << 0?)]
|
||||
[1:00:26][How big are the source files getting? Are you feeling overwhelmed by the size yet?]
|
||||
[1:01:55][What happens when you somehow glitch through a wall? Will the game crash?]
|
||||
[1:02:47][How many lines have you written so far?]
|
||||
[1:03:12][In what situation would you prefer callbacks to a huge switch-case block?]
|
||||
[1:07:40][Do we load and draw everything manually to a DIB section, then blit the final image?]
|
||||
[1:08:15][After you mentioned the 'do all collisions at one time' thing, it seems like in addition to being greatly easier to implement, it also matches the real-world better, like summing all the forces to get the net direction. Why would anyone every want to do an update function for each object?]
|
||||
[1:09:42][I \[Jonathan Blow\] use cloc to count lines. It is pretty decent.]
|
||||
[1:12:06][Besides the bits that are obviously tacked on, would you consider the Windows GUI a good API?]
|
||||
[1:13:40][I guess I should have asked how big it has to get for you to start feeling overwhelmed.]
|
||||
[1:14:29][How'd you decide on this order to build up the engine? Was it intuition or experience?]
|
||||
[1:19:09][Speaking of UML and diagrams, do you ever use class schematics for code planning?]
|
||||
[1:19:42][Don't you need to be able to enumerate every possibility in order to use a switch statement? What if you wanted to make a system that can be extended?]
|
||||
[1:21:33][Why use switch statements instead of just big if-else blocks?]
|
||||
[1:21:54][Will the way in which collisions are handled be order-independent?]
|
||||
[1:22:56][Is it better to debug as you go or towards the end of a programming cycle?]
|
||||
[1:25:05][Actually you want to pass --no3, otherwise it \[cloc\] is lying about the number of lines - it is dumb.]
|
||||
[1:26:39][Will the game have multiplayer and/or co-op?]
|
||||
[/video]
|
|
@ -0,0 +1,35 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Exact Enforcement of Maximum Movement Distances" vod_platform=youtube id=0ZjYHfYAjQg annotator=schme annotator=jpike]
|
||||
[0:28][Recap of where we are with collisions and interactions]
|
||||
[1:07][Bug fix from forums - Typo in MoveEntity for testing entity flag]
|
||||
[3:44][Overview for today - max movement distances]
|
||||
[7:57][Review of MoveEntity]
|
||||
[9:22][Review of tMin usage in MoveEntity]
|
||||
[13:36][Starting implementation with a maximum distance]
|
||||
[16:08][Discussion about cost of square roots]
|
||||
[17:21][Using a ratio to cap tMin]
|
||||
[21:49][Updating DistanceRemaining]
|
||||
[22:41][TODO for Epsilon for (PlayerDeltaLength > 0) ?]
|
||||
[23:37][Adding DistanceLimit to sim_entity]
|
||||
[26:37][Decrementing DistanceLimit]
|
||||
[28:07][Testing out the changes]
|
||||
[28:55][Discussing collision response and double dispatch]
|
||||
[42:55][Alternative to entity type double dispatch - fundamental quality double dispatch]
|
||||
[47:26][Starting to add entity type double dispatch first for collision handling]
|
||||
[54:30][Why sword-monstar collision won't work quite yet - need to respond to collisions but not stop movement]
|
||||
[58:26][Q&A]
|
||||
[59:40][How long in your opinion does it take to become fluent on Emacs?]
|
||||
[1:00:10][Could an entity have multiple fundamental quality property things?]
|
||||
[1:02:11][When are you planning to add depth sorting?]
|
||||
[1:02:33][Will there be enough entities that some optimization will have to happen? How many do you expect to have on a screen? Hundreds?]
|
||||
[1:04:29][I'm not sure I quite follow your argument for double-dispatch table versus fundamental qualities. Seems to me like you still need to figure out what to do for each quality, what to do in the presence of others, still leads to quadratic growth.]
|
||||
[1:10:54][Yesterday you were talking about using callbacks for the collision system. Will this new system replace the need for them?]
|
||||
[1:11:30][Casey, I asked a question and the Twitch app crashed on iPad. Any chance you my questions before it did?]
|
||||
[1:12:20][Casey, as a casual observer and occasional troll, where is the game now? Seriously, I haven't watched for a while, and how do you find the energy to do this weeknights?]
|
||||
[1:16:34][I noticed sometimes you try to determine regions for collision boxes. Why not implement basic shapes and use those as debug helpers with some alpha percentage?]
|
||||
[1:18:16][Do you test for collision every update interval? If your sword overlaps with an entity, could it happen that a moving entity gets missed because both entity and sword move in the same tick above and beyond each other?]
|
||||
[1:20:27][To me it seems as the sword should be influenced by the speed of the player movement at the time it was dispatched? Am I right?]
|
||||
[1:23:24][I missed the part on how many entities you are simulating at once and where you store them, but won't the dispatch table approach be negative for cache performance? Could its simulation be deferred?]
|
||||
[1:24:58][It seems logical to make infinity the default maximum distance an entity can travel, but that could have performance implications. Could you say something about that?]
|
||||
[1:26:14][Could you also do something like that for AI, where for instance, you can impose simple behaviors on top of each other randomly, to make complex and varied behavior, instead of doing the more common behavior tree approach?]
|
||||
[1:26:32][If you do the AAA-ness way, can you come back to it later and edit or add more details to it like from 6-to-8, etc., or will that cause problems?]
|
||||
[/video]
|
|
@ -0,0 +1,23 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Pairwise Collision Rules" vod_platform=youtube id=YrqQLA9SOEc annotator=schme annotator=jpike]
|
||||
[1:35][Recap of where we left off with collision responses]
|
||||
[4:44][Changing things so that stopping on collision is part of collision handling]
|
||||
[6:25][Overview of ignoring certain collisions]
|
||||
[13:40][Restructuring collision code for ignoring certain collisions with rules]
|
||||
[23:33][pairwise_collision_rule and collision rule hash table for ShouldCollide]
|
||||
[31:27][Tricky problem - How to remove collision rules?]
|
||||
[34:11][AddCollisionRule function]
|
||||
[39:42][Adding first rule - sword shouldn't collide with entity that throws us]
|
||||
[41:55][Adding collision rule when StopsOnCollision is false]
|
||||
[43:37][Problem - Don't want to keep on adding new collision rules]
|
||||
[47:16][Clearing collision rules for an entity]
|
||||
[58:15][Debugging collision rule code]
|
||||
[1:04:05][Q&A]
|
||||
[1:05:03][What stops us from programming a game that directly boots into BIOS (hooks up to hardware as low as possible basically)?]
|
||||
[1:07:11][Do you ever use function pointers?]
|
||||
[1:09:07][Should the thrown entity have the player's direction/speed added to its thrown speed/direction so you cannot catch your own throws?]
|
||||
[01:10:34][Could you explain again why you should order the entities before processing the properties?]
|
||||
[1:12:30][Isn't there a potential bug in MoveEntity if an entity happens to spend the whole distance limit, which gets set to (0,0), and then gets considered unlimited in the next frame?]
|
||||
[1:14:07][Can the pointers in the hash function become a memory problem?]
|
||||
[1:16:41][I have two gameplay requests - A non-euclidean room and a monster that spans multiple rooms vertically. Are those things possible?]
|
||||
[1:19:11][Are renderers reusable?]
|
||||
[/video]
|
|
@ -0,0 +1,52 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Exploration To-do List" vod_platform=youtube id=afWxzIHB5Ss annotator=schme annotator=jpike]
|
||||
[0:29][Overview of the development process]
|
||||
[4:03][Recap of collision rule hash table]
|
||||
[5:53][Problem with removing collision rules from hash table]
|
||||
[8:04][Simple solution, with trade-off, for quickly finding collision rules for entity in hash table - but not doing quite yet]
|
||||
[20:37][Bug in AddRadiusTo]
|
||||
[23:06][Brainstorming stuff to do]
|
||||
[29:14][TODO: Animation/Rendering]
|
||||
[30:33][TODO: GAME]
|
||||
[31:24][TODO: Rudimentary world gen]
|
||||
[33:25][TODO: AI]
|
||||
[34:32][TODO: Collision detection?]
|
||||
[35:14][TODO: Implement multiple sim regions per frame]
|
||||
[36:25][TODO: Metagame / save game?]
|
||||
[41:11][TODO: AI - Rudimentary monstar behavior example]
|
||||
[41:22][TODO: Z!]
|
||||
[43:06][Reviewing the TODO lists - What's hard and what's easy?]
|
||||
[44:22][TODO: Audio]
|
||||
[46:18][TODO: Metagame - save slots]
|
||||
[48:48][In-game UI hopefully not needed]
|
||||
[49:16][TODO: Debug code]
|
||||
[50:33][TODO: Rudimentary world gen - Map display]
|
||||
[51:34][Will you be carrying multiple items?]
|
||||
[52:08][Sorting the TODO lists]
|
||||
[56:42][Q&A]
|
||||
[57:22][Isn't doing this list thinking too far ahead or thinking too far according to your compression-oriented programming?]
|
||||
[59:15][In the GetHashFromStorageIndex function, you do some bit-twiddling to map hash value into hash index. Is there a reason that you didn't just compute hash index as hash index = hash value MOD array count?]
|
||||
[1:03:19][Right now the familiar lags behind since it moves slower than the player. There may be many legitimate situations where the player and familiar may be separated. Have you considered implementing a proportional integral derivative controller for its speed?]
|
||||
[1:04:44][Could you briefly go over the solution for the collision table again?]
|
||||
[1:04:56][Do we have to do z-sorting? For a game like this, can't we just sort on the y-axis, and do things to simulate climbing stairs (change the velocity as the character moves up something like stairs and what have you)?]
|
||||
[1:06:28][I heard you talking about animations and see you wrote down a skeletal system. Do you have plans on importing from a pre-made program or making an animation program for the artist to use?]
|
||||
[1:07:57][For the list - Superfish!]
|
||||
[1:08:55][Asset loading management is missing from the list.]
|
||||
[1:09:40][What 2D game can you think of that did good z-movement? I personally always liked Prince of Persia when he climbed the steps at the end of the level.]
|
||||
[1:10:32][Have you seen watchpeoplecode.com?]
|
||||
[1:11:20][What is your opinion on using existing code someone else wrote as a learning tool?]
|
||||
[1:12:58][Spriter's file format is completely open and documented.]
|
||||
[1:13:24][Do you want to have quests in the game? In this case, how are you planning to define them?]
|
||||
[1:14:08][I think we dropped the check for Entity == HitEntity in collision code last time, or did I miss something?]
|
||||
[1:15:03][Will you patent the monstar pathfinding algorithm?]
|
||||
[1:16:02][For z-axis movement, would it be feasible to resize the sprite to be larger as they move up, and then resize the sprite to be smaller once it reaches the level, while doing some parallax stuff on the wall textures for the second resize?]
|
||||
[1:17:58][I think Pokemon 3rd gen/1st gen did good stuff with the z-axis.]
|
||||
[1:18:35][Will the monstar encounters be random based (like Final Fantasy, Dragon Warrior) or will they be more static (Zelda style)?]
|
||||
[1:19:10][Should there be a time limit as well as a distance limit on the sword?]
|
||||
[1:20:09][Minish Cap handles the z-axis really well.]
|
||||
[1:20:16][How exactly does your question sorting plugin work?]
|
||||
[1:20:33][I believe Ultima Online did some stuff with z-axis, but I'm not sure if it's good though.]
|
||||
[1:21:13][What's the biggest game project you personally worked on?]
|
||||
[1:22:14][No remark on handmade animations? Or did I miss that?]
|
||||
[1:23:21][I've been writing my own platform layer in my own code, and I've found I've been 'poisoned' by your approach. By this, I've been heading down by a path very similar to yours simply through knowledge of a possible solution to it. This leads me to a very narrow way of thinking about problems. Do you run into this as well? How do you break through the wall? It takes me a very long to get solutions that fit my needs when I see someone else's.]
|
||||
[1:28:38][How long do you think a good game should be?]
|
||||
[/video]
|
|
@ -0,0 +1,54 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Converting to Full 3D Positioning" vod_platform=youtube id=FVPxhovGsuE annotator=schme annotator=Miblo annotator=wheatdog]
|
||||
[0:15][Recap]
|
||||
[1:07][Casey talk about "The coincidence of how people use their TODO notebook"]
|
||||
[2:52][Bug fix: Remove the code we left when we were playing around with familiars]
|
||||
[5:39][Decide what to do today: Clean up things by using v3]
|
||||
[6:01][Get rid of the struct "world_difference" and fix other places we were using it]
|
||||
[8:16][handmade_world.h: Change ChunkSideInMeters to v3]
|
||||
[9:45][handmade_math.h: Implement the Hadamard product]
|
||||
[11:16][handmade_math.h: Clone v2 operations for v3]
|
||||
[15:14][handmade_world.h: Offset_ is v3 now]
|
||||
[16:00][Point out the puzzler from world_position can be solved because we now no longer operate on entities without bringing them into the sim_region]
|
||||
[17:28][Back to deal with compiler errors]
|
||||
[23:37][The ground plane should not be the negative bottom sides of Tiles because we want to prevent things from accelerating near the Z bound]
|
||||
[26:12][handmade_world.h: Tidy up the function ChunkPositionFromTilePostion]
|
||||
[29:14][handmade_math.h: Use anonymous struct in union to grab part of the elements we are interested in v3]
|
||||
[31:54][handmade_math.h: Make a v3 "constructor" that append a v2 with a real32 value]
|
||||
[33:05][handmade_sim_region.h: Upgrade P/dP in sim_entity to v3]
|
||||
[33:47][Keep on dealing with compile errors]
|
||||
[35:37][handmade_math.h: rectangle3]
|
||||
[36:34][handmade_math.h: AddRadiusTo should take a vector as a parameter]
|
||||
[37:54][handmade_sim_region.h: Upgrade MoveEntity routine to v3]
|
||||
[43:20][Get rid of GetCameraSpaceP]
|
||||
[43:35][Keep on cleaning up]
|
||||
[47:20][Program now can be compiled]
|
||||
[47:37][Run the game and find out there is absolutely nothing except our hero]
|
||||
[48:01][Make sure that rectangle bound set up properly]
|
||||
[48:33][Blackboard: Explain what we want to make sure in more detail]
|
||||
[56:57][The bug might be Casey broke something in terms of how to store things into chunk position]
|
||||
[58:13][Q&A]
|
||||
[58:51][@plainflavored][Have you considered using macros that take a name and operator to paste in simple vector functions?]
|
||||
[1:00:02][@llorton][What kind of almond milk are you drinking?]
|
||||
[1:00:12][@donotputmeonpizza][Do you have any suggestions on how to keep up with your 5 episodes a week, when me and my friend have only started watching your videos from the beginning last week?]
|
||||
[1:01:22][@ryanries][Why type 1.0f instead of 1.0?]
|
||||
[1:02:28][@hexagonal_diamond][Have you considered writing tests?]
|
||||
[1:05:36][@rsxole][Can you explain what your Z really means? If it's for separating levels, should tall walls be able to poke into the upper Z layer(s)?]
|
||||
[1:06:36][Reminder: Monster that you fight on two floors at once, going up and down stairs to fight the bottom or the top]
|
||||
[1:07:34][@xanthacroi][How do you tab between things so quickly?]
|
||||
[1:08:39][@mickeyd32][How good of a computer do I need to smoothly code?]
|
||||
[1:10:19][@saltattack][I love you... Will you marry me?]
|
||||
[1:10:36][@nathyks][How smooth is it transitioning a knowledge of Python into C++]
|
||||
[1:11:26][@apathydude][Have you thought more on how the Z-axis will look when finally implemented?]
|
||||
[1:12:35][@biralx][When you work on a game do you work on one project or do they contract you for multiple projects?]
|
||||
[1:12:50][@nicstop][Do you think about data locality all the time, to reduce cache misses?]
|
||||
[1:14:37][@jkr2120][How long have you been programming?]
|
||||
[1:14:50][@plainshane][Are you done working for real - made all your money, and this is just for fun / philanthropic reasons?]
|
||||
[1:15:10][@duroate][How do you determine what gathers in a chunk with the Z-axis? Do you grab entities from all 6 sides of the chunk?]
|
||||
[1:15:27][Blackboard: "Axis aligned bounding box"]
|
||||
[1:18:11][handmade.h: TODO(casey): Minkowski inclusion test for sim region begin / updateable bounds]
|
||||
[1:19:28][@hnau][I recently watched Jon Blow's talk on attempting deep work and became curious: Do you do anything similar from a psychological perspective, i.e. go dancing like Jon does or do you have some other relaxing / rewarding activity that helps to spawn creative thought or gain elusive insights into problems you are struggling to solve?]
|
||||
[1:21:08][@drtwox][Do you think RK4 integration is "overkill" for a 2D game like Handmade Hero?]
|
||||
[1:24:25][@mymlyreen][Hi, just tuned in so it might have been mentioned before, but why are you using assertions in non-test code?]
|
||||
[1:29:38][@d7samurai][What about having two regions - one outer and one inner, include entities that move into the inner and exclude entities that move out of the outer - so there's a "margin" that allows some moving without ping-ponging right across a hard in / out line?]
|
||||
[1:31:13][Call it]
|
||||
[/video]
|
|
@ -0,0 +1,47 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Proper 3D Inclusion Tests" vod_platform=youtube id=tcirDivLd8A annotator=csnover annotator=schme annotator=Miblo]
|
||||
[0:48][Coding from scratch, "just like mommy used to code"][quote 26]
|
||||
[0:57][Recap]
|
||||
[1:51][Fix IsInRectangle cut/paste bug]
|
||||
[3:04][Fix ChunkPositionFromTilePosition bug]
|
||||
[4:48][Debug MapIntoChunkSpace precision problem]
|
||||
[7:11]["Just do the code and let it go..."][quote 27]
|
||||
[9:07][Debug jumping over the world problem]
|
||||
[13:42][Diagramming jump into the next highest chunk]
|
||||
[16:35][Found the problem!]
|
||||
[19:41][Solving the world_position puzzler]
|
||||
[21:27][handmade.h: Comment out world_position P;][quote 28]
|
||||
[28:36][Actually, the world_position puzzler is unsolvable]
|
||||
[31:24][Next up: Minkowski inclusion test]
|
||||
[31:45][Frinstances][quote 29]
|
||||
[33:30][Diagramming the problem]
|
||||
[36:16][Related problem: finding colliding entities outside the test area]
|
||||
[42:12][Implementation of the simpler option]
|
||||
[57:41][Q&A]
|
||||
[59:41][@pseudonym73][We had a bit of a troll problem today. Hang on]
|
||||
[1:00:23][@garlandobloom][Pasta was gross]
|
||||
[1:00:37][@bruno51615][What was your grade on APCS?]
|
||||
[1:01:44][@lowaccuracy][I just joined the stream, so sorry if this has been answered, but what math classes did you take in high school, and what grades did you get?]
|
||||
[1:02:12][@zamar037][I noticed a bunch of your functions are inlined. Is there a difference between using regular functions and inlined functions?]
|
||||
[1:05:44][@byval][Day 72, how much longer do you think it's going to take?]
|
||||
[1:06:50][@happy_vertex][Could you take a look at players collision? They spawn very close to each other]
|
||||
[1:07:22][@manicthenobody][Since there's not much in the way of questions, where do you get your Almond Milk from?]
|
||||
[1:07:42][@ocdfalcon1997][This is my first time watching your stream, and I would like to learn how to code. This seems like a cool stream to watch, but I don't know your streaming schedule. So basically, what's your streaming schedule?]
|
||||
[1:08:10][@chronaldragon][Are there are any good use cases for 4D vectors?]
|
||||
[1:08:32][Blackboard: 4D Vectors]
|
||||
[1:11:01][@masterevilace][General programming question: Do you tend to order your functions in any sort of order - public / private / static - or even flow-wise - Function A calls Function B? Do you tend to always put one above the other, or do you never think about it?]
|
||||
[1:12:03][@insofaras][Will you extend your Minkowski collision implementation to deal with rotation / arbitrary convex polygons in the future?]
|
||||
[1:15:14][@nxsy][Why is Win32 Mouse Handling so annoying - WM_LMOUSEDOWN but no WM_LMOUSEUP if you leave your window, WM_MOUSELEAVE unless you get alt-tabbed away, SetCapture helping if you leave the window, unless alt-tab...]
|
||||
[1:16:07][@quatzequatel][Casey, when will the Z-index of the entities occur?]
|
||||
[1:16:21][@d74g0n][Is anyone here old enough to miss the great space coaster?]
|
||||
[1:16:44][@gaudongaming][Do you ever foresee the project getting to a stage in which you accept pull and merge requests from other developers to fix bugs, add features or other things? Of course you would first have to start using version control before your hard drive fails]
|
||||
[1:17:29][@manicthenobody][I've jumped from, like, episode 12 in the archive to the stream, so forgive me if this has been answered before, but why does the player even need to jump?]
|
||||
[1:18:10][@happy_vertex][Create a second player by using the Xbox controller, it will be very close to the one created by a keyboard, so both cannot move]
|
||||
[1:19:38][@bassxzero][What's the most elegant / sexy piece of code in the game so far?]
|
||||
[1:21:42][@valdyr90][What program do you use for your blackboard?]
|
||||
[1:21:57][@hguleryuz][If I am not mistaken, in your code you didn't need to use any forward declarations and come up against cyclic dependencies up until now. Is this by chance or did you try in your head not to have them when writing up new functions / structs?]
|
||||
[1:23:39][@quatzequatel][Entities drawing back to front]
|
||||
[1:23:59][@d74g0n][Will there be a Handmade Hero Convention annually, after game release?]
|
||||
[1:24:25][@erdomina][Are you implementing any advanced data structures and would you recommend learning assembly to aid in optimizing C programs? Any tips on practice?]
|
||||
[1:26:09][@ddengster][Is there such a thing as a 'hardware' cursor as compared to a 'software' mouse cursor?]
|
||||
[1:28:20][We are out of time]
|
||||
[/video]
|
|
@ -0,0 +1,37 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Temporarily Overlapping Entities" vod_platform=youtube id=e0yjNipizK0 annotator=schme annotator=Miblo]
|
||||
[0:57]["Little tiny baby zipfiles"][quote 30]
|
||||
[2:06][Recap and plan for the day]
|
||||
[4:09][handmade.cpp: Load rock02.bmp into the set]
|
||||
[5:01][handmade_sim_region.h: Add EntityType_Stairwell to entity_type]
|
||||
[6:42][handmade.cpp: Re-enable DoorUp and DoorDown]
|
||||
[7:44][Talk about adding an entity for the stairwell]
|
||||
[8:47][Introduce AddStair]
|
||||
[13:23][Run the game and see our new stairwell]
|
||||
[13:50][Consider how to implement the stairwell]
|
||||
[15:23][Blackboard: Traversing stairs]
|
||||
[18:22][Blackboard: Inside / Outside]
|
||||
[21:51][handmade_sim_region.cpp: Introduce the concept of the player being within regions of space]
|
||||
[26:25][Blackboard: Specifying the traversable area of the stairwell]
|
||||
[27:34][handmade_sim_region.cpp: Continue writing the inclusion check]
|
||||
[42:03][Blackboard: Checking to see if two rectangles intersect]
|
||||
[46:42][handmade_sim_region.cpp: Write RectanglesIntersect]
|
||||
[49:55][HandleCollision between the Hero and a Stairwell]
|
||||
[51:33][Try passing through the stairwell]
|
||||
[51:53][Debugger: Step into HandleCollision]
|
||||
[53:46][handmade.cpp: Make AddCollisionRule return a boolean which states whether or not the entity was already added]
|
||||
[55:46][handmade_sim_region.cpp: Record the fact that you've added a collision rule if it's new]
|
||||
[57:27][handmade.cpp: Intrdouce RemoveCollisionRule]
|
||||
[59:07][handmade.h: Introduce pairwise_collision_rule_flag]
|
||||
[1:00:29][TODO(casey): Transient collision rules! Clear based on flag]
|
||||
[1:03:04][Q&A]
|
||||
[1:04:43][Q: Why did you decide to code at, like, 4?]
|
||||
[1:05:20][Q: Glad to see the A-A B-B collision detection code come up. Took me way too long to figure that one out]
|
||||
[1:09:50][Q: You mentioned yesterday about choosing between two ways to solve the problem of large entities that overlap the sim region but are not in the selected chunks. It looked to me like you could use both solutions. If the entity is larger than the max entity size, still allow it and use the add it twice approach. Would this get you all the advantages of both with neither of the disadvantages?]
|
||||
[1:11:36][Q: Would it make sense to just put a wall of 1/3rd the length on each side of the stairwell to handle the collision?]
|
||||
[1:12:15][Q: Is the TODO list in the platform layer a more or less comprehensive list of changes you would do before shipping, or are there some additional things one should note?]
|
||||
[1:12:42][Q: Yesterday you mentioned that when jumping up to a chunk above, the character would jump over the ground level Z=0 and then come down, however, since the jump code is making the Z position go to 0 from negative, wouldn't the character be pushed up to 0 as soon as it reached the low side of the upper chunk, and won't this cause problems when trying to move the character up the stairs?]
|
||||
[1:13:57][Q: All of the these algorithms all specify convex shapes. Is there anything usable for concave shapes, or is it usually always the case that it's better to just split up a concave shape into multiple convex shapes?]
|
||||
[1:15:11][Q: About the TODO list, you mentioned a while back that you want to code some sort of zooming out that would let you see entities outside the sim region]
|
||||
[1:15:30][Q: An episode on metaprogramming, please?]
|
||||
[1:16:18][We're out of time]
|
||||
[/video]
|
|
@ -0,0 +1,72 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Moving Entities Up and Down Stairwells" vod_platform=youtube id=Hm_CTQwV13U annotator=Miblo annotator=schme]
|
||||
[1:31][Blackboard: Processing entities in pairs]
|
||||
[4:23][Blackboard: Using that table to process stairwell overlapping]
|
||||
[6:57][Blackboard: Travelling inside the stairwell]
|
||||
[9:07][Blackboard: Letting the stairwell take control]
|
||||
[10:38][Blackboard: Lava]
|
||||
[13:58][handmade_sim_region.cpp: Remove the WasOverlapping check]
|
||||
[15:12][Add HandleOverlap to MoveEntity]
|
||||
[17:59][Compile and double check that it's still working]
|
||||
[18:13][Write CanOverlap and HandleOverlap]
|
||||
[20:59][Consider reconceptualising the Ground]
|
||||
[24:12][Continue writing HandleOverlap]
|
||||
[25:23][Learn something new about the codebase][quote 32]
|
||||
[25:29][handmade.cpp: Draw the Stairwell as a rectangle]
|
||||
[26:48][Take a look at the stairwell and describe what we want to do]
|
||||
[27:28][Blackboard: Handling both ends of the stairwell]
|
||||
[28:48][Blackboard: The concept of mapping for any rectangle]
|
||||
[34:39]["This means nothing"][quote 33]
|
||||
[35:17][handmade_math.h: Introduce GetBarycentric]
|
||||
[36:42][Introduce SafeRatio functions]
|
||||
[39:03][Use GetBarycentric in HandleOverlap]
|
||||
[41:12][Blackboard: Lerp]
|
||||
[42:41][handmade_math.h: Introduce Lerp]
|
||||
[43:05][handmade_sim_region.cpp: Use Lerp in HandleOverlap]
|
||||
[43:56][Handle the stairwell collision in CanCollide]
|
||||
[44:21][Run the game and try walking through the stairwell]
|
||||
[44:50][Debugger: Step into HandleOverlap]
|
||||
[45:38][handmade_sim_region.cpp: Check for things overlapping themselves]
|
||||
[46:15][handmade.cpp and handmade_sim_region.h: Introduce EntityFlag_Moveable]
|
||||
[48:13][handmade_entity.h: Pluralise the Flag functions]
|
||||
[49:06][Debugger: Step into HandleOverlap]
|
||||
[49:45][We already need the clamp][quote 34]
|
||||
[50:05][Blackboard: How a guy can overlap the stairwell despite his point not being in it]
|
||||
[50:36][handmade_math.h: Introduce Clamp functions]
|
||||
[52:51][Debugger: Step into HandleOverlap and ensure that our barycentric coordinates are normalised]
|
||||
[53:48][Blackboard: Positioning our stairwell]
|
||||
[55:02][handmade.cpp: Do an offset of that ChunkPositionFromTilePosition, because he can][quote 35]
|
||||
[55:56][handmade_world.h: Make ChunkPositionFromTilePosition take AdditionalOffset]
|
||||
[56:27][Run the game and look for the stairwell]
|
||||
[56:52][handmade_sim_region.cpp: Gather entities by ChunkZ correctly]
|
||||
[58:14][Run the game and see two levels at the same time]
|
||||
[58:59][Debugger: Step into HandleOverlap and find that we're not hitting the test]
|
||||
[1:00:23][Debugger: Investigate why the inclusion test fails]
|
||||
[1:01:35][Blackboard: The perils of not having the concept of Ground]
|
||||
[1:03:12][handmade.cpp: Make the stairwells bigger for now]
|
||||
[1:03:58][Run the game and find we're lerping properly]
|
||||
[1:04:38][handmade_sim_region.cpp: Use our Ground value]
|
||||
[1:04:57][Run the game and find that we're getting closer]
|
||||
[1:06:40][handmade_sim_region.cpp: Additionally test the entities' Z planes to determine if they CanCollide]
|
||||
[1:07:07][Run the game and find that we're sort of getting there]
|
||||
[1:08:40][Q&A]
|
||||
[1:09:11][@duroate][Is the familiar going to be programmed to be able to go through the stairwell or instantly teleported to the floor?]
|
||||
[1:10:04][@jackkrozzer][When are we going to do priority for which sprite is in front and in the background? (I don't know what that is called)]
|
||||
[1:12:02][@duroate][You mentioned that you'll be able to attack from below / above. Will you be able to do that on the stairwell?]
|
||||
[1:12:59][@thisdyingsoul][I've just started to see your videos, but you already talked / programmed about entity systems. Will you use it here?]
|
||||
[1:14:00][@ps4tv][Does the scope of this application include moving environments, so you will need to introduce logic to detect movement of assets?]
|
||||
[1:14:50][@insofaras][Will the game have color grading for different areas, e.g. the blue & black cloak the hero wears might appear as two other colors in some lighting conditions?]
|
||||
[1:16:00][@ifingerbangedurcat][What are the piece groups and how are they used / useful for our current use in sprite rendering?]
|
||||
[1:17:15][@vashnare][Can you please, forgive my French, somehow un *** the net coding for DayZ Standalone and finish what Dean "Rocket" Hall gave up on?]
|
||||
[1:18:17][@jackkrozzer][Will enemies follow you upstairs or down? If they do, how will the space outside the camera work?]
|
||||
[1:18:44][@gaudongaming][How will you handle sprite animation? Are you using a library and have you ever hear of the Spine 2D skeleton animation framework?]
|
||||
[1:19:51][@jackkrozzer][Who is that guy?[ref
|
||||
site="Twitter"
|
||||
page="@Mike_Sart"
|
||||
url="https://twitter.com/Mike_Sart"]]
|
||||
[1:21:37][@jackkrozzer][I mean with there being different floors will it be different? I am assuming not]
|
||||
[1:22:48][@xghost7][Can you run this game so some of us see its current state?]
|
||||
[1:26:54][@jackkrozzer][Okay, so you know how we have the camera space and then there's a space outside that we can't see but entities are still moving? Will we need to edit that code to make it work on "Vertical" floors? It's okay if you don't get it. I may be thinking too far in]
|
||||
[1:28:02][@shadowrelic][Would we use a fixed, discrete animation for moving up and down stairs a la Link to the Past, or would the goal be to make movement seamless?]
|
||||
[1:29:04][@xghost7][How much lines of code do you have at the moment?]
|
||||
[1:29:55][That is the end]
|
||||
[/video]
|
|
@ -0,0 +1,59 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Conditional Movement Based on Step Heights" vod_platform=youtube id=bZxa4fdtI2Y annotator=Miblo annotator=schme]
|
||||
[3:58][Blackboard: Handling stairwell traversal]
|
||||
[7:45][Blackboard: Collision Detection in Z]
|
||||
[8:21][Blackboard: Draw reasonably]
|
||||
[8:35][Run the game to show the multiple visible floors]
|
||||
[11:07][handmade_sim_region.cpp: Prevent the entities from being accelerated by gravity while on the ground]
|
||||
[12:21][handmade_sim_region.h: Introduce EntityFlag_ZSupported]
|
||||
[13:00][handmade_sim_region.cpp: Use EntityFlag_ZSupported]
|
||||
[14:50][handmade.cpp: Take out the stairwell height padding]
|
||||
[15:44][handmade_sim_region.cpp: Add a BreakHere variable in MoveEntity]
|
||||
[16:05][Debugger: Step into this point in MoveEntity]
|
||||
[17:34][Debugger: Note that EntityFlag_ZSupported is only being set when we're under the Ground]
|
||||
[17:54][handmade_sim_region.cpp: Change that if statement to include the Ground]
|
||||
[18:19][Debugger: Step into that point in MoveEntity]
|
||||
[20:31][handmade.cpp: Give the stairwell some Z depth]
|
||||
[21:31][Run the game and jump through the layers and find that we do now collide with the stairwell]
|
||||
[22:28][handmade_sim_region.cpp: Specify another criteria to determine when we want to stay pegged to the ground]
|
||||
[24:05][handmade.cpp: Stop the Familiar from following us]
|
||||
[24:17][Walk up and down the stairs]
|
||||
[25:39][handmade.cpp: Make the stairwell a little longer]
|
||||
[28:03][Run the game and demonstrate teleporting to the top of the stairs]
|
||||
[28:32][Blackboard: Consider building the stairwells out of multiple things]
|
||||
[30:05][handmade_sim_region.cpp: Consider doing a speculative collide test on the stairs]
|
||||
[32:33][handmade_sim_region.cpp: Introduce TestWallNormal, TestHitEntity and SpeculativeCollide to do these speculative tests]
|
||||
[39:58][Debugger: Step into SpeculativeCollide and find that we are not hitting the stairwell]
|
||||
[41:12][handmade_sim_region.cpp: Flip the logic of SpeculativeCollide]
|
||||
[41:26][Run the game and find that the stairwell is behaving as expected expect for the fact that we're not gliding along it, and also that we are now not colliding with walls]
|
||||
[42:34][handmade_sim_region.cpp: Tweak the logic of SpeculativeCollide]
|
||||
[43:26][handmade_sim_region.cpp: Stop setting StopsOnCollision = false]
|
||||
[43:42][Run up and down the stairs and note how good it feels]
|
||||
[45:28][handmade.h: Attend to the TODO list]
|
||||
[46:53][handmade_sim_region.cpp: Add DefaultGroundLevel to sim_region]
|
||||
[47:56][handmade_sim_region.cpp: Compute the DefaultGroundLevel based on the information in BeginSim]
|
||||
[48:32][Blackboard: Specifying the ground levels in a given sim region]
|
||||
[50:29][handmade_sim_region.cpp: Rename DefaultGroundLevel to GroundZBase]
|
||||
[51:26][Blackboard: Snapping to the correct ground level]
|
||||
[53:47][handmade.h: TODO(casey) Need to make a solid concept of ground levels so the camera can be freely placed in Z and have multiple ground levels in one sim region]
|
||||
[54:33][Run the game and note that the Familiar and Monstar are erroneously getting snapped up to our Z level]
|
||||
[55:19][handmade.cpp: Tweak entities' positions based on their Z level]
|
||||
[58:33][Q&A]
|
||||
[59:18][@abnercoimbre][I'm guessing the engine will manage arbitrarily high ground levels? Would you really want that? Gameplay such as projecting attacks to a monstar below does sound fun]
|
||||
[1:00:48][@programgamer][Why not use the X and Y positions as they appear on the screen for detecting sim regions?]
|
||||
[1:01:18][@marco_castorina][Should you also check the "stair step" at the top of the top of the stairs? It seems you can exit earlier than at the bottom]
|
||||
[1:03:01][@jarsefax][Could you please do an overview, on blackboard maybe, of the "entities position system" (world, screen, etc.) now that it's "done"? I'm having trouble understanding it (hopefully you'll understand my question)]
|
||||
[1:06:39][@kknewkles][Why is the order of stuff drawn on the screen janky (some trees overlap others, some are proper)?]
|
||||
[1:06:46][@kknewkles][Isn't it easy to draw them in order - each layer draws entities left to right, top to bottom?]
|
||||
[1:08:09][@ikerms][Is the reason why things in different levels seem shifted up due to the Z-offset when rendering?]
|
||||
[1:09:15][@ikerms][Will this cause for the wall on the top to be drawn above the screen when the camera is locked instead of following the character?]
|
||||
[1:09:52][@acrmuui][When you are allocating everything with custom memory allocators, do you only use the stack for pointers?]
|
||||
[1:10:25][@programgamer][Are you not worried that three dimensions might complicate entity A.I. to the point where it impacts performance?]
|
||||
[1:11:21][@pjh777][Casey, can you check your forum registration process? I never got a confirmation email - registered a couple of days ago]
|
||||
[1:12:23][@rooctag][When will you switch back to centered camera? It seems to be missing on the TODO list]
|
||||
[1:12:44][@cvaucher][Any particular reason behind making the chunk origin the center of the chunk rather than one of the corners?]
|
||||
[1:13:47][@acrmuui][Sorry for being unclear. Do you store anything else than pointers on the stack?]
|
||||
[1:14:34][@programgamer][If the camera were far away enough from the player, would the player go into a simpler routine like the rest of the entities?]
|
||||
[1:14:56][@rooctag][Should the possible collision test use the TestHitEntity instead of the TestEntity or are they the same? Can you briefly go over the flow of the HitEntity changes?]
|
||||
[1:21:30][@rooctag][You could now cancel out the first HitThis == true and not do other checks]
|
||||
[1:23:06][We have agreed to go on break for a week]
|
||||
[/video]
|
|
@ -0,0 +1,53 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Entity Heights and Collision Detection" vod_platform=youtube id=0mGWYcE6yG8 annotator=dspecht annotator=Miblo]
|
||||
[2:34][Start everything up, make sure it's all still working and plan for the day]
|
||||
[6:21][handmade_sim_region.cpp: Consider confining collision detection to the entities' Z neighbourhood]
|
||||
[9:41][Blackboard: Extending Minkowsi collision into the third dimension]
|
||||
[11:49][handmade_sim_region.cpp: Check Rel.Z against the MinCorner and MaxCorner]
|
||||
[12:58][Run the game and find that we're passing through everything]
|
||||
[13:17][Debugger: Step in and inspect the MinCorner and MaxCorner]
|
||||
[14:59][handmade.cpp: Give the wall and other entities some height]
|
||||
[16:58][Run the game and find that we now stop correctly]
|
||||
[18:00][win32_handmade.cpp: Ensure that we're not passing WS_EX_LAYERED to CreateWindowExA]
|
||||
[19:45][Blackboard: Conceptualising TileSideInMeters]
|
||||
[24:09][Blackboard: Conceptualising WorldChunk]
|
||||
[28:27][handmade_world.cpp: Pass in TileDepthInMeters to InitializeWorld]
|
||||
[29:36][Blackboard: Competing Gathers]
|
||||
[32:29][handmade_world.cpp: Update ChunkPositionFromTilePosition to reflect our new Tile dimensions]
|
||||
[34:57][Postpone this until we have debug visualisations]
|
||||
[35:43][Run the game and double check that it's working properly]
|
||||
[36:18][handmade.cpp: Specify the height of things]
|
||||
[37:45][handmade_math.h: See what RectanglesIntersect does]
|
||||
[38:50][Blackboard: Inclusion tests]
|
||||
[42:04][Blackboard: Checking overlaps]
|
||||
[43:48][handmade_math.h: Change the tests in RectanglesIntersect]
|
||||
[44:55][Run the game and find that we are unexpectedly still working properly]
|
||||
[45:35][Investigate what's happening with the stairs]
|
||||
[46:59][Blackboard: Understanding entity placement]
|
||||
[48:55][handmade_sim_region.cpp: Take a look at where Dim is being used]
|
||||
[49:59][handmade.cpp: Introduce AddGroundedEntity]
|
||||
[53:00][Pass AddGroundedEntity to AddWall]
|
||||
[54:08][Run the game and double check that it worked]
|
||||
[54:37][handmade.cpp: Pass AddGroundedEntity to AddStair, AddPlayer, AddMonstar and AddFamiliar]
|
||||
[58:06][Run the game and see where we're at]
|
||||
[58:40][Debugger: Step into AddGroundedEntity]
|
||||
[59:27][handmade.cpp: Consider fixing the drawing code]
|
||||
[1:01:56][Q&A]
|
||||
[1:03:02][Q: That kid you just created is around two foot tall]
|
||||
[1:03:30][Q: Better data is at halls.md[ref
|
||||
site="Moose & Doc"
|
||||
page="Children's Growth Charts of height weight and body mass index for boys and girls"
|
||||
url="http://halls.md/growthchart-boys-girls-height-weight/"]]
|
||||
[1:04:03][Q: I was wondering, why do you have two windows open and not just one?]
|
||||
[1:04:53][Q: Over four feet seems right for a seven year old]
|
||||
[1:05:42][handmade.cpp: Make the Hero 1.2 metres tall]
|
||||
[1:06:32][Q: What apps are you using for the dev environment?]
|
||||
[1:07:55][Q: Any recommendations for tracking down heap corruption bugs?]
|
||||
[1:16:08][Q: If you're not allocating memory as the game goes, are you allocating a bunch at the start? How does that work?]
|
||||
[1:17:13][Q: What are the Linux equivalents to these functions?]
|
||||
[1:17:53][Q: How far along are we in developing the game?]
|
||||
[1:19:48][Q: munmap is another Linux equivalent call]
|
||||
[1:20:02][Q: Is this in C++?]
|
||||
[1:21:11][Q: Does C++ compiler generate hidden code like constructors, copy constructors, etc., in the way that you structuring the game?]
|
||||
[1:22:54][Q: Do you use the STL at all in your code?]
|
||||
[1:24:18][Call it]
|
||||
[/video]
|
|
@ -0,0 +1,61 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Entity Ground Points" vod_platform=youtube id=9IGZGfVvc0s annotator=dspecht annotator=Miblo]
|
||||
[2:00][Recap the bug from yesterday]
|
||||
[4:02][Blackboard: The discrepancy between the Entities' base points and the Ground position]
|
||||
[5:30][Look at how these concepts are currently specified]
|
||||
[7:06][handmade_sim_region.cpp: Add 0.5*Entity->Dim.Z to Ground]
|
||||
[7:31][Run the game and find that we're not quite right]
|
||||
[8:46][Debugger: Step into the code where Ground is calculated]
|
||||
[10:05][handmade.cpp: Look at the current drawing code]
|
||||
[15:14][Introduce EntityBaseP]
|
||||
[17:11][Run the game and find that we seem to have solved the problem]
|
||||
[18:11][handmade.cpp: Add two rectangles to the Stairwell]
|
||||
[20:00][Work on the ZFudge]
|
||||
[22:30][Check out the effects on the Familiar]
|
||||
[23:06][MetersToPixels is getting pre-multiplied by OffsetZ]
|
||||
[24:17][Run the game and see it looking more correct]
|
||||
[25:14][handmade.cpp: Don't bother adding OffsetZ]
|
||||
[25:54][Blackboard: What the ZFudge is doing]
|
||||
[28:11][handmade_sim_region.cpp: Look at SpeculativeCollide]
|
||||
[28:53][Introduce GetEntityGroundPoint]
|
||||
[30:18][Use GetEntityGroundPoint to set EntityBaseP and Ground]
|
||||
[31:29][Blackboard: Computing the Ground displacement]
|
||||
[32:41][Run the game and find we can now go upstairs]
|
||||
[33:09][handmade.cpp: Make stairways extend above the ground]
|
||||
[34:36][Blackboard: Understanding StepHeight]
|
||||
[36:58][handmade_sim_region.h: Add WalkableHeight to sim_entity]
|
||||
[38:01][handmade.cpp: Use that WalkableHeight in SpeculativeCollide]
|
||||
[38:37][Run the game and try the stairs]
|
||||
[39:19][handmade_entity.h: Introduce GetStairGround]
|
||||
[44:01][handmade_sim_region.cpp: Convert HandleOverlap and SpeculativeCollide to use GetStairGround]
|
||||
[46:55][Run the game and find that that fixed our problem]
|
||||
[47:28][handmade_sim_region.cpp: SpeculativeCollide needs to know whether we're coming on to or moving off a stairwell]
|
||||
[50:41][Q&A]
|
||||
[52:15][Q: Do you use Clang on Linux?]
|
||||
[52:48][Q: What is the best way to learn C++ from absolute scratch on my own?]
|
||||
[53:56][Q: Do you know anything about Voxpel programming?]
|
||||
[54:35][Q: What versioning and revision control system do you use?]
|
||||
[54:43][Q: Are you planning on replacing the stairs in your house with ramps?]
|
||||
[56:16][Q: How did you get the right side of your Visual Studio debug view to be split vertically?]
|
||||
[57:49][Q: Why do you use so many magic numbers in your code?]
|
||||
[58:08][Q: What do you think about friend classes?]
|
||||
[58:30][Q: Is this turning into reverse Doom? Almost complete 3D rendered in 2D, instead of 2D rendered in 3D]
|
||||
[1:00:30][Q: Is the top layer going to fade in if you go up the stairs into a closed room?]
|
||||
[1:01:01][Q: When do you plan on doing Z-sorting with the sprites?]
|
||||
[1:01:16][Q: Why do you use so many magic numbers in your code? Why so many #defines?]
|
||||
[1:02:13][Q: Are you planning to use advanced shader techniques? If so, which ones?]
|
||||
[1:02:40][Q: Looks like I skipped an episode in which you made a lower level visible from a higher one. Do you remember when did it happen? Is the floor going to remain transparent in the future?]
|
||||
[1:03:43][Q: My previous question was on topic. Missed it, maybe]
|
||||
[1:04:01][Q: Correct me if I'm wrong, but it seems early on we started with a bottom-centre position for collision detection on our hero. We moved to a centre position which was offset in both X and Y. Now it seems we use a centre X and Y and are continuing to compute the bottom-centre position. Do you feel this needs to be consolidated in any way?]
|
||||
[1:05:50][Q: What's with the floating head in the middle of the forest?]
|
||||
[1:06:14][Q: Could you explain the line ControlledHeroes\[ArrayCount(((game_input *)0)->Controllers)\]; in handmade.h because it looks like you're casting a null pointer and referencing]
|
||||
[1:08:50][Q: To workaround the Mischief zoom issue, how about you find the zoom level you want then draw four dots, one in each corner, then when you come back you can align those dots back to the corners]
|
||||
[1:09:10][@Pseudonym73][You could use C++'s decltype or typeof to find that ArrayCount]
|
||||
[1:11:11][@mmozeiko][Could you do it: ArrayCount(game_input::Controllers)?]
|
||||
[1:11:40][Q: declval is what you want]
|
||||
[1:13:24][Q: Why do you plan on using OpenGL or DirectX for hardware acceleration? Is that something that you have to have knowledge of actual GPU architecture to be able to implement?]
|
||||
[1:14:47][Q: What do you think of Khronos Vulkan?]
|
||||
[1:16:18][Q: What is the best way to build a game when you know how to program but you have no art skills? Hire an artist to do it for you? That is my Achilles' heel, but I want to make a game on my own[ref
|
||||
site="Mini Metro"
|
||||
url="http://dinopoloclub.com/minimetro/"]]
|
||||
[1:18:18][We have come to the end]
|
||||
[/video]
|
|
@ -0,0 +1,50 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Multiple Collision Volumes Per Entity" vod_platform=youtube id=o1DO5sjUhi0 annotator=Miblo annotator=dspecht]
|
||||
[1:37][Blackboard: Position != Collision "Mesh"]
|
||||
[9:13][handmade_sim_region.h: Introduce sim_entity_collision_volume]
|
||||
[10:54][Blackboard: Two ways of storing this collision volume data]
|
||||
[12:51][handmade_sim_region.h: Introduce sim_entity_collision_volume_group]
|
||||
[15:09][Compile and be guided by the compile errors in replacing the Dim]
|
||||
[15:43][handmade_sim_region.h: Add WalkableDim to sim_entity]
|
||||
[17:38][handmade_entity.h: Use WalkableDim in GetStairGround]
|
||||
[19:31][handmade_math.h: Introduce GetBarycentric for rectangle2]
|
||||
[20:18][handmade_math.h: Introduce Clamp01 for v2]
|
||||
[21:03][handmade_sim_region.h: Add sim_entity_collision_volume TotalVolume to sim_entity_collision_volume_group]
|
||||
[23:11][handmade_sim_region.cpp: Pass sim_entity_collision_volume to EntityOverlapsRectangle]
|
||||
[25:51][handmade_sim_region.h: Specify that the VolumeCount is always expected to be greater than 0 if the entity has any volume]
|
||||
[27:21][handmade_sim_region.cpp: Iterate over the Volumes]
|
||||
[28:04][Blackboard: Collision detection is an o(n^2) problem]
|
||||
[30:02][handmade_sim_region.cpp: Continue writing this loop]
|
||||
[33:58]["Don't ask me why I'm doing this renaming"][quote 38]
|
||||
[35:31][Casey is out of tea][quote 39]
|
||||
[35:41][Dream of gourmet tea][quote 40]
|
||||
[37:13][handmade.h: Add sim_entity_collision_volume_groups to game_state]
|
||||
[45:57][handmade.cpp: Use the WalkableDim to draw the Stairwell]
|
||||
[46:56][handmade.cpp: Implement MakeSimpleGroundedCollision]
|
||||
[51:10][handmade.cpp: Do InitializeWorld earlier]
|
||||
[51:35][Run the game and find that we're not totally busteD]
|
||||
[52:27][handmade.h: Flying things can now go over low walls]
|
||||
[53:07][handmade.cpp: Initialise the WalkableDim in AddStair]
|
||||
[54:38][handmade_math.h: Introduce ToRectangleXY]
|
||||
[55:53][Run the game and see that our stairwell is back]
|
||||
[56:18][handmade_sim_region.cpp: Reenable the stairwell collision]
|
||||
[57:23][Run the game and try jumping over the stairwell]
|
||||
[58:24][handmade.cpp: Implement MakeNullCollision]
|
||||
[59:50][Run the game and note the weird effect of gravity while falling down the stairwell]
|
||||
[1:01:04][handmade_sim_region.cpp: Set Drag.Z = 0.0f]
|
||||
[1:01:49][Run the game and fall down the stairwell]
|
||||
[1:02:08][Q&A]
|
||||
[1:02:38][Run and jump around]
|
||||
[1:03:36][@rsxole][Can we get a sneak preview of the fundamental types arena?]
|
||||
[1:03:43][Blackboard: Fundamental Types Arena]
|
||||
[1:05:03][@drive137][Besides the missed keys]
|
||||
[1:06:08][@lou_lo][What did I just watch?]
|
||||
[1:08:50][@morthim][Could you sketch what you did today visually? Was it just changing the collision paradigm?]
|
||||
[1:08:55][@ttbjm][Would the ground collision be easier / have less issues if it was a volume instead of a plane?]
|
||||
[1:09:47][Blackboard: Specifying the ground]
|
||||
[1:12:48][@crayoz][Since you are handling Z, how complicated is it to have entity stacking, with the current code state?]
|
||||
[1:13:26][@warptrosse][Are you using a memory manager?]
|
||||
[1:13:31][@blah238][How are you laying out your levels currently and are you going to make a level editor?]
|
||||
[1:14:20][@childphotography][Is knowing Big O notation important in the game programming industry?]
|
||||
[1:15:08][@starchypancakes][You mentioned further ways of partitioning collisions past breaking it up into regions. What would some of those be?]
|
||||
[1:15:56][End that for today]
|
||||
[/video]
|
|
@ -0,0 +1,63 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Defining the Ground" vod_platform=youtube id=HMW1fsXzW-o annotator=Miblo annotator=dspecht annotator=Kelimion]
|
||||
[3:56][handmade.h: Check the TODO list]
|
||||
[4:51][Blackboard: The Ground]
|
||||
[5:45][Blackboard: Quake vs. Unreal]
|
||||
[9:01][Blackboard: Quake's "Constructive Solid Geometry" Paradigm]
|
||||
[10:39][Blackboard: Unreal's "Constructive Solid Geometry" Paradigm]
|
||||
[12:21][Blackboard: The difference between these two models]
|
||||
[14:25][Blackboard: Robustness vs. Efficiency]
|
||||
[16:55][Blackboard: Propose not talking about "Ground" or "Floors", but "Rooms"]
|
||||
[31:46][Blackboard: What happens when you step off a ledge?]
|
||||
[35:16][handmade_sim_region.h: Add EntityType_Space entity_type]
|
||||
[36:17][handmade.cpp: Implement the ability to create an EntityType_Space]
|
||||
[40:41][handmade.cpp: Introduce AddSpace]
|
||||
[47:04][handmade.cpp: Rename AddSpace to AddStandardRoom and add EntityFlag_Traversable]
|
||||
[50:49][Blackboard: No overlap between adjacent rooms]
|
||||
[51:40][Run the game and see some giant rectangleS]
|
||||
[52:23][handmade.cpp: Turn off AddStandardRoom]
|
||||
[53:15][handmade.cpp: Correct the sim_entity_flags settings]
|
||||
[54:02][handmade_sim_region.cpp: Check EntityFlag_Collides in CanCollide]
|
||||
[54:42][Run the game and find that we now correctly don't collide with the StandardRooms]
|
||||
[54:50][handmade.cpp: Introduce PushRectOutline]
|
||||
[56:37][Blackboard: Drawing out the PushRectOutline]
|
||||
[57:38][handmade.cpp: Continue writing PushRectOutline]
|
||||
[59:13][Run the game and find that we cannot see the outline]
|
||||
[59:26][handmade.cpp: Increase the thickness of PushRectOutline]
|
||||
[59:50][Run the game and find that we're only drawing one line]
|
||||
[1:00:07][Debugger: Step into PushRectOutline]
|
||||
[1:02:10][handmade.cpp: Multiply the Dim by half]
|
||||
[1:02:59][Run the game and see our correctly drawing outline]
|
||||
[1:03:45][Q&A]
|
||||
[1:05:07][@nigna][What setup do you use for debugging on Linux?]
|
||||
[1:07:01][@t3amkill3r][Can you upload the videos somewhere else? YouTube is blocked in China. I would like to watch from the beginning]
|
||||
[1:07:44][@l4t33d][When doing the vertical movement, would it be reasonable to take two measurements: one at current position, then one at "final moved" position, and average the movement?]
|
||||
[1:08:27][@ishytarus][Are walls going to be entities, or just byproducts of the subtracting of the room volume?]
|
||||
[1:09:00][@zuurr_][LLDB works better than GDB, if you can deal with the command line interface]
|
||||
[1:09:40][@djohnstone8][Should you have been able to jump up to a level above the player now that you have a .9 value for the Space Z volume?]
|
||||
[1:10:24][@zamar037][Will the entities not at the player's Z level always be at the same alpha transparency or will they be slightly less visible to show that they are on a different Z level?]
|
||||
[1:11:54][@rexterrawtf][Why should anyone trust you to annotate a game when you have no published success preparing a full-fledged commercial game?]
|
||||
[1:12:48][@h_y_p_e_r][If you were a software programmer, how many apps could you have done in the same amount of time you have put into this?]
|
||||
[1:13:51][@blah238][Will there be water, and how would it affect movement?]
|
||||
[1:14:46][Reminder: Water that you can swim in, maybe with currents too?]
|
||||
[1:15:16][@quikligames][Does the system used for the ground now make it harder to have things like moving platforms the player can stand on?]
|
||||
[1:15:30][Reminder: Moving platforms the player can stand on]
|
||||
[1:15:55][@hdudley][Was the use of calculus involved in your programming?[ref
|
||||
site="Handmade Hero Episode Guide"
|
||||
page="Handmade Hero Day 043 - The Equations of Motion"
|
||||
url="https://hero.handmade.network/episode/code/day043"]]
|
||||
[1:16:42][@brblackmer][For this scheme, will the room geometries need to overlap in order to move between rooms, or can they just abut?]
|
||||
[1:17:24][@stiegosaurus][Can you illustrate how they do the level editors / world layouts in modern engines now?]
|
||||
[1:19:08][@dkilmer][Are you going to use files to store levels? If so, will they be custom format?]
|
||||
[1:19:33][@h_y_p_e_r][Would the combat algorithm in a 2D game differ from a 3D game?]
|
||||
[1:20:05][@poohshoes][How can I work with other programmers when our coding styles clash?]
|
||||
[1:21:06][@rpdublee][Should there be walls around stairwells now, or will we still just use the collision rules from before?]
|
||||
[1:21:29][@zenatsu][Are you going to procedurally build levels, or pre-defined levels?]
|
||||
[1:21:43][@marksands][Will wee see stuff like light sources, ray tracing, surface mapping, etc. at some point in this stream?]
|
||||
[1:22:21][@nigna][Have we started doing collision detection and handling? If no, how detailed will it have to be?]
|
||||
[1:22:46][@dkilmer][What do you think about storing game data in code?]
|
||||
[1:23:59][@protongaming][So you will continue complaining about Windows while making money programming with it and Visual Studio?]
|
||||
[1:30:30][@panic00][Can you rename the stream to Casey's Little Kindergarten?]
|
||||
[1:30:58][@protongaming][One day you said you lost hope in Microsoft, and now you say you complain so they can fix it?]
|
||||
[1:33:58][@dasmehdi][Was git an example, or do you feel there are problems with it? Curious to hear]
|
||||
[1:35:42][Call it there]
|
||||
[/video]
|
|
@ -0,0 +1,41 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Handling Traversables in the Collision Loop" vod_platform=youtube id=QxxVwnE8V1c annotator=Miblo annotator=dspecht]
|
||||
[4:29][Blackboard: Augmenting the collision loop to loop over two types of t value]
|
||||
[5:10][handmade_sim_region.cpp: Introduce tMax]
|
||||
[5:58][handmade_sim_region.cpp: Consider how best to modify this routine]
|
||||
[11:03][handmade_sim_region.cpp: Loop over the Walls to get all of the data taken by TestWall]
|
||||
[15:15][handmade_sim_region.cpp: Introduce test_wall]
|
||||
[15:56][Run the game and make sure it's still working]
|
||||
[16:14][handmade_sim_region.cpp: Embed TestWall directly in the collision loop]
|
||||
[17:45][Run the game and test the collision]
|
||||
[18:52][handmade_sim_region.cpp: Test tMax]
|
||||
[22:03][handmade_sim_region.cpp: Massage the routine]
|
||||
[24:27][handmade_sim_region.cpp: Implement the tMin vs. tMax logic]
|
||||
[26:27][handmade_sim_region.cpp: Write the tests for Overlap and EntityFlag_Traversable]
|
||||
[28:09][Encourage us not to be scared of solving complex problems]
|
||||
[32:49][handmade_sim_region.cpp: Improve the overlap test]
|
||||
[35:57][handmade_sim_region.cpp: Introduce EntitiesOverlap for this overlap test]
|
||||
[38:42][handmade_sim_region.cpp: Make EntitiesOverlap take an Epsilon enlargement region]
|
||||
[40:06][handmade_sim_region.cpp: Reenable the EntityFlag_Traversable test and use EntitiesOverlap]
|
||||
[41:52][Run the game and find that we can't get past our tMax]
|
||||
[42:27][handmade_sim_region.cpp: Move tMin, tMax and HitThis inside the loop]
|
||||
[44:03][handmade_sim_region.cpp: Rethink the logic of the collision routine]
|
||||
[46:25][Run the game and find that we're working a little more properly]
|
||||
[46:44][handmade.cpp: Only create walls in the first room in order to test the new world definition]
|
||||
[47:07][Run the game and test the collision detection]
|
||||
[50:04][handmade_sim_region.cpp: Increase the size of the overlap Epsilon]
|
||||
[51:55][Debugger: Step into the collision routine]
|
||||
[54:03][handmade_sim_region.cpp: Initialise tMaxTest to our current tMax]
|
||||
[54:34][Run the game and find that everything seems pretty good, but still a little janky]
|
||||
[54:55][Set the stage for next week]
|
||||
[55:33][Q&A]
|
||||
[55:43][Consult the TODO list]
|
||||
[58:14][@a_pulsing_mage][Can you explain the LengthOf(array) macro, and the sizeof pointers?]
|
||||
[1:06:19][@ttbjm][Will the space entities be used for the collision optimization you were talking about in an earlier stream? o(n^2) stuff]
|
||||
[1:07:18][@insofaras][sizeof(game_input::Controllers) works for me with g++]
|
||||
[1:08:09][@kknewkles][I noticed that you tend to mostly skip over questions past the first question mark. Is it because you just parse that way or the rest tends to be not much interesting?]
|
||||
[1:09:03][@garlandobloom][For things like the projectiles, are we going to extend their bounding boxes in the Z axis so they will always hit enemies that are below them? Or are we going to handle that in screen space somehow?]
|
||||
[1:10:04][@dmitsuki][Do you dislike templates?]
|
||||
[1:11:17][@samfosteriam][How will you handle something like an explosion that affects all things in an area? Then it's not 1 entity colliding with another]
|
||||
[1:12:09][@flynnspixel][What do you think about the new Vulkan API?]
|
||||
[1:13:15][Wrap things up]
|
||||
[/video]
|
|
@ -0,0 +1,38 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Creating Ground with Overlapping Bitmaps" vod_platform=youtube id=EGOrMZwQVEk annotator=Miblo]
|
||||
[0:19][A regrettable incident...]
|
||||
[6:07][Maybe we should try to add some sort of drawing to the ground]
|
||||
[7:13][Viewing the art assets in GIMP]
|
||||
[11:12][Casey's vision for the art]
|
||||
[15:10][Load ground textures]
|
||||
[17:32][Introduce DrawTestGround to composite the textures]
|
||||
[21:16][Viewing the results in-game]
|
||||
[21:45][Randomly splat down a ton of grass textures]
|
||||
[23:16][Looking at RandomNumberTable]
|
||||
[24:42][Figure out the maximum value of RandomNumberTable]
|
||||
[26:41][...and the minimum value]
|
||||
[28:11][Produce a floating point number between 0 - 1 within the range of RandomNumberTable]
|
||||
[29:44][Blackboard: Transforming a number from being between 0 - 1 to between -1 - 1]
|
||||
[34:05][Blackboard: What happens in between two points?]
|
||||
[37:26][Blackboard: Degrees of polynomial]
|
||||
[45:29][Implement the equation f(x)=2x-1 and splat multiple grass textures]
|
||||
[47:43][Account for the centre of the bitmap]
|
||||
[49:18][Set the radius by which to offset the splats]
|
||||
[51:05][Provide a function to make a v2 out of integers]
|
||||
[53:17][Parameterise loaded_bitmap]
|
||||
[58:10][Restart the game]
|
||||
[58:30][Tuft it up][quote 42]
|
||||
[59:36][Q&A]
|
||||
[1:00:29][On the fancy autoload dll stuff]
|
||||
[1:01:52][Q: Is there an art team working on this game?]
|
||||
[1:02:41][@mmozeiko][Max random number should be set to fixed number 100000\[...\] because in episode 35 when you went to random.org you chose to generate random numbers from 0 up to that number]
|
||||
[1:03:51][@pseudonym73][Obviously that wasn't a serious comment. But on-topic question: Do you want to mention tangents when designing curves?]
|
||||
[1:04:40][@panic00][Would you ever actually use a higher degree polynomial interpolation? Aren't there better ways to make interpolating curves that are more stable?]
|
||||
[1:13:53][Q: What sort of optimisation would you do on that ground stamping?]
|
||||
[1:16:16][Q: You aren't treating both ends of the random numbers the same. With the current system you can get 1 but you will never get 0 because you are not considering the min...]
|
||||
[1:18:29][Q: Do you plan on having things like dirt paths and, if so, would you draw them using splats and stamps?]
|
||||
[1:20:08][Q: So your ground texture design is essentially MegaTexture?]
|
||||
[1:21:09][Q: Based on the stream, it appears that you need to know math to do this type of activity. Is that correct?]
|
||||
[1:22:13][Blackboard: Casey's Plan vs. MegaTexture]
|
||||
[1:32:47][Q: Why do you think John Carmack is a hack and when are you going to say it to his face?]
|
||||
[1:36:06][Conclusion]
|
||||
[/video]
|
|
@ -0,0 +1,50 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Caching Composited Bitmaps" vod_platform=youtube id=09bUpNbRzzc annotator=Miblo]
|
||||
[0:41][Let's take a look at where things were]
|
||||
[2:12][Toggle off the debug boundaries]
|
||||
[2:49][Two things to look at: 1) Speeding up the texture splats and 2) Multiple layers]
|
||||
[4:16][How to make the random number generation more systemic]
|
||||
[10:17][Introduce random_series which takes a seed]
|
||||
[13:03][RandomUnilateral (0 - 1) and RandomBilateral (-1 - 1)]
|
||||
[14:35][Blackboard: Brief recap of yesterday's maths class]
|
||||
[15:18][Introduce RandomBetween]
|
||||
[16:38][Pass RandomChoice to the Stamp picker]
|
||||
[17:17][Make Seed function]
|
||||
[18:23][Implement the rest of the random number generation]
|
||||
[22:25][(Re)introduce Lerp]
|
||||
[24:48][Blackboard: Lerp or Linear blend]
|
||||
[26:48][Stick it in handmade_math.h and use it?]
|
||||
[27:53][Finish propagating RandomChoice]
|
||||
[31:17][Make a RandomBetween for use in integer space]
|
||||
[33:45][Find the Familiar]
|
||||
[36:34][Fix the FamiliarOffset range]
|
||||
[39:26][We've taken care of everything regarding the random number table]
|
||||
[40:08][Next: Try doing a pre-composite]
|
||||
[41:09][Look at how game_offscreen_buffer used to work]
|
||||
[41:54][Condense game_offscreen_buffer and loaded_bitmap down to one thing]
|
||||
[45:47][Set the Pitch and Pixel pointer from the Bitmap]
|
||||
[48:37][A small correction, and viewing the results]
|
||||
[49:12][Change DrawBitmap to take loaded_bitmap *Buffer, and change *Pixels to *Memory in loaded_bitmap]
|
||||
[50:02][Remove BytesPerPixel from game_offscreen_buffer]
|
||||
[51:10][Make everything take the data from loaded_bitmap]
|
||||
[52:53][Implement a GroundBuffer cache]
|
||||
[56:00][Implement MakeEmptyBitmap]
|
||||
[1:00:22][Set the alpha channel of the composited bitmap]
|
||||
[1:04:45][Recap today's work]
|
||||
[1:06:14][Q&A]
|
||||
[1:07:02][Q: Casey, I missed the earlier part of the feed, but what was the intention of moving the ground plane with the player?]
|
||||
[1:07:37][Q: Why aren't RandomUnilateral and RandomBilateral not just using the implementation of RandomBetween? Seems like a pretty clear violation of DRY, although I realise you aren't currently intending for this code to be extremely clean right now]
|
||||
[1:11:19][Someone wants a cloc count]
|
||||
[1:12:11][Q: Why does the Seed function not have a prefix or suffix Random?]
|
||||
[1:13:54][Q: Is it okay that RandomChoice doesn't select the random value uniformly? \[...\]]
|
||||
[1:15:22][Q: Wouldn't RandomChoice have a slightly uneven distribution if the number of choices didn't evenly divide the maximum random number?]
|
||||
[1:17:19][Q: When is it okay to pass larger objects like r3's by value instead of by reference?]
|
||||
[1:22:01][Q: Casey, just curious because the background tiles are static at the moment...]
|
||||
[1:22:28][Q: Do you see yourself extending RandomNumber to have anything other than a uniform distribution?]
|
||||
[1:23:22][Q: Is this strictly handled in RAM? Do you have plans to use GPU resources for rendering?]
|
||||
[1:24:06][Q: I notice in functions you will always use a Result variable even if the calculation is a one-liner, rather than using the expression directly in a return statement. Does this incur an extra copy and are there performance implications?]
|
||||
[1:25:06][Q: Do you plan to move all the other loaded_bitmap memory to be in a memory_arena as well?]
|
||||
[1:25:37][Q: I think you've used an aggregate initialiser in one place with random_series being seeded, i.e. you only have one call to RandomSeed but you have at least...]
|
||||
[1:26:53][Q: Initially, you put BytesPerPixel into the bitmap structure because it can be useful. Then I asked you to remove it because it never changes, and you did that. But ten or so episodes later you added it back because it would be useful. And now you're removing it again. This is funny]
|
||||
[1:27:45][Q: You fix Random to be uniform by generating a full 32bit random number, do mod next power of 2 choice count, then check if result is less than choice count. If not, repeat the whole process]
|
||||
[1:28:18][The end of another full-power episode of Handmade Hero, which was dedicated to Abner Coimbre]
|
||||
[/video]
|
|
@ -0,0 +1,39 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Premultiplied Alpha" vod_platform=youtube id=bidrZj1YosA annotator=Miblo]
|
||||
[1:44][Recap yesterday's work]
|
||||
[4:20][Investigate peripheral problem]
|
||||
[6:01][Blackboard: Alpha channel in the intermediate buffer]
|
||||
[10:08][Blackboard: Considerations for handling alpha]
|
||||
[16:30][The allergy of computing][quote 44]
|
||||
[17:08][Blackboard: Alpha blend our edges]
|
||||
[23:05][Fuss with alpha]
|
||||
[24:09][Call DrawTestGround every frame]
|
||||
[25:25][Play with DrawBitmap]
|
||||
[26:47][Introduce real32 RSA in order to keep SA and DA in the same space]
|
||||
[29:23][Does that produce the result we expect?]
|
||||
[30:18][What GIMP thinks is a reasonable thing to have occur]
|
||||
[31:58][Play with the alpha channel of Stone]
|
||||
[35:51][Blackboard: What's happening with the colours?]
|
||||
[40:47][Blackboard: Pre-multiplied alpha]
|
||||
[55:54][Pre-multiply alpha]
|
||||
[58:08][Grab out each individual channel]
|
||||
[1:00:51][Do that pre-multiplication]
|
||||
[1:04:18][Blackboard: Brief recap]
|
||||
[1:06:07][Blackboard: Do the pre-multiplied alpha examples in algebra]
|
||||
[1:11:39][Blackboard: Have something in that screen to begin with]
|
||||
[1:16:21][Blackboard: Group the terms]
|
||||
[1:22:13][Blackboard: The equation for the pre-multiplied alpha]
|
||||
[1:24:05][Implement the equation]
|
||||
[1:25:37][Re-enable DrawTestGround]
|
||||
[1:27:04][Put CAlpha back in]
|
||||
[1:30:13][Check the equation]
|
||||
[1:32:37][Q&A]
|
||||
[1:33:18][Q: According to \[a website\], to fix the Wacom driver without restarting, stop and start Wacom Professional Tablet Service]
|
||||
[1:35:00][Q: Being Happy, Sleepy and Sneezy, you do realise you're just four dwarves short of a whole crew?]
|
||||
[1:36:07][@mr4thdimention][So if I understand correctly (sorry if my interpretation just confuses anyone), the reason off-screen rendering was incorrect before pre-multiplied alpha was that, after blending, things in the texture - the colours there - were pre-multiplied because they were multiplied when they were put in the texture. If, for some reason, you didn't want to optimise your code, you could also divide the colour channel by the alpha to get it back to un-pre-multiplied. Is this a reasonable understanding of the issue?]
|
||||
[1:42:55][Q: Can you give a small example of what the decompression step between SimEntity and StoredEntity will look like?]
|
||||
[1:43:24][@@drive137][Q: Maybe we should set a way for you to see things like that kind of help, if someone finds a good possible solution. No, I don't know how]
|
||||
[1:43:55][Blackboard: A lot of equationing]
|
||||
[1:44:43][Wrap up the stream with a brief recap...]
|
||||
[1:46:14][...a peek into the future...]
|
||||
[1:49:29][...and closing remarks]
|
||||
[/video]
|
|
@ -0,0 +1,38 @@
|
|||
[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Scrolling Ground Buffer" vod_platform=youtube id=U5AAAaiMlYQ annotator=dspecht annotator=Miblo]
|
||||
[1:36][Damage Assessment]
|
||||
[2:37][We are trying to figure out how to finish off our world construction]
|
||||
[4:23][Think about how to handle the ground]
|
||||
[5:23][Look at how we're currently specifying the ground]
|
||||
[6:49][Blackboard: Our system for defining the ground]
|
||||
[10:36][Blackboard: A potential plan and guiding principals of engine architecture design]
|
||||
[12:51][Blackboard: How to store the splat list]
|
||||
[14:40][Blackboard: Figuring out the shape of the ground]
|
||||
[17:24][Blackboard: Considering multiple Z-levels / depth]
|
||||
[25:20][Blackboard: Empty space things will carve out regions like that]
|
||||
[27:19][Blackboard: What are the splats for the region?]
|
||||
[28:49][Try to make the ground plane scroll infinitely in all directions]
|
||||
[29:39][Enlarge GroundBuffer, introducing MaximumZScale and GroundOverscan variables]
|
||||
[35:25][Partition the GroundBuffer so that we can scroll it around]
|
||||
[36:04][Blackboard: How the GroundBuffer is currently positioned]
|
||||
[38:01][Locate GroundBufferP relative to CameraP]
|
||||
[43:11][Plan to snap the GroundBuffer towards the camera's direction whenever it runs out of pixel coverage]
|
||||
[43:33][Turn off the trees]
|
||||
[44:48][Turn off Z doors]
|
||||
[45:32][Turn on the trees]
|
||||
[46:00][Make the ground constantly generate itself]
|
||||
[47:08][Blackboard: Tiling considerations]
|
||||
[48:38][Turn DrawTestGround into DrawGroundChunk]
|
||||
[54:28][View the results in-game]
|
||||
[55:08][Q&A]
|
||||
[55:58][Q: Why don't we fill the entire game window instead of having all that black space?]
|
||||
[58:29][Q: Are some of these issues with dealing with display on multiple levels stemming from the lack of a Z-coordinate for the camera to just do a lerp on?]
|
||||
[1:01:03][Q: If no one's asking related questions, could you ballpark a time-frame when adding a font and text rendering system will become useful or necessary?]
|
||||
[1:03:02][On learning C++]
|
||||
[1:05:10][Q: You mentioned offloading ground drawing to a separate thread to prevent hitches. Is it possible to offload the drawing work over multiple frames, and would there be any benefits over either method?]
|
||||
[1:06:30][Q: How much of a memory footprint is your game using already? Certainly it won't be large, but I'm more meaning how many different containers are there?]
|
||||
[1:06:53][Q: Procedural generation of 2D graphics: is there some mainstream math for that?]
|
||||
[1:07:38][Q: What is your programming experience as before Handmade Hero?]
|
||||
[1:08:42][Q: How many different classes are you having to use already?]
|
||||
[1:10:30][Q: Is there a simple way to explain pointers and references in C++?]
|
||||
[1:16:30][Closing remarks]
|
||||
[/video]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue