utopiangames said: I have found Integers are unrealiable in certain situations.
Darren.
Care to elaborate ? I can't see how using an integer toggle over a boolean toggle can be unreliable if you are managing the toggle correctly. It is the same thing.
(boolean) True = Anything non 0 (boolean) False = 0
I am getting Booleans but still confused Ace has helped me out though but I do agree Booleans are essential cause in one of my games for the most silly reason the interger goes over 1 then the game plays up. . . . ----------------------------------------------------- Join the GameSalad Community and have your game noticed for free. http://www.facebook.com/ListYourTopiPhoneGame List your Top iPhone Game on FaceBook!
SlickZeroHouston, TexasMember, Sous ChefPosts: 2,870
Even though an integer can do 0=False and 1=True, it also can go all the way up to eleventy trabillion in value. A boolean is a simple true or false, nothing more to keep track of. I think that may be where the performance comes in to play if you are using a lot of them.
I use a lot of text attributes myself. Especially for controls.
While on the small scale, a Boolean takes up much less memory. In a small game it probably doesn't matter much, but if you have hundreds of attributes like I do, every little thing counts
I think an advanced Boolean video is required. . . . ----------------------------------------------------- Join the GameSalad Community and have your game noticed for free. http://www.facebook.com/ListYourTopiPhoneGame List your Top iPhone Game on FaceBook!
Comments
I have found Integers are unrealiable in certain situations.
Darren.
(boolean) True = Anything non 0
(boolean) False = 0
Ace has helped me out though but I do agree Booleans are essential cause in one of my games for the most silly reason the interger goes over 1 then the game plays up.
.
.
.
-----------------------------------------------------
Join the GameSalad Community and have your game noticed for free.
http://www.facebook.com/ListYourTopiPhoneGame
List your Top iPhone Game on FaceBook!
I use a lot of text attributes myself. Especially for controls.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
.
.
.
-----------------------------------------------------
Join the GameSalad Community and have your game noticed for free.
http://www.facebook.com/ListYourTopiPhoneGame
List your Top iPhone Game on FaceBook!