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

    Math: bitwise opperands

    Scheduled Pinned Locked Moved
    Comments & Feedback
    1
    2
    412
    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
      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
        Pensegi
        last edited by

        AND, OR, XOR AND NOT

        1 Reply Last reply Reply Quote 1
        • First post
          Last post