Stage3DPunk and mobile publishing with FlashPunk


(Ultima2876) #1

Hey there everyone,

I’m here to make everyone aware of a potential opportunity for publishing FlashPunk games on mobile with great performance (and perhaps more importantly, minimal time required on your part!).

For the last few months we’ve been working on a drop-in replacement for FlashPunk that enables Stage3D rendering with efficient batching and support for a 1:1 render (in most cases) with regular FlashPunk games. As you might know if you’ve tried deploying your FlashPunk games to mobile with AIR, performance is awful - most games barely scrape 15fps on a Nexus 7 tablet. With Stage3DPunk, simply dropping in the library and changing a couple of lines of code allows these games to run at 30 fps or more (some games can even run at 60!).

The engine is still in development but we’re currently in a beta testing phase. Basically, if you have a FlashPunk game that might work well on mobile, we’d love it if you could get in touch. Head over to http://www.kickbackgames.com for some more details. This is all in the pretty early stages still; we’re working on getting some videos together to show just how easy the process is and some comparisons of performance with regular FlashPunk vs Stage3DPunk on mobile.

Thanks for your time, we’re looking forward to opening up the mobile space as a platform for some of these fantastic FlashPunk games that are floating around!


Mobile Performance And Optimisation
(Max Marze) #2

Is this going to be something available to everyone or is this going to end up being a service? I would love to be able to use this when I get to the mobile stage of development.


(Alex Larioza) #3

I’d also love to see this as an open-source library once it is complete. :smile: The small studio I work for now uses FlashPunk as our engine, but we’re thinking about switching to something else so that we can deploy on mobile devices.


(Ultima2876) #4

Hey guys,

Currently it’s provided as a part of the publishing deal with KickBack Games; however we think the publishing deal is quite good. As developers ourselves we feel we’ve kept our roots in mind and drafted the best deal around for FlashPunk developers.

Firstly, there are no upfront fees like with many publishers - a lot of publishers like to decrease their risk by charging the developer $500 or whatever upfront. We (along with all the other FGL publishing partners) don’t charge you anything up front and are only interested in revenue shares. Depending on the game we occasionally offer an up-front advance as well to reduce the developer’s risk - a big part of this is that FGL wanted to move the mobile space more into the developers’ ballpark as opposed to having to have tons of cash to inject into a game.

Secondly our revenue sharing is on the higher end compared to other publishers. We generally share 50/50 after the store takes their cut, though it depends on the game (sometimes we ask for a bigger share depending on how well we think the game will do, though this is rare and we haven’t actually done this yet). In our experience as developers this is a pretty decent revenue share for a mobile publishing deal - some publishers will take up to 70%.

As publishers we obviously do what we can to distribute and promote your game and help make it a success (including creating the art assets for the storefronts - a surprisingly often overlooked and vitally important part of selling a mobile game!). This means that you’re far more likely to generate sales, just as with any publisher, than if you were to self-release the game.

Finally we’re actually very flexible about the exclusivity of the license. One of the key points is that we focus on the Kindle and Nook stores along with a bunch of other niche ones that you’ve likely never heard of. These are probably storefronts/devices that you weren’t planning on targeting at all anyway, and most people don’t even consider them very lucrative. While we can publish to Google Play and iOS for you (or assist you in doing so), it’s entirely optional - and the best bit; provided you allow us to publish on the Kindle and Nook you can still use the engine to put out the best version of your game on Google Play and iOS if you choose to do it yourself. The license for the engine covers doing this on a per-game basis.

We do actually plan on making the engine open source eventually, but there has been significant investment in the project from an outside source and we want to be sure we at least pay the investors back before we open-source it. Yeah, we could do it via a KickStarter or something, but we also want to help a bunch of games see success along the way! Two birds with one stone :smile:

If you have any further questions then please shoot us an email from the contact page onsite!


(Max Marze) #5

Do you have any examples of its performance that we could see? I would love to deliver some flashpunk games to mobile but I don’t know if I see a benefit of using your option over porting it to haxepunk or even starlingpunk myself.


(fedyfausto) #6

i think this is a plugin for use our code withour modify in mobile


(Ultima2876) #7

We’re currently working on some videos to show off the performance boost it gives along with the process to get it working, but basically unless it’s a very complex game (hundreds of sprites on screen at once) or badly coded (loading new graphics into memory constantly is a big issue, as with any Stage3D engine - though there is stuff built into the engine to help) it’s pretty certain that the game will get 30fps or more on most devices.

HaxePunk or StarlingPunk would in most cases give better performance but they would also be a lot more work to get going (along with a few other disadvantages). The major problem is that some features are simply implemented completely differently… and one is an entirely different language. Stage3DPunk was designed from the ground up to have the exact same interface and render 1:1 with the original FlashPunk, so you can literally paste the code into your game, add an SWC to your library and go. That’s minutes of work instead of days or weeks.

Another advantage is that it’s really easy to switch back to ‘regular’ FlashPunk rendering for your web release, meaning the game doesn’t have to use Stage3D for the web. If you were to make a new game in Starling or StarlingPunk, Stage3D then becomes a requirement for release on the web which will limit your viral and sponsorship potential (Genome2D also has this feature, called a ‘software rendering fallback’ – but you’d need to learn a whole new architecture and engine to use that!).

If you’d like to demo it yourself then get in touch! We can provide a demo version of the library that you can deploy yourself, with your own game - it runs for 10 minutes on unlicensed titles and will allow you to evaluate the engine.


