No Game Engine Game Dev: Word Sleuth 031: Last piece of long word wrapping and the About scene

4 months ago
1

Streamed on 2024-08-14 (https://www.twitch.tv/thediscouragerofhesitancy)

Game Engines are for sissies!

I almost got long word wrapping working yesterday, but there was something strange happening with characters disappearing if there was a long word break hyphen added to the text layout. I had already determined yesterday that the issue was not the number of quads, the size of our VertexBuffer, or the number of indices in our IndexBuffer. But we started there again today. Eventually we found the problem: With the colors embedded in the text, and the hyphen shifting quads over to make room for the non-text hyphen, the colors weren't being shifted and the extra quad at the end wasn't getting a color, so it was rendering with an invisible color. Once we figured that out, it was simple to fix by providing a color.

While running tests we found a game crash that only occurred when we were not in the debugger. With lots of log statements we narrowed it down to an uninitialized value; it wasn't being set in all the constructors. This means there was a garbage value that caused us to break rules. When running in the debugger the memory was zero, so the bug didn't show up in the debugger. Once the cause was known it was easy to fix by adding the initialization to the other constructor.

With all that out of the way it was time to start working on the About scene. Until now it has stood empty. But no more. Now we have paginated text with sounds and transition animations. The text is placeholder text, but all the features I wanted are in place, minus art. It's still drawing on top of a black background.

Loading comments...