The Scoreoid AS3 SDK

For a recent client Flash game project I needed a highscore table to be shown in-game and in-html outside of the game experience. I considered buy vs build and decided on find a great solution online.

There are a few contenders out there offering high-score tables and other things for Flash developers. Some are cost money. Most are free.

So what is Scoreoid?

As CasualConnect says – Scoreoid is a non-restrictive, reliable and easy to use gaming platform designed to handle scoring, leaderboards and game management, including advanced functions for multi-platform games such as platform content awareness to advanced player management, developed by game developers for game developers.

Scoreoid’s goal is to handle scoring and leaderboard functionality offering plenty of features to make games better; shortening game development time and costs, and giving developers time to work on their games.

What makes Scoreoid unique?

Unlike similar solutions, Scoreoid is focused on providing game developers in game features to help improve their game titles and at the same time focusing on giving game developer’s more time to work on their game. Scoreoid is also truly cross platform: with Scoreoid’s Open Web API there is no need to download SDK’s, no waiting for updates, and yes, Scoreoid works on every platform.

1. Easily create saved games
2. Create advanced leaderboards
3. Player management and in game notifications

Overall its really great. Scoreoid’s marketing is proud it has no download. It *is* cool that it is ‘language independent’ (independent from AS3 vs JavaScript vs Objective C++, etc…) however any project that uses it, will require quite a bit of boiler plate (boring code) just to get it into your game. Any scalable implementation of their framework would require developers (per platform) to create an SDK of classes and patters to use the API.

My Philosophy of API Design

  • Easy to learn –  Intuitive, readable, with good examples & documentation
  • Easy to use – Single entry point, KISS, adopts common standards, & has its own consistent language
  • Hard to misuse – Explicit error message suggesting parameters values & strong typing
  • Audience-appropriate / Sufficiently Powerful – Meet current needs and be (invisibly?) flexible for the future

My Scoreoid AS3 SDK

As the first comment below states, the terms ‘SDK’ and ‘API’ can be confused and unclear. I chose to call my work an ‘SDK’ in that it is a closed chunk of code that is language specific (AS3) to access Scoreoid’s server-side ‘API’.

Strong Typing

The SDK is meant to be a vertical slice representing 100% of a subset of the Scoreoid API. There is a method to initialize, to make the request, a strong typed request object, a response event (success and failure). Its 100%, EXCEPT I was thinking to make a strong object “also” for the response (this is not done, it stays a json/xml object depending on the request parameters). I use a custom implementation of ‘AS3 Enums’ to further this goal. Enums do not natively exist in AS3.

Snippet from My Scoreoid AS3 SDK

[actionscript3]

//INITIALIZE
Scoreoid.initialize(Configuration.SCOREOID_API_KEY, Configuration.SCOREOID_GAME_ID, Response.JASON);

//LISTEN TO REQUEST’S RESPONSE
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES, onGetScores );
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES_COMPLETE, onGetScoresComplete );
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES_ERROR, onGetScoresError );

//CREATE REQUEST – CONSTRUCTOR ACCEPTS ONLY THE REQUEST’S REQUIRED PARAMETERS
var getScoresRequest : GetScoresRequest = new GetScoresRequest();

//ADD OPTIONAL PARAMETERS
getScoresRequest.order_by = OrderBy.DATE;
getScoresRequest.order = Order.ASCENDING; //asc or desc
getScoresRequest.limit = "";

//DONT’ SET A START DATE
//BUT DO SET END DATE TO EXACTLY NOW
//getScoresRequest.start_date = new Date();
getScoresRequest.end_date = new Date();

getScoresRequest.platform = "";
getScoresRequest.difficulty = 0;

//SEND REQUEST
Scoreoid.getScores(getScoresRequest);

[/actionscript3]

It rocks!

Next Steps

  • Leave comments below. What do you think is great? What do you think is horrible?

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]

RMC Primer: Resources to Learn Flash and Flex, Design and Development

Information Overload ! ! !

As a speaker and consultant, I’m often asked a simple question about the Multimedia – “What should I learn and how should I learn it?” Years back I created a laundry list of resources and would forward it to interested parties. I’ve updated the list and it is below for all to enjoy.

UPDATE: This post is from 2009 and is generally focused on Adobe Flash. It may be useful to other types of developers too.

Part of the trouble with Flash development is that ‘Flash’ can do so many things. I’m lucky to meet talented individuals from a a dozen different disciplines that all use Flash; illustrators, animators, UI designers, hard core coders, professionals, students, teachers, managers, business developers, and hobbyists.

I wanted to take a step back and provide some insight and direction for how each other’s personalities can learn from the free, cheap, (and expensive) learning resources out there. I love to learn and love to teach. Happily I get to do a bit of both each week.

With the Multimedia Primer below, and reader contributed comments below it, I hope we can turn the maze of information overload into a network of sharing to help us all meet our goals.

ULTIMATE PATH LEARNING

Luckily, there are many great resources to learn. Wikipedia is a ridiculous resource. Its goal is to house the sum of humanities knowledge and provide it for free (WOW!). While Jimmy Wales is working on that gem, take a look at the list below. I hope it helps.

The road to learning is not easy. Its easy to get burnt out on a project all day and feel lifeless to sit down at night and learn for learning sake. I invite yo to find and focus on your end goals (whatever that means for you), get inspired to build passion, and burn that passion as you work your ass off to meet your goals.

Thanks in advance to all those who helped me learn in the past and continue to fuel me in the future. If you love or hate any of my links or can suggest others, please leave a comment!

  • BEST WAYS TO LEARN (ANYTHING)
    1. Get excited! Learning about what interests you is like swimming WITH the current.
    2. Get Paid to do it!If you or your manager does not allow for 20% of work time to learn, think seriously about making a major professional change and get on the trendy train of seeking more balance in your life (see # 7.5). When planning projects, don’t just take ones that are easy. Challenge yourself to accept new projects which are calculated-risks balancing familiar core concepts with some new-to-you tasks too.
    3. Get Pressure! Some pressure is good pressure. By placing time-sensitive criteria to specific goals ( I will learn how to float an image in CSS by the 1st day of next month), you are holding yourself accountable. We resist these types of deadlines for only one reason: We are afraid to ‘start’ something we may not finish it. Mark it on your calendar, START IT, and finish it. You’ll be far more thankful at the end of 30 days if you meet a few learning goals than if you managed to watch another dozen repeats of ‘The Office’ on TBS. (Awesome show BTW)
    4. Give Back! Its amazing how much you can learn by helping others. Showing someone a new technique, sharing a favorite book, or other things (like writing an amazing blog post, HAHA!) are all fantastic ways to re-learn the fundamentals, practice articulating concepts, and align your chi.

1. Resources from RMC

Learn from the tutorial resources available for digital software and programming.

2. Resources from NowAndThere.com

Learn about lifestyle design, mindfulness, work/life balance, and World Travel. Be a digital nomad!

3. More Resources

INSPIRATION

GENERAL DESIGN

GENERAL DEVELOPMENT

CONFERENCES & EVENTS

ADOBE FLASH PLATFORM

ACTIONSCRIPT 3.0 (AS3)

ADOBE FLEX

ADOBE FLEX / FLEX WORKFLOW

LEARN ALTERNATIVES TO THE FLASH PLATFORM: Compare/Contrast/Stretch

Perfect Flash CS5 Asset Template for Flash/Flex Workflow

A good designer-developer workflow is incredibly powerful in Flash Platform Development. Isolating the ‘art’ from the ‘code’ will allow both parts of your project to progress with limited dependence on the other. This will lead to more innovative ideas, a more flexible project, and less headaches for staff.

See more on that here.

To encourage good Flash library symbol organization in your artist, a template can be very helpful.

A few fundamental concepts embraced in this template:

  • Linked (important to coders) vs Non-Linked (Who cares about that? – So hide it!)
  • Styles (guided out stuff like specification screenshots) vs Assets (Programmatically important stuff)

Here is a screenshot.

Next Steps

  • Download the source code (See ‘Member Resources’ below) for a simple example.

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]