(fedyfausto) #8

i send an email with a beta old of my game, but if we have a FP game it’s easy convert it in this new engine?


(Ultima2876) #9

In some cases it does depend on the game; currently we’re in beta so there are a few features that are still in development (mainly the Canvas, TiledImage and TiledSpritemap classes). There are also a few things that are just flat-out impossible to support with good performance in Stage3D (FP.getBuffer), so they’d need to be worked around yourself.

However, in about 70% of the games we’ve been testing with simply dropping the engine in over the old FlashPunk code and adding the SWC has been enough to get the game running at 30fps on the majority of devices. The actual step-by-step instructions included with the lib are as follows:

SUMMARY OF STEPS:

  1. Make a new copy of your whole project

  2. Delete old net/flashpunk (make sure you know about any changes you’ve made to flashpunk classes)

  3. Drop in and add SWC to your library

  4. Set up compiling to FlashPlayer 11.1 or better and AIR 3.2 or better

  5. Test. This is regular FlashPunk mode - make sure everything is working here first. If not, you need to fix your game code so it works as before!

  6. Enable Stage3D mode in Main.as (Engine subclass)

  7. Test again. We’re still in beta so let us know about any problems so we can fix them on our end!

Note; there is an example project included to help you get started. The ‘Main.as’ for this example project is included separately as well; for many games you might be able to drop this Main.as in and tweak a few lines to get things going.

Hopefully by the weekend we’ll have a few videos up on the site to show this in action, and to show the kind of performance we are getting on mobile devices.


(fedyfausto) #10

where is this swc? :slight_smile:


(Ultima2876) #11

Because we’re currently in a beta phase you have to get it directly through us. We’re very keen to work directly with developers and get a lot of feedback at this stage so that when we do release publicly it will be as stable as possible!


(Amidos) #12

That’s looks promising :smile: just want to know does your engine have vector shapes drawing (running fast on mobile) like filled circle and hollow circle :smile: Thanks in advance :smile:


(Ultima2876) #13

Currently that’s not a supported feature - it has support for the majority of the FlashPunk classes (except Canvas, which is in development) but no extended support for vector drawing, unless you draw the vector shape into a BitmapData then create an Image from that. Note that if you do that every frame though, the game will be incredibly slow - you’d need to precache all of your graphics upon level loading and do it that way.

We do plan on possibly adding MovieClip/Sprite support eventually, though getting libraries like PunkUI working are our current priority - as well as eliminating any bugs!


(fedyfausto) #14

i’m waiting this library :3


(Jason Pickering) #15

Hey guys, Jason here. I have been working with stage punk engine for the past 2 - 3 weeks and its been pretty good. I launched my own game, Relic Rush, using original flashpunk. It wasn’t terrible performance wise, but it had much worse frame rate on the higher end devices with larger screen resolutions. Luckily because this uses stage it gave an instant boost to my frame rate. Also they have been pretty good about changing some code for simplicity sake for mobile optimization. Adding stuff like recycle list to save memory and easily recycle entities. Also the auto scaling to fit screen size means you don’t need to worry about each individual device size (iOS is easy, android is impossible).


(fedyfausto) #16

paste the download link :v:


(Ultima2876) #17

Please be advised that if you’re on our waiting list (which you are, fedyfausto) it’s because we’re currently implementing a round of updates and you’ll be sent the library with the next round of developers.

We’re working closely with developers while this is in beta which means we can only extend it to a certain amount of developers at a time; please be patient while we get around to sending it out to you!

Suffice to say, all of our developers have been advised that they are not allowed to distribute the library themselves while it is in beta :wink:


(Draknek) #18

What happens when it’s out of beta?

Will it be publicly available?


(Ultima2876) #19

Initially it’ll still be specifically for use by developers who publish with us; currently the deal is that it’s freely available for them to use on any other platforms (eg Google Play/iOS) as long as we’re publishing on at least the Nook/Kindle markets. But long-term our plan is to release it fully publicly, possibly open-sourcing it. Before we do that we’ll have a publicly available trial of the engine (hopefully within the next month) so that developers can have a go with it and see if they want to continue with it and work with us to publish their game.

Since the publishing deal is hopefully going to be considered very good and most developers aren’t planning on releasing their current FlashPunk games on the Nook/Kindle/Other niche FGL markets (preferring to target Google Play and iOS, if anything), we think this is a good deal and a win-win situation. A lot of investment has gone into this project (specifically to make it almost completely compatible with the existing FlashPunk engine - the ‘drop in’ part) we want to make sure to pay our investors back before we can consider options such as open-sourcing the engine. We also offer a deal that is on-par with the other FGL publishing partners; we don’t charge anything extra for the use of the engine or any sillyness like that, so our deal is going to be better than any other FGL publishing partner for FlashPunk users.

Basically, our primary goal is to help port FlashPunk games that devs didn’t even think they’d bother to release on mobile due to the effort involved. With the drop-in engine it’s a lot quicker to port these games that would otherwise just sit and stagnate. Secondary to that is enabling developers who are really comfortable with FlashPunk to continue to develop with it, without worrying about whether they will get decent performance.

We’re also currently working on some exciting speciality publishing deals. More on that when it’s a little more developed!


(John Andersson) #20

Okay, so 309 days have passed! Where is this awesome library :smiley: I’d really want to incorporate stage3d so I can use lighting without getting worse performance