When you’re working on a game, you might want to store whether in game events have occurred or not. For example; we may have a game where at some point a building is blown up. When we leave the room and come back, the building will reset to it’s un-blown up state unless we save variables.
I have, in the past, used an array to store different events. This always felt quite clunky to me and might require a lengthy array that’s difficult to keep track of. In this post I’ll explore how I use binary operators to allow me to store the status of many events by saving just one number.
Continue reading
Recent Comments