r/howdidtheycodeit • • May 21 '23

How to code a marble chessboard theme?

I wanted to build a chessboard gui. I thought you could simply repeat the same two tiles 32 times and call it a day.

Then I saw this image of Winboard with the marble theme. I tried looking at the source code and I only found 2 files in this directory called `marble_d.png` and `marble_l.png`

Each square looks different, how are they doing this?

0 Upvotes

11 comments sorted by

View all comments

Show parent comment

1

u/Fourstrokeperro May 21 '23

Perhaps you're right. Thanks!

2

u/[deleted] May 21 '23

Yeah it's some crazy randomization. Tile UVs are flipped, rotated and offset randomly.

2

u/[deleted] May 21 '23

Thanks for posting this, it's a really cool effect.

1

u/Fourstrokeperro May 23 '23

IKR thanks man