Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
...me again.... <img src="smileys/smiley18.gif" border="0" align="middle" />
I am looking for bitwise operations like AND. Right now, I would like to use AND to set flags for puzzle pieces that have been collected.
And idea where I can find this?
I made a plugin last week-end for my own use... Could share it
I could use something like that too, —
Sharing is caring!
At your own risk
Thanks! <img src="smileys/smiley1.gif" border="0" align="middle" />
Do you really need bitwise AND for this? How about a bunch of separate boolean instance variables?
Actually it makes things easier. If you have 8 puzzle-pieces you can set them with OR and then check the value of the variable to be equal with 255....
Develop games in your browser. Powerful, performant & highly capable.
Ashley > I actually use bitwise operation to make a kind of tree.
A Parent contain the bits of its child. And leaves are power of two (only one bit set), so to find if an element is in a tree or another, or if an element is an ancestor to another it become really simple.