Step counter question in regards to longevity.

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I've been experimenting with a bunch of different ways the step counter can be used and I'm wondering if there is a max value (a cap) or if it reverts back to 0 after reaching 2,147,483,647.

If it does, or at least continues to change the number in some way, I can use it perfectly since I'm not attempting to display the value, I'm only using it to trigger an event when it changes to a different value.

Any information on this would be most appreciated and thank you in advance.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
I believe it keeps going. Where did you get that number from?
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
It's the maximum positive value for a 32 bit binary integer.
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Sorry for my late replies. My comments keep having to be held for moderator approval.
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
This is anxiety inducing. I feel like I'm being rude for not being able to respond to other people's comments in a timely fashion.
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
That's weird, one of my messages finally went through.

I was saying that the number is the maximum positive value of a 32 bit binary integer and I was also apologizing for the late replies. Sorry for the long wait.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
Afaik, Ruby automatically converts Fixnum (32-bit integer) into a Bignum (even bigger one) once it's reached a limit of Fixnum (source: helpfile)
So, your number might be not an actual limit. Besides, who would gonna have step counter on such number lol.
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
That's pretty awesome. I had no idea about that lol I found an alternative method of tracking steps using $game_player.moving? and a variable that resets after it reaches a point, but I'll just stick with the normal step counter to keep it simple for now. Thanks a bunch.
 

devin3194foret

Villager
Member
Joined
Jul 19, 2013
Messages
7
Reaction score
0
First Language
English
Primarily Uses
RMVXA
All my old messages finally came through. Sorry about that.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,250
First Language
Spanish
Primarily Uses
RMVXA
Ace's help files said:
Bignum:
The class for long integers, limited only by memory size. The result of an operation is automatically converted into a Fixnum if its value is within Fixnum range. If the value is out of Fixnum range, it is extended into a Bignum. For bit operations, Bignum can be considered to be an infinite 2's complement bit string. Negative numbers in particular can operate as a string of 1 bits extending indefinitely to the left. Mixing Bignum with Float can result in digit cancellation errors upon conversion.
doesn't anyone read the help files?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top