Alright, so basically this code you’re looking at in the screenshot is a beta tester whitelist.
First, it checks if the INI group for testers exists. If it doesn’t, it makes the group and throws in some default usernames like mine and my alt.
Then, every frame, it loads the usernames from the INI into alterable strings so the game always knows who’s allowed.
When someone logs in through GameJolt, their username gets saved into a global string (Don't worry, it is cleared once the game is closed, no shady collection here). The code then checks: if the username matches one of the allowed testers, a tiny timer fires and takes them to the next frame. If it doesn’t match anyone, a different timer fires and locks them out, showing a little message.
Using timers here makes sure the frame jumps happen smoothly without messing up the event loop.
That’s it. Simple, safe, and it keeps the game locked down to just the people you want testing it.
Slightly off-topic, but this is exactly the same whitelist code structure I will be using for when I start doing Cube's Dark Hours 2 Reshined beta test builds!












3 comments