-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|630|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Variables


 
Pakz
Created : 30 August 2017
 
Language : Monkey-X

Binary addition

Function+example that adds binary up by 1

Latest Update

I was watching this youtube video where someone showed a phone app where you swiped to keep or discard a random small image/sprite.

To get a unique image every time you can use the binary addition function in the code here. I got thinking on how this could be done and while was walking my parents dog I came to the method I used here.

It is described in the code. (function incbin)

The code can handle a *infinitly* sized array where the binary is stored. The incbin function adds up one count every time it is called.

It can really get big though. I did a 5*5 size array and it came to 33 million states. Those are a lot of tiny images.

 

Comments