|
-
[F8] Creating a high score API?
Hi I've seen this being used in Kongregate and Hallpass where the loaded games automatically have _root functions to load and save hiscores. Can someone steer me in the right direction where I can do something like this?
I thought it was a just a loader but then I read that the child MovieClip must be the same framerate as the parent. I don't think it's Javascript either.
Thanks!
Tony
-
Senior Member
Uploading game does not itself provide any highscore API, the highscore code must be included in your swf. Maybe I am just not understanding your question, are you wondering how to write your own highscore system or how to include one from those sites in your games?
-
Yes I need some guidance on making something that takes any game and adds hiscore functions to it automatically. I am sure Kongregate uses something like that, I upload my game and use their API without even having the source code of the functions like "_root.saveHiscore(..)", then once I upload it, those functions just work.
I thought of making a preloader with those _root functions but I read that the parent movie changes the framerate of the child.
Thanks!
-
Pumpkin Carving 2008
I've been looking into this myself. I've been watching a place like Nitrome.com. From what I can tell, they use a container that has the functions built in. This is most noticeable in how every game has a global mute sound/music and a few other global options in the corner of the game.
I've actually been working on writing a class that loads a SWF/included movieclip that you just give a url/pass to when you create the class object. Optionally I've wanted to add some level of security, but I think that really depends on what database utility you're using (mySQL, etc).
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Now tell me whos watchin......
just a little heads up, mochiads has a leaderboard now.
-
Senior Member
 Originally Posted by Gamebrew
Yes I need some guidance on making something that takes any game and adds hiscore functions to it automatically. I am sure Kongregate uses something like that, I upload my game and use their API without even having the source code of the functions like "_root.saveHiscore(..)", then once I upload it, those functions just work
Kongregate highscore API uses localConnection to exchange data with chat swf on the same page. All the actual user identification and exchanging data with server is handled by the chat swf.
-
Thanks, localConnection looks like it can work. But can one SWF give _root functions to the other SWF to save hiscores, or even code to mute? The only two lines you need to save hiscores is something like _root.init() and _root.save(score,name)
-
I'm hoping someone makes UHAPI (I like that, makes u happy), or a Universal Highscore API. It would be great if MochiAds made the API available to the portals. It would be so much easier to include a single UHAPI rather than publishing for each portals API. Of course, security would be the main issue.
-
Senior Member
Well, if you use MochiAds, you may as well include their leaderboard API which works everywhere you have uploaded the game.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|