Riq,
Please enable rankings on these games:
MissilesSpeed
MissilesReflex
MissilesShake
Max score for all is 9000000.
Min score for all is 0.
Thanks.
Also - I can't find instructions on how to donate to Cocos Live. Please post.
Thanks so much,
G.
A fast, easy to use, free, and community supported 2D game engine
Riq,
Please enable rankings on these games:
MissilesSpeed
MissilesReflex
MissilesShake
Max score for all is 9000000.
Min score for all is 0.
Thanks.
Also - I can't find instructions on how to donate to Cocos Live. Please post.
Thanks so much,
G.
done.
please, remember that Rankings is still an experimental feature.
If you want to donate, you can do it by clicking here:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3316057
thanks.
Thanks! Donation complete as well :). $200 is all I can afford but I hope it helps.
And just a follow-up, I know you're being responsible by reminding us of the caveat that Rankings is still experimental - but should I feel reasonably confident in using it in an app that I publish to the app store?
Hi GinsbergWright, thanks for the donation!
Known rankings issues:
1) names that starts with digits are causing problems:
valid names:
"hello123", "one, "two"
invalid names:
"1", "0hello"
filtering on the server will be added a in few days.
I suggest that you add this filter in your game.
2) Ascending scores with rankings are not working (only descending).
3) only "integers" scores are supported with rankings (float and strings are not supported)
4) You might see incorrect rankings. this is due to the 2 transaction problem.
If the 2nd transaction fails, the 1st is not rolled back.
Ok. The only major concern for me might be the integer thing, I have been using floats. Do you know how large an integer is possible?
Thanks,
G
I think that the supported integers are 64-bit long. A very very very big number.
Ok great. Unfortunately I configured these 3 games as float high scores before I asked you to enable rankings. I am deleting the games and re-creating them.. Can you please enable ranking again on:
MissilesSpeed
MissilesReflex
MissilesShake
Thanks!
done.
It is important that you use at least 1 category when using rankings, like "default", "classic", "main"... the name that you want, but at least add 1 category to your games.
Ok no problem. Thanks again.
For the record this is how I am preventing user names beginning with numbers. It is not an elegant solution by any means but I was able to do it quickly.
My users enter their names in a UITextfield, and so this delegate function prevents the first character from being a number:
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if ((range.location == 0) & (
([string compare:@"0"] == NSOrderedSame) |
([string compare:@"1"] == NSOrderedSame) |
([string compare:@"2"] == NSOrderedSame) |
([string compare:@"3"] == NSOrderedSame) |
([string compare:@"4"] == NSOrderedSame) |
([string compare:@"5"] == NSOrderedSame) |
([string compare:@"6"] == NSOrderedSame) |
([string compare:@"7"] == NSOrderedSame) |
([string compare:@"8"] == NSOrderedSame) |
([string compare:@"9"] == NSOrderedSame) |
([string compare:@"`"] == NSOrderedSame) |
([string compare:@"~"] == NSOrderedSame) |
([string compare:@"!"] == NSOrderedSame) |
([string compare:@"@"] == NSOrderedSame) |
([string compare:@"#"] == NSOrderedSame) |
([string compare:@"$"] == NSOrderedSame) |
([string compare:@"%"] == NSOrderedSame) |
([string compare:@"^"] == NSOrderedSame) |
([string compare:@"&"] == NSOrderedSame) |
([string compare:@"*"] == NSOrderedSame) |
([string compare:@"("] == NSOrderedSame) |
([string compare:@")"] == NSOrderedSame) |
([string compare:@"-"] == NSOrderedSame) |
([string compare:@"_"] == NSOrderedSame) |
([string compare:@"="] == NSOrderedSame) |
([string compare:@"+"] == NSOrderedSame) |
([string compare:@"["] == NSOrderedSame) |
([string compare:@"{"] == NSOrderedSame) |
([string compare:@"]"] == NSOrderedSame) |
([string compare:@"}"] == NSOrderedSame) |
([string compare:@"'"] == NSOrderedSame) |
([string compare:@"/"] == NSOrderedSame) |
([string compare:@">"] == NSOrderedSame) |
([string compare:@"<"] == NSOrderedSame) |
([string compare:@","] == NSOrderedSame)
))
{
return NO;
}
else {
return YES;
}
}
Wow man, it's definitely not an elegant solution :)
Try this:
#define LEGALCHARS @" ().-/@$1234567890"
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSCharacterSet *cs = [[NSCharacterSet letterCharacterSet] invertedSet];
NSCharacterSet *cs2 = [[NSCharacterSet characterSetWithCharactersInString:LEGALCHARS] invertedSet];
NSString *filtered = [[string componentsSeparatedByCharactersInSet:cs] componentsJoinedByString:@""];
NSString *filtered2 = [[string componentsSeparatedByCharactersInSet:cs2] componentsJoinedByString:@""];
if (textField.text.length == 0 && !!![string isEqualToString:filtered])
return NO;
if (textField.text.length > 0 && !!![string isEqualToString:filtered] && !!![string isEqualToString:filtered2])
return NO;
if (textField.text.length >= 20 && range.length == 0)
return NO;
return YES;
}
This method does 3 things:
1) Allows only letter characters at beginning (1st if statement)
2) Allows only letter characters and " ().-/@$1234567890" anywhere, because there are some illegal characters for cocoslive and I found those to work (2nd if...)
3) Allows only names up to 20 characters long (3rd if...), you can change that however you like
"!!!" ?
is that "not not not" ?
:) yes, it's the same as one NOT, but it's easier to spot it in the code, that's why I use it. When there is one "!" I sometimes overlook it when I debug...
lol
Yeah - your code is nicer ;). Thanks for posting. I do hope you don't mind if it inspires a change to my code.
Sure man, I posted it so you can use it.
umm - you can achieve the check to prevent first character being a number in just a few lines - nothing like the above. I'll post the code when I'm back in country next week
Nigel
Does the code above from crmagicxxx block international characters (entered on diff. language keyboards)? I'm thinking no... as I have a way bad bug atm. :-(
You must log in to post.