Community

To:
Subject:
Message:
or Cancel

Multiple scoreboards, one game

armegalo
Mar 19, 2007 (7 years 30 days ago)

I have a game with 4 different types of play plus I'm considering easy medium and hard - that makes 12 different scoreboards... can I do that or is it limited to one scoreboard per game?
  • Thankful People:

Multiple scoreboards, one game

bob
Mar 19, 2007 (7 years 30 days ago)

United States US
That's possible. The high score API will accept sub identifiers if you separate it from the game's id with a slash.

Let's say that your game's tag is "abcd1234" . You could specify an id "abcd1234/mode1_easy" and you would get a different score board than if you had specified "abcd1234" or "abcd1234/mode2_easy".

From your code you could wrap that up..
function getHighScoreId(id, mode, skill) {
return id + "/" + mode + "_" + skill;
}


So when you call into the high score API, it would look something like this:

MochiAd.sendHighScore(
{
id: getHighScoreId("abcd1234", mode, skill),
name: name,
score: mc.score
},
table, 'gotScores');
  • Thankful People:

Multiple scoreboards, one game

armegalo
Mar 20, 2007 (7 years 29 days ago)

Looking good :)

Ok, probably a silly question, but how do I find out the ID of my game?
  • Thankful People:

Multiple scoreboards, one game

bob
Mar 20, 2007 (7 years 29 days ago)

United States US
The ID of your game is in the ActionScript code that you get to run the ads. It's also in the URL when you're viewing the details for a game. It's a 16 character hex string.

For example:
MochiAd.showPreloaderAd({id:"0123456789abdef", res:"550x400"});
The id is 0123456789abcdef.

So in the high score API calls you would use something like {id: "0123456789abcdef", ...} or {id: "0123456789abcdef/board2", ...} in the options.
  • Thankful People:

Multiple scoreboards, one game

armegalo
Mar 20, 2007 (7 years 29 days ago)

Of course... thanks :)
  • Thankful People:

Multiple scoreboards, one game

armegalo
Mar 22, 2007 (7 years 27 days ago) edited 7 years 27 days ago

Here's another one...

Well, 4 actually...

A way to reset scoreboards, so after testing and b4 release you can make it fresh and new?

And a way to edit scores - like my new game just got some idiot screaming f-ing faggots blah blah - I wanna delete him

a text filter

a way of viewing your scoreboard from the dashboard

I guess they would all merge together in some sort of scoreboard management system... I spy v1.5 :)
  • Thankful People:

Multiple scoreboards, one game

bob
Mar 23, 2007 (7 years 26 days ago)

United States US
Those are some excellent suggestions, we'll definitely look at implementing them soon!

Text filtering sounds like it would be pretty difficult. Determined people will probably just find a different way to write something offensive. What about just a feature that filters out a particular person's scores?
  • Thankful People:

Multiple scoreboards, one game

armegalo
Mar 24, 2007 (7 years 25 days ago)

How about simple text filtering emailing warnings to gamesmiths telling us we might want to watch their IP
  • Thankful People:

Multiple scoreboards, one game

bob
Mar 24, 2007 (7 years 25 days ago)

United States US
Could you be more specific? I don't quite understand what you mean.
  • Thankful People:

Multiple scoreboards, one game

armegalo
Mar 25, 2007 (7 years 24 days ago)

Well, you could disallow a certain list of words - the obvious ones, plus perhaps a few of the more obvious offshoots like putting full stops, dashes or spaces between letters.
Then, if the scoreboard spots this, it could send an email to the game owner telling that a score contains some disallowed words, and we get the option to delete the score, delete the score and ban their IP or just ignore it. (or we could have set the scoreboard up to automatically do any of those)

I guess of course if it's too much hassle, authors can write their own text filters inside the games... might even be a little add-on we could share around.
  • Thankful People:

Multiple scoreboards, one game

chris
Mar 25, 2007 (7 years 23 days ago)

New Zealand NZ
Is it possible to have 2 high score figures within the one table? For example we are about to release a game that will measure people on level reached and everage level completetion rate ie 78%.
  • Thankful People:

Multiple scoreboards, one game

bob
Mar 25, 2007 (7 years 23 days ago)

United States US
Currently only three fields are stored: name, score, and timestamp. You could stuff the completion rate into the name.. e.g. send the name with the completion rate at the beginning, and split on the names before you display.

Allowing for storage of extra data sounds like a good idea for a future version, we'll definitely look into it.
  • Thankful People:

Multiple scoreboards, one game

armegalo
Apr 17, 2007 (7 years 1 day ago) edited 7 years 1 day ago

Quoting: Bob

That's possible. The high score API will accept sub identifiers if you separate it from the game's id with a slash.

Let's say that your game's tag is "abcd1234" . You could specify an id "abcd1234/mode1_easy" and you would get a different score board than if you had specified "abcd1234" or "abcd1234/mode2_easy".

From your code you could wrap that up..
function getHighScoreId(id, mode, skill) {
return id + "/" + mode + "_" + skill;
}


So when you call into the high score API, it would look something like this:

MochiAd.sendHighScore(
{
id: getHighScoreId("abcd1234", mode, skill),
name: name,
score: mc.score
},
table, 'gotScores');


Hmm... I tried that, and it doesn't seem to work when online.

Locally, the error I'm getting is this...
Target not found: Target="/_mochiad_com_3412aef60ad18637/level_easy/_mochiad_com" Base="_level0._mochiad_com_3412aef60ad18637/level_easy._mochiad_com"

where normally (without the additional "/level_easy" on the id tag), locally it would say this...
Error opening URL "http://x.mochiads.com/com/1/3412aef60ad18637.swf"

I'm thinking it's getting a little confused?
  • Thankful People:

Multiple scoreboards, one game

bob
Apr 17, 2007 (7 years 1 day ago)

United States US
That can happen if you're sending incorrect data to the API. Can you show me your actual code?
  • Thankful People:

Multiple scoreboards, one game

armegalo
Apr 17, 2007 (7 years 1 day ago) edited 7 years 1 day ago

score_commafy = commafy(score);

score_input._visible = true;
score_table._visible = false;

var table = new TextScoreTable(score_table);
var mc = this;
var callback = function (name) {
var boardid="3412aef60ad18637"+"/"+_root.gametype
mc.score_input._visible = false;
mc.score_table._visible = true;
MochiAd.sendHighScore({id:boardid, name:name, score:mc.score},
table, 'gotScores');
};
var input = new ScoreInput(score_input, "Your Name", callback);


This code is placed in the root.
score and gametype are variables in the root and this uses your own example table and input boxes.

Bare in mind it works with the normal board if I just take out the boardid variable and replace it with the correct ID in quotes
  • Thankful People:

Multiple scoreboards, one game

bob
Apr 18, 2007 (7 years 3 hours ago)

United States US
Ok, I see where this is happening. The problem is in the client-side code because it names a MovieClip based on the identifier given, and '/' isn't a valid character in a MovieClip name.

Try using '_' instead of '/', and make sure that your _root.gametype is a valid MovieClip name (letters, numbers, no spaces).

Multiple scoreboards, one game

armegalo
Apr 18, 2007 (7 years 2 hours ago)

I'll have to run a few more tests but that seems to work fine :) Thanks
  • Thankful People:
Back To The Forums