The Stage3DPunk Thread!

(Ultima2876) #1

IMPORTANT UPDATE (23RD MAY 2014): Please be aware that Stage3DPunk is a separate library to FlashPunk, albeit with the aim of being 100% compatible and completely ‘drop in and go’. The FlashPunk community forums are for support with FlashPunk ONLY - if you are using Stage3DPunk in your project, please ONLY ask for help within this topic or by contacting KickBack Games through their site or myself by PM. If you do have issues that seem like they may be FlashPunk issues, try dropping FlashPunk back into your project before asking for help from the FlashPunk community!

So it’s been a while in the works. I’d like to thank all of the developers who have spent time working with us during our beta phases to help bring us to this point; your time and effort is massively appreciated (and to those who have already published games with us, we’re looking forward to increasing cross-promotion opportunities now that we’ll be expanding our catalogue of games!).

So here we go!

Stage3DPunk Public Release

Who Are You? What Are You Talking About?

I’m Dave Fleming, a fairly experienced game developer from sunny England. I’ve made my living for the past 5 years from developing flash games and more recently publishing them as part of a team called KickBack Games. Since my first few profitable projects after graduating from university were made with FlashPunk (Bird Blast, FlashPlok, Mr Fat Snake) and I had massive problems porting them to mobile, I thought of making a Stage3D version of FlashPunk for my games to make them run a bit better. Around the same time, Adam from FGL asked me if it would be possible to actually make a complete drop-in replacement for FlashPunk to improve performance so that we could help other developers publish their games more quickly, and most importantly make these games run well on mobile devices. So KickBack Games was born.

How Does It Work?

Stage3DPunk comes as two components; an SWC containing core functionality and a net/flashpunk folder (similar to how FlashPunk used to be distributed). It literally one-to-one’s all of the functions in FlashPunk and if Stage3D mode is enabled, replaces all of the rendering code with what is essentially a Stage3D ‘FlashPunk emulator’. The hope is that if you’ve got a FlashPunk game and you pop Stage3DPunk in (by replacing your net/flashpunk folder and adding the SWC), it will look and play almost exactly the same but will run a bunch better thanks to the GPU support from Stage3D.

I’m An Experienced Developer. That’s Impossible.

Technically you’d be right; FlashPunk is so open to modification and there are so many ways to do things in Flash that no one-size-fits-all solution is ever going to work perfectly for everybody. But a LOT of time has gone into making Stage3DPunk work in the most common scenarios with FlashPunk games; we’ve worked with over 30 developers now so we’ve got a good idea of what common practices are in place. But you’d still be right - it isn’t 100% perfect. There are still situations which are best treated with a small amount of developer intervention - but we don’t mind this. Consider this; rather than rewriting your game in Starling or putting up with sub-par software rendering performance, you can drop in Stage3DPunk and only need to make a handful of tweaks or modifications to your game (a couple of hours’ work usually) before it is practically release-ready. It’s not perfect, that would most definitely be impossible. But it WILL save a lot of time, and in almost all of the cases we’ve come up against so far, it WILL improve performance significantly.


The Stage3DPunk project and KickBack Games have had a lot of support and some funding from our partners, FGL, and as such we want to make sure they get paid back for their investment. This simply would not have been anywhere close to possible without them, so we’ve made a deal that will hopefully please everyone.

You can download Stage3DPunk from our website right now. It is 100% free to use without any licensing concerns on desktop and web platforms. We’ve spent some time making sure it plays nicely in this scenario - if your game spreads virally to a site that doesn’t support Stage3D (a major issue with Stage3D games in general) it will automatically revert to FlashPunk mode and run like that. If you’ve tested your game in both modes you can use this to your advantage; show extra particles, perform better physics, make it look SHINIER in Stage3D mode (which is how most players will see it) – but don’t let it limit your game’s viral potential by excluding non-Stage3D sites.

