is presently its sole maintainer,
You can support him:
Let's take a look at where things were
Toggle off the debug boundaries
Two things to look at: 1) Speeding up the texture splats and 2) Multiple layers
How to make the random number generation more systemic
Introduce random_series which takes a seed
RandomUnilateral (0 - 1) and RandomBilateral (-1 - 1)
Blackboard: Brief recap of yesterday's maths class
Pass RandomChoice to the Stamp picker
Make Seed function
Implement the rest of the random number generation
Blackboard: Lerp or Linear blend
Stick it in handmade_math.h and use it?
Finish propagating RandomChoice
Make a RandomBetween for use in integer space
Find the Familiar
Fix the FamiliarOffset range
We've taken care of everything regarding the random number table
Next: Try doing a pre-composite
Look at how game_offscreen_buffer used to work
Condense game_offscreen_buffer and loaded_bitmap down to one thing
Set the Pitch and Pixel pointer from the Bitmap
A small correction, and viewing the results
Change DrawBitmap to take loaded_bitmap *Buffer, and change *Pixels to *Memory in loaded_bitmap
Remove BytesPerPixel from game_offscreen_buffer
Make everything take the data from loaded_bitmap
Implement a GroundBuffer cache
Set the alpha channel of the composited bitmap
Recap today's work
Q: Casey, I missed the earlier part of the feed, but what was the intention of moving the ground plane with the player?
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
Someone wants a cloc count
Q: Why does the Seed function not have a prefix or suffix Random?
Q: Is it okay that RandomChoice doesn't select the random value uniformly? [...]
Q: Wouldn't RandomChoice have a slightly uneven distribution if the number of choices didn't evenly divide the maximum random number?
Q: When is it okay to pass larger objects like r3's by value instead of by reference?
Q: Casey, just curious because the background tiles are static at the moment...
Q: Do you see yourself extending RandomNumber to have anything other than a uniform distribution?
Q: Is this strictly handled in RAM? Do you have plans to use GPU resources for rendering?
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?
Q: Do you plan to move all the other loaded_bitmap memory to be in a memory_arena as well?
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...
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
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
The end of another full-power episode of Handmade Hero, which was dedicated to Abner Coimbre