hyperPad hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Math: bitwise opperands

    Scheduled Pinned Locked Moved Comments & Feedback
    2 Posts 1 Posters 762 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • PensegiP Offline
      Pensegi
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • PensegiP Offline
        Pensegi
        last edited by

        AND, OR, XOR AND NOT

        1 Reply Last reply Reply Quote 1

        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
        • First post
          Last post