Handmade Hero»Forums»Code
13 posts
Are Day 055 entity frequency transitions working?
Can anyone tell me if the transitions of entities between high/low frequency are working correctly at Day 055?

I'm not following along in C/C++ so, it may be something stupid I've done. Would be interesting to hear from someone that is up to Day 055 and following verbatim with Casey.

At day 055, we are generating two screens and have a camera bounds for High frequency entities of TileSpanX=17*3, TileSpanY=9*3

The walls of both screens are within the initial camera bounds so become high frequency entities straight away.

If you move far enough away such that the walls of one or both generated screens lay outside the camera bounds, they transitions to low frequency entities. When you turn around and move back to a generated screen, some but not all walls reappear. Which to me means that the ones I can't see did not successfully make the transition back to high frequency.

I've tried debugging this behaviour, but haven't been very successful.

Just wanting to know if this was tested as working, or if I missed it on the stream. I don't recall Casey wandering far enough away from the two screens, to show this as working or not.
Simon Anciaux
1341 posts
Are Day 055 entity frequency transitions working?
I did a quick test (on the code I wrote which is very close to Casey's):

After moving two screens outside of the generated rooms (2 rooms) the wall entities switch to low. Going back to the start the entities are switched back to high.

There is a small problem though: the wall entities are now drawn after the player (meaning the wall is in front of the player sprite). But I guess this is something that will be addressed in the renderer.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Are Day 055 entity frequency transitions working?
Yeah, sorry about this, but in general while we're experimenting it's hard to keep everything in a guaranteed working state. By the end of this week, we'll probably have everything set up in a way that you can test against, where I've actually gone through and made sure everything actually works. But again, while we're experimenting, the focus is on the structure of the code, and I literally don't care if it runs at all, just that I know that I can make it correct once I go to do it properly.

- Casey
13 posts
Are Day 055 entity frequency transitions working?
Thanks for both your replies. It helped me focus on it being my problem, as you confirmed Caseys' Day 055 was in a working state, at least as far as low/high transitions.

I eneded up reviewing past revision control commits and found all my bugs. I was a happy coder just hours before Day 056 went live to stream. Phewww!