If you want to release your game on mobile (and in the majority of cases we absolutely urge you to) there is a licensing system in place. Essentially it boils down to this; publish your game with us on selected platforms, and you will be licensed to use Stage3DPunk on any of the platforms we are not publishing on. Currently at the time of writing that goes like this:

Publish with us on:

  • Google Play
  • Amazon (Kindle Fire, Kindle Fire TV)
  • Barnes and Noble (Nook Tablet)
  • “Niche Markets”; (Nabi, Overseas markets, Exclusive FGL opportunities - generally stuff you would have not heard of or had any reasonable interest in to begin with)

And you can self-publish (or work with another publisher) with license to use Stage3DPunk on:

  • iOS
  • Ouya
  • Wherever else you’d like to

We feel like that’s fair for everyone; we get to pay back our investors, you get to use the engine in a win-win scenario.

Publishing? What’s That About?

As a small-time publishing company KickBack Games’ goal is to maintain a catalogue of quality, fun indie games on the above listed platforms. Again, we’ve tried to make our publishing deal a no-brainer. As developers ourselves, we did not want to rip anybody off or make anyone feel like they’re not getting a fair deal. So our publishing deal on mobile is as follows:

  • Exclusive only on listed platforms. You can publish on platforms we aren’t publishing on freely, we don’t take any IP rights or anything of the sort. Ever.

  • Use of Stage3DPunk and any of our other tools on any version of your game.

  • 50/50 revenue split. FGL’s mobile platform (which we think is VERY valuable as part of the deal, see below) takes 30%, we take 20% for our contribution, leaving you the remaining 50% of revenue. Naturally we do not claim any revenue from platforms we are not publishing on (iOS, Ouya etc) - those are YOURS ENTIRELY.

  • Use of the FGL Mobile Platform for easy ad management, cross-promotion, testing and QA, optional asset creation (icons, promo assets, store descriptions etc). This is well worth the 30% of revenue in our opinion as FGL’s powerful cross-promotion engine alone can seriously put a kick into your game’s potential. It also saves a huge amount of time; you won’t need to worry about implementing complicated advertising APIs, dealing with android hardware or worrying about writing the perfect store description, or even filling out a bunch of forms to submit your game to loads of different app stores. It’s all rolled into Stage3DPunk with a few convenient API functions (like FP.engine.showAd(), or FP.engine.requestQuit()).

  • An agent (usually myself) who will help you at every step, from testing your game on various devices for performance, to giving advice on control schemes, balancing, general gameplay feedback all the way through to handling tax forms and contracts. Don’t know what an EIN is, how to get one or why you’d want one? Need help making your tutorial more engaging? Not sure exactly how to optimise a specific function? Don’t have a couple of thousand dollars to blow on various Android devices? That’s our job, let us help.

  • All we need is an SWF. You don’t even have to worry about Adobe Air or deploying to devices or whatever.

Anything Else You Can Tell Me?

We have some example videos of some of our tools here. It includes videos about Stage3DPunk and our ‘ScreenPad’ Touch Gamepad Overlay. We have no problem publishing platformers (in fact, we LOVE platformers!), RPGs (my personal favourite type of game) or whatever. ScreenPad is dead easy to use.

Here’s our regular example of revenue breakdown from a mobile release:

Revenue Breakdown Example for B&N or Amazon

  • $3 gross sale
  • .90 to (B&N or Amazon) = $2.10 Net Revenue
  • 50% Net revenue to developer partner = $1.05
  • 30% Net revenue to FGL Mobile Platform = $.63
  • 20% Net revenue to Publisher = $.42

Revenue Breakdown Example from ChartBoost

  • $2000 in monthly ad earnings from your game
  • 50% Net revenue to developer partner = $1000
  • 30% Net revenue to FGL Mobile Platform = $600
  • 20% Net revenue to Publisher = $400

