Handmade Network»Forums
1 posts
29 year old game programmer from Oklahoma! Dreams of making awesome educational games.
Feedback on creating HH study questions
I'd like to give back to the community so I've decided to create study questions for each Handmade Hero episode, or at least the ones I've watched. I'm focusing on creating questions that will help people grasp both specific programming methods and more general design ideas. Here's some example questions:

Q: For files that save player data such as unlocks and progress, why shouldn’t you overwrite the current saved data file? What is a better alternative.
A: (explained at 1:00:40, further explained at 1:16:00): If the write fails for some reason, the data file could be corrupted and the player would lose all their saved data. A better strategy is to have a two file system, where the non-current file is overwritten. Another strategy is to have a temp file, write to the temp file, and then, if the write succeeds rename the temp file to overwrite the file.

Q. In the following line, what happens to the real32 value when casted to a DWORD:
DWORD SleepMS = (DWORD)(1000.0f * (TargetSecondsPerFrame -
A: Since DWORD is a unsigned 32 bit integer, it truncates the decimal value of the real32 floating point.

Q: Write a #define function that returns the amount of elements in an array

A: #define ArrayCount(Array) (sizeof(Array) / sizeof((Array)[0]))

I'd like any feedback on my general direction, whether it's a waste of time and or bad idea (considering I'm answering the questions), or any other feedback. Is there a good place to post the questions I've made so far?
Thanks a lot,
Dane Christenson
6 posts
Working as a carpenter while I learn, taking night courses for the paper, known on twitch and irc as supershocker75
Feedback on creating HH study questions
sounds like it could be a good idea to help solidify concepts. I like the idea of having the annotations with the question so we can refer to it in context. I am wondering what medium you are thinking about using as I feel like that would, in part, make or break the usefulness of something like that. It also seems like a massive undertaking. I would definitely check them out were you to create them tho.