integer for different platform
-
for example:
i use in my programm syntax FlxG.game.ticks
later in programm i use syntaxFlxG.watch.add(FlxG.game,"ticks");
and i see this int value is huge , bigger than 1000000000000 and max int for android is 2**32...
- can i reset FlxG.game.ticks?
- can so big int make problem in the future, when i try make android apk file etc?
-
Could you double check the
ticks
value?
Also the maximum value for the Int is 2^31 and minimum is negative 2^31.can so big int make problem in the future, when i try make android apk file etc?
Short answer: No
Long answer: Based on my calculation 2^31 = 2 147 483 648. That's roughly 2 billion miliseconds, or 2 million seconds, or 36 000 minutes, or 600 hours. And your players need to play your game in 25 days straight to make it a real problem.
-
This post is deleted!
-
@DleanJeans
this is screen video, and ticks is huge, it strange i press F5(test project) and value not reset, just growup
http://vk.com/video25450359_456239031
-
Could you put that out of the update() function and put it at the start of the game or the PlayState. By that I mean:
FlxG.watch.add(FlxG.game, 'ticks');
(Also you can edit your post by clicking on the triple dot icon at the bottom left of your post and click Edit so you don't have to delete your previous post)
-
@DleanJeans
still huge
http://vk.com/video25450359_456239033unexpected FlxG
http://vk.com/video25450359_456239032
-
Don't know why it's happening for HTML target but it's normal for Flash target. Maybe you should just switch to using FlxTimer.
-
@DleanJeans
i try it... FlxTimer... after few hour sleep... tired.
and after this i write answer in forum(if can use FlxTimer :) )
-
The FlxG.game.ticks could be the time elapsed since January 1th 1970.
-
@DleanJeans
why this not in docs? )and not bad news... now i can run the FlxTimer, in seconds, it comfort and start from value less then 2**32
http://vk.com/video25450359_456239035
little step forward... now i need note and little restyle info that read when/if forgotthe code highlighting function in forum is automate? or where i can look syntax rules?
-
Forum highlighting is based on Markdown format. Here is some cheat sheet for it: https://github.com/adam-p/markdown-here/wiki/markdown-cheatsheet
-
python code def func njknklj
thanx , i read in down of page NodeBB , try find in NodeBB site the rules to highlighting , but no result
-
why this not in docs?
The dev said it's kinda a bug and they will do something about it.