Revenue Breakdown Example from OEM flat fee license

  • $5000 fee paid for a license (such as pre embedding content onto a tablet)
  • 50% Net revenue to developer partner = $2500
  • 30% Net revenue to FGL Mobile Platform = $1500
  • 20% Net revenue to Publisher = $1000

The process for publishing a game with us usually goes like this:

  1. You implement Stage3DPunk and our API (all rolled into one SWC and a replacement net/flashpunk folder) into your game and send over an SWF (this process usually takes about 2 hours if there aren’t too many problems). Usually it’s expected that there will be a few small issues if you’re using Stage3D mode, such as some layering issues which you’ll have to tweak to fix. This is usually estimated to take up to 2 hours or so for most games.

  2. Once we have the SWF, we have a process on our end that will package it into an APK to run on our test devices. We can also provide some tools for you to test with if you have a mobile device and a ‘sandbox’ that lets you test out our API functionality (such as how ads will show, whether your game is pausing correctly with device pause, whether it is handling the device back button correctly etc).

  3. We’ll then go through a QA process to make sure it won’t get rejected by the storefronts; this generally means a member of our team (sometimes myself) will test your game for any crashes or obvious bugs, plus make sure all of the API stuff is working correctly on device. If there are any bugs that are from our API side or Stage3DPunk I will be informed (I’m the primary developer on the project currently) and will fix them for you.

  4. If all that goes well, we’ll submit it to FGL for another round of QA (which usually just passes first time thanks to our own QA above) and it should be released on storefronts within a week then.

What Next?

So if any of that sounds even the least bit appealing to you, either post here, send me a PM or get in touch through the website. We can answer any questions, concerns or whatever you may have, or if you’re not sure if your game will be suitable for mobile just let us have a play and tell you what we think. We want to hear from you, and we want to help get a bunch of kickass FlashPunk games out on mobile platforms (and make you some cash while doing it!). Let’s do this :slight_smile:


Download Stage3DPunk now. Have a play. Read this post later.

IMPORTANT UPDATE (23RD MAY 2014): Please be aware that Stage3DPunk is a separate library to FlashPunk. The FlashPunk community forums are for support with FlashPunk ONLY - if you are using Stage3DPunk in your project, please ONLY ask for help within this topic or by contacting KickBack Games through their site or myself by PM. If you do have issues that seem like they may be FlashPunk issues, try dropping FlashPunk back into your project before asking for help from the FlashPunk community!

Have you guys heard of StarlingPunk?
Converting flash game into desktop application
My game is feeling clunky
Milkman tools and alternatives
(John Andersson) #2

F*** YEAH! FINALLY, this is awesome! :slight_smile:

Now I can run my game at native 1080p! :smiley:

Just one question, if I scale the game using FP.screen.scale, then everything becomes blurry. Why does this happen? :stuck_out_tongue: And also, there is a small typo where you explain what the resolution parameter does, “iamge”

NVM @ the question: if anyone has the same problem, just set enableSmoothing to false. Cool that we got AA as well! :smiley:

(Ultima2876) #3

Oh! That reminds me, please do report any bugs or things of that nature that you find. It’s really appreciated. Thanks John :slight_smile:

(reopucino) #4

wow cool :smiley:

I will check this on this weekend

(Jay Faulkner) #5

We used Stage3DPunk for Pulser, runs beautifully at 1080 on my Nexus 4. Dave’s a really cool guy and he helped out at pretty much every stage of development. I dread to think how many hours he’s expended testing this game with me.

Congrats on finally leaving beta! :smiley:

(Ultima2876) #6

Another thing that developers might be interested in is that we’re doing a drive to publish FlashPunk games on the Amazon Fire TV (same 50/50 publishing deal as above). If that’s something that interests anyone (and it should be!) then ask about that as well!

(Jay Faulkner) #7

Especially seeing as there’s a fair amount of overlap between Fire TV and Ouya – although Ouya’s not particularly great for revenues, it’s essentially an extra platform for very little extra effort…

(Mike Evmm) #8

Sorry to go so out of topic here, but what do you mean by running 1080p?

