Skip to main content

4 posts tagged with "opengl"

Open Graphics Library

View All Tags

Ordered Dithering is Useful and Good

· 3 min read
Jodie
The Tonemap Guy

Dithering is the old trick of using patterns to fake more colors than you actually have. If you've ever noticed the crosshatch pattern in old video games, that's ordered dithering. It uses a repeating grid called a Bayer Matrix. It's carefully constructed so that adjacent values are as far apart as possible, which maximally spreads error. Modern game developers, in their infinite wisdom, have decided that this mathematical perfection is a problem to be fixed. The regular pattern is too noticeable, they say. Instead they make a fancy precomputed texture that has the same properties but with no regular pattern: Blue Noise.

UIs Are Hard

· 18 min read
Ross Lombardi
Ross Lombardi
Creator, Twin Gods

If you're like me, you've thought to yourself at least once: "Hey, making a UI can't be that hard! I wouldn't need to add any more headers or libraries to my project!" Because not having to deal with C++ is a good reason to write your own UI.

Well, I did it for my game, Twin Gods. I can't remember why anymore beyond "hey, that sounds like fun". Am I glad I have it? Yes! You very much learn a lot about how a UI works. Would I do it again? Probably not.

What came out the other end is a confusing mixture of knowledge, a lot of head-bashing, years of code that went sideways more than once, and a working UI for a functioning game. Let's see how it works, shall we?

This is not an article to sell you on using my UI (*0). This is only intended as a showcase of how it works, why it works that way, what went into making it, and how difficult it is to make a UI from scratch. And I cannot overstate how difficult it is -- and how much time it takes -- to make a UI from scratch.