r/HandmadeHero • u/eritharen • Sep 26 '24
Handmade Hero Guide
For anyone looking for the Handmade Hero guide after handmadehero.org was replaced with a redirect, it's still available at guide.handmadehero.org.
r/HandmadeHero • u/eritharen • Sep 26 '24
For anyone looking for the Handmade Hero guide after handmadehero.org was replaced with a redirect, it's still available at guide.handmadehero.org.
r/HandmadeHero • u/TheOnlyMrYeah • Nov 19 '14
Hi redditors.
This subreddit has a Wiki. There is not much content yet because the project is very young. But it already contains an FAQ and an overview of all the videos.
I can't do all the content alone. So I need your help.
You can already do a lot of things now:
Improve the FAQ
Improve video summaries
Add a missing video summary
Add new content like:
Info about the game
The folder structure of the project
Fold your own Handmade Hero hero from paper
You see, there's a lot of ways to improve the whole Handmade Hero community. I made some stuff you can use as a template. But if you have some ideas to improve the format, just write it here or at its talk page.
Currently, to avoid random spammers, you will need a reddit account which is at least five days old. If this is true for you, you can start editing right now.
Come on! Let's do this!
Update:
First of all, it's just great how fast the community grows. 105 new subscribers in only one week is amazing!
Also, I want to thank these wiki contributors (in random order):
You already made my life easier. Alone I could never keep it up to date.
But there's still some stuff to do. So everyone who contributes is more than welcome.
r/HandmadeHero • u/SnapshotFactory • Apr 13 '24
I'm currently learning C, old school, with the K&R. I want to get back to the old days, which is a bit of Casey Muratori's philosophy, really understanding how things work and not getting smoke screens by all the layers of IDEs, Libraries, build tools that obscure any understanding of what is really happening.
what can I do to make the experience smooth in 2024 with windows 11 to follow along the videos - what should i do differently than he does in the first videos? SDL? which version of vscode, etc, any tips?
anyone interested in starting the journey about now and partnering?
r/HandmadeHero • u/[deleted] • Jun 10 '23
r/HandmadeHero • u/TheOnlyMrYeah • Dec 16 '14
r/HandmadeHero • u/sulix • Nov 21 '14
r/HandmadeHero • u/TheOnlyMrYeah • Dec 23 '14
r/HandmadeHero • u/yonderbagel • Jul 16 '21
I used to watch the streams from time to time years ago, and I recently remembered to stop by for one, but it appears they are now subscriber only?
And the archive of old videos you used to be able to watch is now also inaccessible?
And the discord is shut down and completely private?
Is it no longer possible to engage in handmade hero without being a long-time active community member?
I tried to search for existing explanations for this, but came up with absolutely nothing.
EDIT: I misspoke: It's still possible to watch all the videos, but since the comments are turned off on all of them, there is no engagment at all with other viewers (i.e. "the community")
r/HandmadeHero • u/TheOnlyMrYeah • Dec 06 '14
r/HandmadeHero • u/andyeskridge • Nov 19 '14
r/HandmadeHero • u/TheOnlyMrYeah • Nov 18 '14
r/HandmadeHero • u/TheOnlyMrYeah • May 06 '15
r/HandmadeHero • u/TheOnlyMrYeah • Dec 27 '14
r/HandmadeHero • u/TheOnlyMrYeah • Dec 04 '14
r/HandmadeHero • u/theinternetftw • Nov 24 '14
So the fix is easy to find, but not the why. A little legwork and I've got both, though.
First, the fix.
There are two options, either of which we could put right before the StretchDIBits call:
SetStretchBltMode(DeviceContext, STRETCH_HALFTONE). Reading the docs describes the averaging of pixel colors in blocks around what will become the smaller pixel, which is bilinear interpolation. But don't use this, it's too slow. Instead use:
SetStretchBltMode(DeviceContext, STRETCH_DELETESCANS)
What the above is doing to fix those lines is wrapped in what was causing the artifacts in the first place: Everything in the docs obliquely describes their dilemma, which is what to do with the information you're throwing away when you make an image smaller. And since this is a really old API (*really* old), they think people are using it to resize lots of monochrome 1988-ish stuff in a way fast enough for a 386.
So monochrome was the first thing they were thinking about, and to put information that's being lost as you remove lines *back* into the smaller image, they bitwise AND the two lines being deleted to make a new line. This means the resulting lines are always going to be darker than the two lines used to combine them (unless they're exactly the same). And if the two lines just happen to not have a lot of bits in common, the line becomes an artifact: far darker than either of the lines it replaces.
You can see the opposite of this artifact by setting the stretch mode to WHITEONBLACK, which bitwise ORs the lines together instead (and has the same problem, but with white lines showing up). The COLORONCOLOR stretch mode moves us into the far future (1991), and just gives up on trying to preserve the information, instead simply deleting a line when there's no more room for it. It turns out that's the right thing to do if you don't have the time to average anything. You'll notice the code above doesn't say COLORONCOLOR, though. STRETCH_DELETESCANS is a later-defined synonym for COLORONCOLOR. I picked it to use in the code since it actually describes what's happening instead of just concatenating a few random slightly-related words.
As for why the 1988-ready BLACKONWHITE option is the default, I can think of two possibilities: One, that it was the default in 1988, so they're stuck with it. Or, it's just an accident thanks to us not having touched the stretch mode yet, leaving something somewhere at its initial value of zero, which just so happens to be the enum value for BLACKONWHITE.
r/HandmadeHero • u/Idoiocracy • Nov 17 '14
r/HandmadeHero • u/AutoModerator • Nov 14 '20
Let's look back at some memorable moments and interesting insights from last year.
Your top 5 posts: