Username or E-mail
Password (Forgot?)
New? Sign Up
Join or Sign In
Forums Stencylpedia Stencyl TV Translations Go Pro - Plans & Pricing Download Stencyl


Switch to Book Layout

1: Getting Started

  • Getting Started
  • Crash Course
  • Crash Course 2
  • StencylForge

2: Building Logic

  • What is a Behavior?
  • Creating a Behavior
  • Attributes
  • Game Attributes
  • Attribute Types
  • Events
  • Our Behaviors

3: Actors

  • What are Actors?
  • Animations
  • Motion & Forces
  • Physics
  • Controls
  • Collisions & Groups
  • Killing vs. Recycling
  • Tweening
  • Effects
  • Chapter 3 Challenge

4: Scenes

  • Scene Basics
  • The Camera
  • Tilesets
  • Regions
  • Drawing Text & HUDs
  • Changing Scenes
  • Music, Sounds & Channels
  • Backgrounds
  • Customizing Actors
  • Chapter 4 Challenge

5: Game Mechanics

  • Saving
  • Pausing
  • 3rd Party Services
  • Web Requests

6: Advanced Topics

  • Get/Set Attributes
  • Custom Events
  • Blending Modes
  • Lists
  • Custom Blocks
  • Continuous Collisions

7: Testing & Tuning

  • Testing Games
  • Optimizing Performance 1
  • Optimizing Performance 2

8: The Last 10%

  • Flash Publishing
  • Standalone Apps
  • iOS App Store
  • Chrome Store
  • Making Money

M1: Mobile - Intro

  • Getting Started
  • Testing on your Device
  • Flash -> iOS Guide

M2: Mobile - Basics

  • Atlases
  • Drawing Text
  • Retina Display
  • Accelerometer
  • Joystick
  • Universal Games

M3: Mobile - Services

  • iAds
  • Game Center
  • In-App Purchases

M4: Mobile - Publishing

  • Debugging
  • Publishing to the App Store
  • Optimizing Performance
  • Promoting your Game

A: Troubleshooting

  • Showstoppers
  • General FAQ
  • iOS FAQ
  • The 90% Memory Warning
  • Recovering Broken Games
  • Can't Export to SWF
  • Reloading Documents
  • Generating Logs
  • Flash Security Settings
  • How to Report Bugs

B: How-To Guides

  • Importing Assets
  • Scene Designer
  • Code Mode
  • Font Editor
  • Pencyl (Image Editor)
  • Tile Editor (Shapes)
  • Game Cleaner

C: Reference

  • Glossary
  • Block Reference
  • Useful Shortcuts
  • Stencyl API

D: Resources

  • Stencyl TV
  • Abigayl's Guides
  • Giving Critiques
  • Creating Extensions
  • Translating Stencyl
  • Credits

3.0 Drafts (In Progress)

  • What's New in Stencyl 3.0?
  • Setup (Android)
  • Setup (Desktop)
  • Setup (iOS) - Concepts
  • Setup (iOS) - Mac
  • Setup (iOS) - Windows
  • Testing iOS on Windows
  • iOS Troubleshooter

  • Mobile App Scaling
  • Full Screen Mode
  • Simple Physics
  • Backgrounding an App

  • iOS App Store
  • Mac App Store
  • Windows Store
  • Google Play
  • HTML5

  • Android Ads
  • Android Purchases (WIP)
  • 4" Form Factor (iPhone 5)
  • Mobile Input
  • Mobile Features

  • Extending the Engine
  • iOS / Android Extensions
  • Developing the Official Extensions
  • Developing the Engine

  • iAds (Revised)
  • Game Center (Revised)
  • iOS Purchases (Revised)
  • Atlases (Revised)
  • Drawing Text (Revised)
  • Joystick (Revised)
  • Accelerometer (Revised)
  • Sounds (Revised, WIP)
  • Debugging (Revised, WIP)
  • iOS Performance (Revised)
Level: Beginner

Third Party Services - Kongregate and More

Stencyl has partnered up with Kongregate, Mochi Media and Newgrounds to bring you direct integration of each of these popular networks’ APIs to bring Ads, Leaderboards and Achievements to your games.

Note: All of these blocks may be found under the Game > Flash section of the Palette.


Contents

  • Kongregate
  • Mochi: Basics
  • Mochi: Pre-Game Ads
  • Mochi: Troubleshooting
  • Newgrounds
  • Other APIs (CPMStar)


Kongregate

Kongregate is a popular gamer-oriented Flash portal. It’s developer friendly and towards a more sophisticated hardcore audience than typical Flash portals.
 

Before you Start

The bulk of our support involves sending scores over to Kongregate's servers. To do this, you first need to set up high scores on Kongregate's end. This page tells you how to do this.
 

Setting Up

Before you use the Kongregate API, use this block to initialize it. It doesn’t matter where or when this happens. Sticking it inside the first scene is best practice.


Submitting Scores

Unlike other services, Kongregate displays its scores as part of its site rather than in-game.

To submit a score, use this block. Be sure to set up each field you wish to record on Kongregate’s site and adhere to its best practices.


Player Info

With these blocks, you can test whether the player’s registered, a guest and their user name, if they are registered.


Achievements

The best games on Kongregate have achievements. Unfortunately, the staff picks out which games get achievements. The minimum bar is a 3.5 rating (in practice, it’s now 4+), hitting the front page and reaching at least several hundred thousand plays.


Mochi: Basics

Mochi is the leading purveyor of ads for Flash games and operator of a popular Leaderboard system.
 

Setup

1) Sign up on Mochi’s site and set up an entry for your game.

2) At the end of that process, you’ll have a Game ID.

Click the Settings button to open the dialog.

Settings Button

Next, click the Web button. Inside that dialog, you'll be able to enter the Game ID you received from Mochi's site.

Setting up third party game options.


Showing an Ad

Displaying an ad is simple. Add the “show Mochi ad” block precisely at the time you wish to show the ad.



Leaderboards

Displaying a leaderboard requires setting up the leaderboard first on Mochi’s site.

1) Visit the Scores page for your game by clicking “Scores” in the sidebar.

2) Click “Add Leaderboard” – it’s a small button on the right-hand side of the page.

3) Fill in an appropriate title. Leave the rest of the fields as-is and submit.

4) Click on the “actionscript code” link on the next page.

5) Look for “Leaderboard Id” and copy it to your clipboard – this is what you’ll enter in to Stencyl.

6) Now, use this block (Game > Flash APIs). Enter in the Leaderboard Id from step 5.

7) Save and run the game. The game will now show the leaderboard after finishing the level.

 

Mochi: Pre-Game Ads (Pro Only)

Pre-game ads display while a game is loading up. They’re a perfect time to engage a player during this waiting period.

All you have to do to enable Pre-Game Ads is go to this dropdown under Settings> Web> Loading Screen Style.

 

Mochi: Troubleshooting


What to do if ads and scores do not show up, or if you receive an error.

If you are testing locally, and want to be able to see ads or scores, you may need to do the following.

Add the location of your development files to your global security settings in the Adobe Flash Player Settings Manager. This way, you can give all SWF files in this location local-trusted access, allowing access to both local and remote data.

The folder you want to add is the entire Stencyl folder. This will catch everything underneath it, including the game itself. If you’ve chosen a custom workspace, you also need to add the folder for that.

Note: As of March 2012, we’ve noticed that Mochi has trouble displaying ads in Google Chrome. Try another browser if you experience issues.


Newgrounds

Newgrounds is a popular site for user-generated Flash content and games. They’re a great place to get a game sponsored.


Setup

Every Newgrounds game has 2 secret values that you must set, so that Newgrounds’ servers can communicate with your game. Set those values on the Advanced Settings page on the Dashboard.


Showing an Ad

Much like our Mochi solution, ads show at any point during the game, whether at the start or between levels.


Leaderboards

Newgrounds supports scoreboards. In order to use them, you have to set the scoreboards up on their site and get them approved by an administrator before they can be tested.

Once they are, you can opt to show the scoreboard, passing in the board’s ID/name, which you defined on Newgrounds.

Similarly, using that same board ID/name and passing in a value, you can submit a score to Newgrounds servers.

 

Medals

Medals are Newgrounds term for achievements. Like scoreboards, medals must be set up on Newgrounds site and approved by an administrator.

Two blocks can be used to work with medals. The move block is a one-time use block that you call at the start of the game (or anytime before a medal shows) to place the medal’s popup at an appropriate place on screen.

To unlock a medal (in other words, unlock the achievement), just use the unlock medal block.


Other APIs (CPMStar)

In the future, Stencyl will provide a way to extend the toolset and engine to support additional APIs.

On our end, we’re most interested in folding in APIs with wide adoption and interest. It’s likely that we’ll pull in an Analytics API in the future and add full support for the CPMStar ad network.

Note: As of Stencyl 2.0, we have support for CPMStar pre-game ads. These work much in the same way as the Mochi Ads. As you probably know, CPMStar is invite-only, so only those with access need worry about this.


Summary

  • Third party services let you increase your game’s engagement and provide simple ways to monetize.
  • Use services responsibly to complement a game.
  • Consider creating a mobile version of a game or receiving a sponsorship if you really want to monetize a game to its full extent.


Last Updated: 2013-01-29 by Jon

11997 have read this article
Disclaimer: The Stencyl Team does not actively monitor comments on articles. If you're seeking help for your game, please ask a question on the forums. Thanks!
8 Comments
snowbrger
what do you do with the id of player in the kongregate coding?

0 3 months, 2 days ago
Rnd
submit score to Kongregate with name: value:
what is name ?? is it statistic name / player username ?

0 3 months, 3 weeks ago
pokedan1
When will other sites like flashgames.com or amourgames.com be
Released?

0 4 months, 2 weeks ago
AK80
Newgrounds game key and id are with small letters inside the page of your game you want upload.It took me 3 days to see it.
1 9 months ago
srimasis
where can i find newgrounds game key and api id.
1 9 months, 3 weeks ago
rob1221
Since the Newgrounds site design change, leaderboards and medals no longer require admin approval.
0 11 months, 4 weeks ago
rleyfield
Sorry, the virus was from something else.
-1 1 year, 2 weeks ago
rleyfield
Do not download Stencyl 1.4.
It just downloads the wrong thing and you get a virus from it.

-3 1 year, 1 month ago



Commenting Guidelines

Sign In to Comment

Make Games

  • What is Stencyl?
  • Roadmap
  • Pricing

Play

  • Arcade
  • Showcase

Community

  • Forums
  • Chat
  • Translations

Help

  • Stencylpedia
  • Stencyl TV

About Us

  • Blog
  • Contact Us
  • Press
  • Privacy
Follow Stencyl on Twitter



© 2013 Stencyl, LLC.