Math: bitwise opperands
-
It would be very nice if there would be an addition made to the Math actions with bitwise operands. This would allow for instance the use of integers as a set of flags. I often use this to store all information of an object in a single integer/short (makes file size smaller and checking flags.
Example:
9 = 00001001 = two flags checked
8 = xxxx1xxx => could say that the tile is active, as opposed to 0 inactive
1= xxxxxxx1 => could mean the tile is accessable, as opposed to 0 it is inaccessable.In my current game being developed, the entire game level data would be stored in just 25 integers, if I made it this way. Not using flags like this I will need about 5 times the amount, and much more logic. :-) The alternative works, but having this would be awsome!
-
AND, OR, XOR AND NOT
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login