(Jay Faulkner) #9

You can render as high as 1080p and still maintain a decent framerate (>30fps) on two year old hardware.

This is Pulser at 1080p and it renders like this on a Nexus 4.

(Mike Evmm) #10

But do you mean setting the swf window to 1080p resolution, or something else I’m missing?
(and I’m a fan of Pulser, btw)

(Jay Faulkner) #11

Hey, thanks! :smiley:

Yep, you set the swf resolution directly. We have three different sprite sizes and render to 640 x 360, 1280 x 720 or 1920 x 1080 depending on the user’s graphics preference (or a sensible default). It’d be a pain to double up on a game you’ve already made because you’d have to create higher resolution graphics for it to have any real value upping the resolution. That being said, pixel art games end up looking great with smoothing disabled and you can still take advantage of having ~10x the number of sprites on screen.

(Mike Evmm) #12

Ah I see, thank you!

(truth be told I totally suck at art, meaning I usually just resort to pixel art (thus disabling enableSmoothing) but now thanks to you I can claim it’s for performance reasons! :stuck_out_tongue: )

(John Andersson) #13

The lit lighting engine doesn’t work with this… at least not if I use stage3d… Any ideas? And why does it automatically turn off stage3d when other people test my game? The lighting engine works for them

(Mike Evmm) #14

I may be saying gibberish here, but I’m guessing it has to do with wmode="direct"?

(John Andersson) #15

I honestly can’t find that line, not with the search tools at least O.o Where is that line located?

(Mike Evmm) #16

Well, nowhere. If you’re sharing the swf using, for example, Dropbox, it’ll default to FP mode. To force S3D mode, you’ll have to embed the swf in an html file (like this!):

<object width="100%" height="100%">
    <param name="movie" value="SWF_NAME_HERE">
    <embed src="SWF_URL_HERE.swf" width="100%" height="100%" wmode="direct" scale="default"> 

EDIT:Shoot, missed a return (AKA: “body is too similar”).

(Justin Wolf) #17

If you upload to Newgrounds Dump, I believe it auto-detects whether or not your SWF file requires wmode and sets it accordingly.

(John Andersson) #18

Okay, thanks for the great info. But the problem still remains :stuck_out_tongue: The lit lighting engine doesn’t work with this!

(Justin Wolf) #19

Stage3DPunk likely has a missing feature here and there. I imagine maybe it has to do with BlendModes and how they work with Stage3D. @Ultima2876 will be able to let you know exactly why it’s not working.

(Ultima2876) #20

Hey there, sorry for the late response on this (and thanks @justinwolf and @miguelmurca for sorting out the wmode=direct thing).

It’s true, Stage3D needs wmode=direct to work. Some sites support this, others don’t, so rather than letting the game fail to run entirely like most Stage3D games do, Stage3DPunk reverts back to FlashPunk mode on sites (or computers!) that don’t support Stage3D. You can detect this using if(FP.stage3D) – this can be used to optimise your game for both cases so you can take advantage of Stage3D without cutting out some of your playerbase.

As for the Lit lighting engine, Stage3DPunk only provides support for the main FlashPunk library (as well as some limited support for Punk UI); it uses completely different rendering methods under the hood so any libraries for FlashPunk that rely directly on FlashPunk’s original rendering method will probably not work very well, if at all. I’m not familiar with the specifics of Lit but generally speaking if any class overrides the ‘render’ method it won’t work ‘out of the box’. That means most graphical libraries will be broken. If they do work, they may not work as intended or may not perform very well.

All that can be done about this is for someone (or yourself) to make a compatible version of that library (I recommend using if(FP.stage3D) and keeping the original FlashPunk-compatible code in as well!). The Stage3D part of the library isn’t documented but if someone wants to have a go they can feel free to PM me for help doing this :slight_smile:

Unfortunately I’m pretty busy at the moment so don’t have time to look into it myself!

Lit: a light engine