Adobe Max 2013: Best Gaming Sessions

I recently covered an Introduction To Adobe Game Developer Tools. With excitement and momentum (created primarily by Stage3D and its Starling Framework) we see proactive, positive marketing by Adobe for gaming and the Flash Platform. The community hopes this will help keep the Flash Platform in the minds of business leaders and developers as a viable technology for new projects.

Adobe recently announced the details for the annual Adobe Max conference. Thankfully, in 2013 we see a focus on gaming.

Adobe Max 2013

Adobe MAX 2013 will be at the L.A. Convention Center & Nokia Theatre L.A. LIVE on May 4 – 8, 2013

(From Adobe Marketing:) Adobe MAX is all about creativity and expressiveness. If you create, you won’t want to miss MAX. Designers, developers, strategists, video professionals, photographers, and more all come to MAX to exchange ideas and inspiration. Together with industry pros and visionaries, you’ll learn about the latest technologies, techniques, and strategies for delivering your best creative work. Come to MAX and explore how creativity is changing the word and what part you have to play in that change. And every full conference MAX pass includes a one year membership to Adobe Creative Cloud*

Adobe Max 2013: Gaming Sessions

Here are the game-related sessions we can look forward-to;

ID TITLE DATE TYPE
L7804 Building a Platformer Game with the Starling Framework Monday 5:00 PM, Tuesday 3:00 PM Lab
L7902 Developing Multiplatform Games with the Adobe Gaming SDK Monday 12:45 PM, Tuesday 12:30 PM Lab
PB7682 Building Games with the Adobe Gaming SDK Sunday 9:00 AM Preconference BYOD Lab
PB7683 Advanced Flash Gaming Development with the Latest Adobe Technologies Sunday 9:00 AM Preconference BYOD Lab
S7802 Adobe Gaming Roadmap Monday 2:00 PM Session
S7805 Wired Up: Integrated Tools for Game Creation Tuesday 1:00 PM Session
S7862 Becoming a Successful Game Developer with Adobe Flash Tuesday 4:00 PM Session
S7904 ActionScript Game Frameworks Panel Wednesday 9:30 AM Session
S8022 Mastering Multiplayer Stage3D and AIR game development for mobile devices Monday 2:00 PM Session
S8202 Extending Mobile Games with AIR Native Extensions (ANEs) Tuesday 8:30 AM Session
S8362 Next-Generation Runtime for Adobe Gaming Tuesday 8:30 AM Session

Next Steps

Introduction: Adobe Game Developer Tools

Flash emerged as the king of casual game development platforms in the early 2000’s. After 2 key stumbles (Apple iOS announces no Flash Player in iOS browsers) and industry-wide confusion about the ‘death of Flash’, Adobe is marketing furiously to offer value to developers and spread the word.

The Life Of Flash;

  • Flash Player Running in the Apple iOS browser, is not possible. This is the ONLY segment where we saw a ‘death’ of Flash, so far. However, Flash-created apps in the iOS app store are possible, powerful, and popular.
  • Flash Player Running in the Android browser, is possible on many devices. In my opinion, it will become less popular as HTML5 matures in the next few years. However, Flash-created apps in the iOS app store are possible, powerful, and popular.
  • Flash Player Running in the PC computer browser, is popular on PC, Mac, & Linux. In my opinion, it will be continue to be popular.
  • Flash content via the computer desktop (as ‘apps) is popular on PC, Mac, & Linux. In my opinion, it will be continue to be popular.
  • Flash content via other devices (Smart TV’s and more) will continue to be popular.

The most recent effort by Adobe to push its Flash Platform technology is Adobe Game Developer Tools, announced in December 2012. Here is a recap of the highlights.

Adobe IDEs

From Adobe: You have great ideas for cool games. Now, we’re providing you with the essential tools to rapidly build, optimize, and deliver your games to iOS, Android™, Windows®, and Mac OS.

Here are the IDE’s to help you create your projects;

  • Adobe Flash Builder – Build amazing games and applications in ActionScript for Android, iOS, Windows and Mac OS X platforms using a single cross-platform development environment. Now with support for Adobe Scout. In my opinion, its best just for creating and animating assets.
  • Adobe Gaming SDK – Adobe Flash Professional software is a powerful authoring environment for creating rich, engaging games and interactive content that reaches desktops, tablets, and smartphones with unparalleled consistency. In my opinion, its best just for coding and integrating existing assets.

What is Adobe Gaming?

  • Create games faster. Reach over 1.3 billion people. – Only Adobe® Flash® Player and Adobe® AIR® let you deliver your game to 500 million iOS, Android, BlackBerry, Kindle Fire, and NOOK mobile devices and 99% of connected computers — with no additional install. One codebase. Use amazing tools and take advantage of simple, powerful APIs and frameworks enjoyed by a large and growing game developer community. In my opinion the cross-platform nature and existing community of developers are the most compelling reasons to use Flash Player & AIR.
  • Cinematic graphics. Console-quality games. – The Flash runtime now delivers GPU accelerated graphics across browsers and mobile apps for 1000x faster, stunning 2D and 3D games. Craft amazing gameplay with native mouse, multi-touch, accelerometer, camera, and mic support. Code with human-friendly ActionScript®. Or take your C/C++ or Unity games and easily target the Flash runtime. Play beautifully. In my opinion, the quality of graphics & audio what Adobe now offers is first class.
  • Make more money. And make more fun. – In my opinion, this is just marketing-speak. However there is a HUGE amount of existing Flash developers (i.e. better talent at lower costs) and the SDK’s exist to make your projects social and sales-friendly.

What are Adobe Game Developer Tools?

You have great ideas for cool games. Now, we’re providing you with the essential tools to rapidly build, optimize, and deliver your games to iOS, Android™, Windows®, and Mac OS. To get started, all you need to do is download the Adobe Game Developer Tools through a free Creative Cloud membership. If you already have a Creative Cloud membership, the Game Developer Tools are included!

Here’s what you’ll get when you download the tools:

  • Adobe Scout – Adobe Scout is a new profiling and optimization tool for Flash Player on desktop and mobile to help you get the best performance possible. (Free now, premium later, TBD)
  • Adobe Gaming SDK – The Adobe Gaming SDK gives you a complete collection of frameworks, code samples, and learning resources that work together to help you accelerate your productivity.
  • Flash C++ Compiler – Cross compile C/C++ to run your game in Flash Player with GPU acceleration. Deliver your back catalog of games to target 1.3 billion connected desktops.

What are Adobe Game Developer Tools? (Really)

Adobe is now attracting non-Flash game development companies. For that market the AGDT is a well-marketed introduction to Flash. Newbies can hit the ground running; (theoretically) using any legacy C++ code, getting started with the frameworks in the SDK, and doing powerful profiling with Scout.

For existing Flash developers perhaps none of this is interesting. There are many Flash experts who use no C++, who already have access to the frameworks in the SDK. Scout is very powerful, and indeed is worth the (unannounced) price of entry. But not every game developer profiles his or her projects or knows the great value in doing so. However, I do think that Adobe’s increasing powerful set of tools, and energized game-specific marketing will help focus the game industry on Adobe’s tools, and too, Adobe-centric game developers. That is great.

Next Steps

Stencyl for Game Development

In my years of game development, I never wished for a tool (IDE) to create games without any programming. But I recently found one.

Maybe I never thought it would be possible. Maybe I never thought the games would be good. Maybe because I knew how to code, I didn’t care. The Stencyl Toolset from Stencyl, Inc. is surprising in both its ease of use and its flexibility to create a variety of games.

But can it replace traditional game-programming? Well, let’s take a look.

Pros of Stencyl (Paraphrased from Stencyl.com);

  • Game Studio In A Box – Stencyl is a gorgeous, intuitive toolset that accelerates your workflow and then gets out of the way. In addition to the core tools, there is an included image editor called Pencyl and tile creation and editing tools for tile-based games (i.e. PacMan).
  • Show and Tell – Use StencylForge the community-based toolbox of sprites and game logic to power your projects and share your knowledge.
  • Design In A “Snap” – Drag-n-drop code like Lego-blocks. If you are a coder, I know this sounds SCARY. Check it out.
  • Test it Fast – Run quickly using onscreen emulators for rapid code-test-code cycles. TBD on my opinion of the debugging features.
  • Play It Everywhere – Publish to iOS, Flash, Windows, Mac & the Chrome Web Store. (Android / HTML5 Coming Soon)
  • Make Money – Well, monetizing games is not unique to Stencyl of course, Stencyl has monetization features but there are many Pros of using one code-base for multiple platforms.
Pros of using one code-base for multiple platforms

When and where it is manageable, I am a huge fan of using  and reusing the same project for multiple platforms. Stencyl 2.1 (current release) exports to Flash (Desktop/Browser) and Mobile (iOS). Future releases will publish to Android and HTML5.

  • Marketing dollars – Instead of marketing the game on two platforms separately, we can do it at the same time
  • Momentum – Word of mouth dictates that downloads on one platform will possibly translate into downloads on the other
  • Maintenance – We’d rather be working on the next game, than debugging two separate platforms
  • Laziness – Corona SDK has a lot of modules already built in, ie Facebook, OpenFeint

What is Stencyl?

Stencyl is a an integrated development environment (IDE), for your Mac/Windows computer. It allows veteran game developers and (especially) newbies develop new game projects without requiring other tools and without requiring any programming skills.  In addition to Stencyl, also using a few programs (such as Photoshop) to create assets and having some solid experience with both programming and game design will PROBABLY be required to create something really good.

Checkout the screenshots;

  1. Create your game assets (backgrounds and sprites) using your favorite drawing programs or download them from StencylForge.
  2. Setup your game sprites. These ‘Actors’ as they are called can be animated and controlled by the computer AI or by the user.
  3. Setup your game logic. Stencyl’s most controversial feature is the logic system which requires NO PROGRAMMING. There is comprehensive documentation to help. Check it out.
  4. Design your levels. You can drag and drop assets into a grid system or free-form layout. Whatever you like!*

* The potential to use Stencyl JUST for level creation on non-Stencyl projects has me very excited. I haven’t tried that yet, nor know if its possible. Post below if you have some ideas.

Create Assets or Use StencylForge
Setup Game Sprites
Setup Game Logic
Design Levels

Stencyl 2.x maintains separate engines for our Flash and iOS exporters. Something that the team admits has been a challenge to maintain. Stencyl 3.0 (release date TBD 2012) will use a single engine and language that exports native apps to Flash, iOS, Android, Windows, Mac, Linux and HTML5.

Getting Started

If you have setup a programming environment before (Flash, Flex, Java, HTML5), then you should find Stencyl VERY easy to setup and use. Its slick and mainstream in its ease of use from initial install through project building. If you have never used multimedia tools, it may be a bit challenging, but know that you are in good hands. Stencyl’s has some user experience (UX) hiccups, but it is, overall, very impressive.

Here are the links and tips;

  1. Download The IDEStencyl and install it.
  2. Go Through the Crash Course – After downloading Stencyl, I strongly recommend going through the Crash Course. If you’re launching Stencyl for the first time, you’ll be automatically asked to go through the Crash Course. If not, click on the Help Center button to find it.
  3. Read Stencylpedia– After you’ve made your first game using the Crash Course, we highly recommend reading through the first few chapters of Stencylpedia (up to the end of Chapter 4).Stencylpedia will teach you the fundamentals of game creation through Stencyl, in a way that poring over many example games won’t do.
  4. Inspect Free Games – You can learn a lot as a beginner by looking at the included games and free games on StencylForge. Exame the scenes, actors, and behaviors.
  5. Watch My HD Screencast Video – Watch me talk you through as I create a complete game from start through finish. (See ‘Member Resources’ below)

Making ‘FlyerGame’

To learn Stencyl, I followed my own ‘Getting Started’ steps above and then created my own complete game. I used assets and game logic from “FlyerGame”, a game that I have recoded many, many times using game frameworks. The HD Video Screencast and source assets are available (See ‘Member Resources’ below).

Optimizations

With my simple tests, Stencyl games appear to run smoothly. It’s likely that performance problems are run-time performance problems (i.e. Flash or iOS) and not necessarily Stencyl performance problems.

Recommendations;

  • Limit number of on screen actors – That’s the fundamental optimization. When not possible use ‘recycling’ (VERY IMPORTANT) which is Stencyl’s version of object pooling.
  • Limit number of collisions – Stencyl uses Box2D for its physics engine, and the more Stencyl makes use of Box2D, the more calculations it’s performing in a given frame. Since collisions means the physics engine is working, more collisions means potential slowdown.
  • Limit use of effects and transparency
  • Limit overlapping actors (i.e. actors on top of actors)

Conclusion

I like Stencyl. I applaud what they are trying to do; create a simple tool to allow newbies to create games and veterans to create more games, more easily. I think many veterans will be turned off by Stencyl as a ‘toy’, and many newbies may be too shy to give it a try. I encourage both groups to give it an honest try. Above all I’m excited for the future of gaming.

Tools like [Stencyl] are yet another sign that game development can be both a great hobby to some and lucrative profession to others. – Me.

There are some other game studios I have yet to fully review such as GameSalad and GameMaker. Stay tuned. I may review them in the future.

Wait, No programming?

I make a few mentions here that Stencyl requires no programming. Really, to be more accurate you ARE coding, you ARE programming and quite deliberately. You have to understand all of the common game logic concepts. What are are NOT doing is typing. Instead you use drop-down menus – part of a layout which Stencyl calls the “block-snapping interface”. Very pretty, helpful, & intuitive. For advanced users there is indeed a code view and programming API (both currently AS3-only). Looking at the code is not only optional, it is not encouraged.

I have some strong opinions by code-generation tools (i.e. Adobe’s Dreamweaver), but I think there is indeed a large audience that can be served well by Stencyl’s ease of use. I am impressed with its power and flexibility. While not the creators intention, I also see Stencyl as a great tool for complete game developer beginners to learn all the fundamentals and then perhaps move on to a more traditional programming environment in the near future or distant future if they have the interest. Academically, Stencyl has fascinating potential too providing a language-agnostic approach to gaming for first year students, before they have the programming skills to power their creative ideas.

In short, after testing Stencyl, my opinion of it changed from just a ‘pretty toy’ to a ‘fun and powerful tool’. The roadmap provided on the Stencyl website looks fantastic too, rounding out more publishing options and hinting at a more robust tool too. Give Stencyl 3-4 hours of your attention over a weekend. It may very well change your mind for the better too!

The license pricing;

  • 1. Stencyl 2.x – Publish Flash Games – Free!
  • 2. Also Publish Desktop Games – $79 per year
  • 3. Also Publish iOS Games – $149 per year
  • Combo of 1,2,3 – $199 per year

Developer Q&A

Since I am new to Stencyl and Stencyl is so very different then other game development tools, I met with some Stencyl developers (newbies and veterans) to understand the PROs, CONs, and any gotchas that could help newbies learn from their mistakes.

PROs

  • No coding needed (unless you want it) 
  • Helpful community
  • Cross-platform

CONs

  • “Newbies must choose between limited ‘Free’ version and expensive ‘Pro’ version” – Game Developer, Urie Wilson 
  •  The learning-curve on more complicated parts (lists, global attributes, collision shapes) can be intimidating

Gotchas

  •  “Always save your project. [Stencyl may crash]” – Game developer, Ridhwaan Patel

Misc / Advice

  • Stencyl works well with Pencyl (image editor)
  • “Start Small. Reconstruct retro projects like Tic-Tac-Toe, Pong, Pac-Man, & Space Invaders. These simple, familiar games offer many challenges to newbies.” – Game Developer, Djamel Berkaoui (aka Satyre)

Next Steps

After ‘Getting Started’ and following my HD Video Tutorials, here are more resources to fuel your Stencyl savvy.

  • VIDEO: Welcome To Stencyl – Watch the HD Screencast Video Tutorial*
  • VIDEO: Flyer Game With Stencyl – Watch the HD Screencast Video Tutorial*
  • Start with the Stencylpedia – Online. Its the instructions manual. Also checkout the blog and the product roadmap.
  • Find common answers – The forums are best when you’ve got a specific question to ask.
  • Ask a new question – The Chat Room is great for seeking real-time help.

*See ‘Member Resources’ below.

NOTE: All Member Resources are coming soon. Videos and code downloads are NOT yet available.

Member Resources

[private_Free member]Enjoy this members-only content!

NOTE: All Member resources are coming soon. Videos and code downloads are NOT yet available.

Source Code

  • None yet

HD Screencast Videos

  • None yet.

[/private_Free member]

What Is Gamification?

Foursquare, Zynga, Nike+, and Groupon are some of the brands who use gamification to deliver a sticky, viral, and engaging experience to their customers. Each understands how core game mechanics such as points, badges, levels, challenges, and leaderboards will engage your consumers with reward structures, positive reinforcement, and feedback loops. Combine game mechanics with social interaction for activities such as collecting, gifting, heroism, and status.

Advergaming – combining advertising and gaming – has been in heavy use for over a decade. It is generally a fun game with ads thrown on top. Gamification suggests a something deeper.

What is Gamification?

Gamification is the use of game design techniques, game thinking and game mechanics to enhance non-game contexts.

The term is used more and more as the mainstream accept gaming as a defacto form of media and many look to see how it can be used outside of pure entertainment. The discussion reminds me of serious games. A serious game is a game designed for a primary purpose other than pure entertainment. The “serious” adjective is generally prepended to refer to products used by industries like defense, education, scientific exploration, health care, emergency management, city planning, engineering, religion, and politics.

RMC is available and excited to collaborate on more gamification projects. With over a decade of gaming experience on browser and mobile, RMC can successfully combine the wining formula of gaming with your educational, marketing, or training needs.

Here is some more great information.

Watch Slideshow 1

[slideshare id=4363720&doc=devdaysengagementthroughgamification-100531081027-phpapp01]

Watch Slideshow 2

[slideshare id=7862680&doc=gamification5desire-110506100535-phpapp02]

Watch Videos

Links

Next Steps

Corona SDK for Mobile Development

Developing iOS apps using CocoaTouch and XCode is great. Creating games however is a challenge.The tools are just geared to app development I think.

Developing Java-based Android games seems pretty horrible all around. Java is great (powerful but not easy), but the code-test-code development cycle leaves much to be desired.

Luckily there are 3rd party SDKs that create native iOS and also native Android projects geared for gaming. One of those is the Corona SDK from AnscaMobile.

Benefits of Corona SDKfor iOS/Android Development (In AnscaMobile’s words);

  • Build Apps 10x faster – Corona’s framework dramatically increase productivity. Tasks like animating objects in OpenGL or creating user-interface widgets take only one line of code, and changes are instantly viewable in the Corona Simulator. You can rapidly test without lengthy build times.
  • Same code, multiple stores – Corona is the only complete solution for developing across platforms, OS versions, and screen sizes. You can write once and build to iOS, Android, Kindle Fire or Nook Color at the touch of a button — Corona will automatically scale your content across devices from phones to tablets.
  • Simple, powerful APIs – Make use of advanced features using just a few lines of human-friendly code. For instance, you can implement realistic physics in your game with just five lines! Corona’s ease of use is what allows developers from indies to major studios to create #1 chart-topping apps, games, and eBooks.
  • Create engaging experiences – Say goodbye to cookie-cutter apps. Whether you’re creating branded apps, graphically rich games, or interactive eBooks, Corona gives you everything you need to go beyond the ordinary. It’s easy to make your apps behave and look exactly how you want them to.
  • Cut costs. Monetize faster – Corona enables you to produce top titles without big studio budgets. And thanks to Corona’s integrated support for in-app purchases, banner ads, and offer-based virtual currency, you can monetize faster and easier than ever before.
  • Join developers like you – Corona boasts a very generous and knowledgeable community, a plethora of 3rd party tools, as well as a shared code repository where users can download and share helpful libraries and snippets with one another. We also have 347 Corona SDK studios across 47 countries worldwide

Pro’s and Con’s of Corona (In my words)

I have used Corona SDK for about 5 hours. I’m new.

  • Lua is very very fast.
  • The code-test-code cycle is the best setup I’ve ever seen. Its so fast, just save your latest lua file and *poof* the project compiles and growl (on Mac) shows an error or not and your project is already running with debug output. (Now if I can just get the LDT IDE to handle debugging. I can, soon!)
  • Lua is not OOP. Corona is not component based. Without built-in OOP or built-in component based gaming (like Unity for example), development with Corona leaves much to be desired.
  • Its 2D only (good or bad, depending on your preference)
  • No great IDE yet.
  • Graphics are raster-based – So its a fast, but not easily reusable graphics pipeline.
  • Compared to HTML5 it has good multimedia capabilities. Compared to Flash it has horrible multimedia capabilities
Developing one code-base for multiple platforms (iOS/Android) is great. As Leetr.com mentions;
  • Marketing dollars – instead of marketing the game on two platforms separately, we can do it at the same time
  • Momentum – word of mouth dictates that downloads on one platform will possibly translate into downloads on the other
  • Maintenance – we’d rather be working on the next game, than debugging two separate platforms
  • Laziness – Corona SDK has a lot of modules already built in, ie Facebook, OpenFeint

Getting Setup

The steps to get started are to download the Corona SDK, choose your favorite text editor (I’m using Lua Development Toolkit), and run Corona’s Simulator on one of the sample projects to prove you’ve got it all setup properly.

We’ll show the provided ‘Bridge’ project which is a physics demo of some circles falling on a monkey-bridge.

Here are the links to get setup and publish a sample project;

  1. Download the free, unlimited-use Corona ‘Trial’ From AnscaMobile.
  2. Download the free, standalone Lua Development Toolkit (LDT) IDE from Koneki.
  3. Run LDT. You use LDT to setup the project and edit the code, but NOT for Corona code completion, NOT to compile and NOT to debug. I’m confident that all of that is possible, but I’m not yet sure how.
  4. Right-Click the ‘Script Explorer’ and choose ‘New Lua Project’
  5. Name it ‘Bridge’, choose ‘Create Project…’ and point to local url on your machine for ‘CoronaSDK/SampleCode/Physics/Bridge/’ where you installed the SDK.
  6. Open ‘CoronaSDK/SampleCode/Physics/Bridge/main.lua’, by clicking it in the ‘Script Explorer’. Don’t edit it. Just look at it.
  7. Run the ‘CoronaSDK/CoronaTerminal.app’ (on Mac). It will open terminal and also the Corona Simulator.
  8. In the Corona Simulator choose ‘File -> Open…’ and choose ‘CoronaSDK/SampleCode/Physics/Bridge/’. This will run the Bridge project in the Corona Simulator (an onscreen iPad emulator) and show any debugging output in the terminal.
  9. Done.
  10. Now without closing the Corona Simulator or the Corona Terminal, edit the ‘CoronaSDK/SampleCode/Physics/Bridge/main.lua’ file. Add the line ‘print (“hello”);’  without outer quotes and save the file. Upon save the Corona Simulator and Corona Terminal will automatically re-run the project. Nice!

Hello World Project

Typically a Hello World program illustrates the quickest way to get anything (such as text) onto the screen and publishing (or compiling) without errors.

In this post I have also added a few things. We see classpathing (‘com.rmc….’), a custom super class, and examples of publicity and privacy for class members.

The Project Output

Here is the example running. Corona’s included device emulator (“Simulator”) is in iPad mode. Other modes are available.

Debugging: Corona shows your debugging output too (using Terminal for example on Mac OSX). Simulator & Debug Window

The Project File Structure

Corona has many great demo projects included. Each project sits in its own folder. All files for a project sit within without using subfolders. I read on several blogs that while the Corona simulator allows for subfolders, that iPhone and/or Android does not. There are workarounds.

A development environment that does not allow for folders is ridiculous & irresponsible. – Me.

You’ll see my examples all feature a folder structure. For now, they run in the Simulator and that’s all I care about. I assume full folder support will come at some point in the future. If not, you can remove the subfolders from my demos before you start your final code.

HelloWorldOOP File Structure

Document Class

Lua doesn’t support OOP. Corona doesn’t support OOP. However it is possible to fake it.

I learned a good bit from Ludicroussoftware.com’s post, and JesseWarden’s post. There is more info about scope too.

The document class is the main entry point for your application. By default the builder looks for ‘main.lua’, and runs it. It is a required file and it kicks off the run-time of your project.

The lua file format shown here is my own creation. I use it for the main.lua file and then within any ‘classes’ which I create.

[actionscript3]

————————————–
— Imports
————————————–
local TemplateClass = require ("com.rmc.projects.helloworldoop.TemplateClass");

————————————–
— Metadata
————————————–

————————————–
— Main Entry Point
————————————–
display.setStatusBar( display.HiddenStatusBar )

–CLEAR OUTPUT
print ("");
print ("");
print ("  ——————-  ");
print ("  — HelloWorldOOP —  ");
print ("  ——————-  ");
print ("");

–CREATE
local templateClass = TemplateClass:TemplateClass();
print ("    samplePublicVar    : "..templateClass.samplePublicVar);

–TEST MEMBERS
local samplePublicMethod_str = templateClass:samplePublicMethod();
print ("    samplePublicMethod_str           : " .. samplePublicMethod_str);

[/actionscript3]

1. Imports

There are no true ‘imports’ in Lua, nor in Corona. The ‘require’ statement fetches a separate lua file and includes it in the current lua file. In my usage this essentially ‘imports’ the custom ‘class’ of ‘TemplateClass’.

2. Metadata

While not shown here in main.lua, within some classes there are ‘module’ statements (and others?) that help Corona/Lua know how to treat the current file. I call this ‘metadata’.

[actionscript3]

————————————–
— Imports
————————————–

————————————–
— Metadata
————————————–
module (…, package.seeall)

————————————–
— Class Methods
————————————–
— PUBLIC STATIC
–[[
This method is designed to…
–]]

————————————–
— Class Properties
————————————–
— PUBLIC STATIC
–[[
This property is designed to…
–]]

————————————–
— Class
————————————–
–[[
This class is designed to…
–]]
function TemplateClass()

————————————–
— Properties
————————————–

— INSTANCE
–[[
This is a self-reference required by OOP structure
–]]
local me = {}

— PUBLIC
–[[
This property is designed to…
–]]
me.samplePublicVar = "samplePublicVar";

— PRIVATE
–[[
This property is designed to…
–]]
local _samplePrivateVar = "samplePrivateVar";

————————————–
— Constructor
————————————–
–[[
This is the constructor…
–]]
function me:constructor()

–TRACE
print ("TemplateClass:constructor()");

–METHODS
me:initialize();

–RETURN
return me;
end

————————————–
— Methods
————————————–

— PUBLIC
–[[
This is the initialize.
–]]
function me:initialize()

–TRACE
print ("TemplateClass:initialize()");

–DRAW

end

–[[
This method is designed to…
–]]
function me:samplePublicMethod()

–Test Private — It Works!
local _samplePrivateMethod_str = _samplePrivateMethod();
print (" _samplePrivateMethod_str : " .. _samplePrivateMethod_str);

return "samplePublicMethod";
end

— PRIVATE
–[[
This method is designed to…
–]]
function _samplePrivateMethod()
return "_samplePrivateMethod & ".._samplePrivateVar;
end

————————————–
— Events
————————————–

— PRIVATE
–[[
This event handler is designed to…
–]]
function _onSampleEvent()
return "_onSampleEvent";
end

— RETURN INSTANCE VIA CONSTRUCTOR

return me:constructor();
end
[/actionscript3]

1. Class Definition

In my solution I place the ‘TemplateClass’ class in its own ‘TemplateClass.lua’ file and treat it like a Lua ‘module’. You can see in ‘main.lua’ how I import and create an instance of ‘TemplateClass’.

2. Static vs Instance Members

The instance members in this demo work great. I had static methods and static vars working too, but broke them somehow. I have removed them from this demo. I’m confident is possible.

3. Publicity / Privacy

The instance members in the demo feature full, working publicity and privacy. Nice.

4. Inheritance

I have not included inheritance in this demo, but it is possible. I’m working on a simple game that I will post soon. I have 3 generations of inheritance going on and it works FAIRLY well. For my onscreen objects I extend using ‘display.newGroup()’ as a base. It is a bit ugly how to override methods (See the Ludicroussoftware.com link above), but it works. I’ll post that in the future.

The Output

[actionscript3]
Copyright (C) 2009-2011  A n s c a ,  I n c .
Version: 2.0.0
Build: 2011.704
The file sandbox for this project is located at the following folder:
(/Users/srivello/Library/Application Support/Corona Simulator/HelloWorldOOP-27E895459A9154336232E091AB34F950)

——————-
— HelloWorldOOP —
——————-

TemplateClass:constructor()
TemplateClass:initialize()
samplePublicVar : samplePublicVar
_samplePrivateMethod_str : _samplePrivateMethod & samplePrivateVar
samplePublicMethod_str   : samplePublicMethod

[/actionscript3]

1. Output Tool

By default the output comes through your Terminal (on mac). There is setup to get the output to come through Lua Development Tools (or other Eclipse based editor with the Lua Plugin). Once you build once, you leave the terminal and emulator open and just edit and save your code as you like. With each save, the simulator AUTOMATICALLY reruns the app and the terminal shows the output. The ‘build time’ is 100 Milliseconds or so. The speedy iterative development is great.

2. The Output

You can see in the output example above, the first few lines are outputted by Corona itself, then your custom

Conclusion

I created this demo as part of my evaluation of various mobile programming languages (Lua) and development environments (Corona SDK and Lua Development Tools). Coming from a (objectively speaking) really really spoiled development environment of Flash game development, I have the same basic gripes with Corona as I do with HTML5 gaming. The language (lua) is not fit for OOP. It is not intended to do so. Lua and Corona are indeed LIGHTNING FAST both at compile-time and at run-time. That is fantastic and cannot be under-stated.

The Corona SDK community is growing and offering some add-ons;

  • Lime – Tilebased gaming
  • PubNub – Multiplayer Gaming API
  • More community projects…

And now a few tangents…

Do I Need OOP?

No. But for me an implied architecture (implied within the built-in language features) of OOP or component-based development greatly speeds up development for me. I’m able to get more feedback from the IDE and reuse code more effectively. Many developers prefer procedural programming. I’m not sure why. If you have an opinion please post below. We will see TONS more gaming built upon the horrible limitations of JavaScript. If you love JavaScript, that is great. For me its not the right tool for game development.

Some OOP Solutions for Corona;

Upon a quick look, each appears to be valuable. Not sure which is the most full featured yet. In the future I may create a demo of each for comparison’s sake and blog about it.

Do I need a strong IDE?

Yes. I’m dumbfounded by developers who defend using text-edit as their tool of choice. Sure there is an warm-fuzzy feeling about being so ‘raw’. But an honest appraisal of your productivity will trump that if you are a serious contributor to your industry. Spend a few hundred dollars, spend a few thousand dollars on performant hardware and legally-licensed software designed for your productivity. Be a professional.

Game Development Environment Utopia

In my research in gaming technologies (Many, many HTML5 frameworks, Flash Platform, Unity3D, iOS, Android, Cross-platform iOS/Android), I am evolving an idea for the ideal game development setup. This list will probably change over time. The dream is a setup that works for small game projects and can scale up to large team projects.

  • Fast Code-Test-Code Cycles – Under 1 second allows for optimal iterative development
  • Fast Run-Time Performance – Stable 30 frames per second or greater across target devices
  • Great IDE – Project creation, project compilation, project debugging (breakpoints, stack/heap introspection), intellisense on built-in and custom libraries, etc..
  • Strong Typed Language – Implicit intent in your design, IDE-feedback/errors/auto-fixes, generics, deep refactoring, etc…
  • Scalable Graphics Pipeline – To facilitate multi-screen development. Vector source with run-time conversion to raster seems to be the best setup yet for 2D. Streaming textures is ideal for 3D.
  • Implied Architecture – OOP (ex. Java) and/or component based (ex. Unity3D)

Stay Tuned

  • I have created a complete game using Corona. A tutorial, HD Screencast Video, and full source code are coming soon.

Questions for the Readers

  • Do you a better OOP setup? Fork my code and push a solution. Great!
  • Know how to setup LDT to show debug output and breakpoints? Post a comment below!
  • Can you setup LDT to show intellisense (auto complete) for the Corona SDK classes? Post a comment below!

New Corona Book Released!

Packt Publishing has published a new exciting book on Corona SDK – Corona SDK Hotshot!

If you’ve used the Corona Software Development Kit to build your very first new mobile app, you already know how easy it makes developing across all the pieces of this fragmented market. This book upgrades your knowledge of Lua and the Corona API with designs, habits and advanced concepts to speed your development and create more exciting apps.

Corona SDK Hotshot will show you how to combine advanced Lua features such as coroutines and metatables with Corona’s sophisticated tools, including physics and networking, to develop exactly the game or app you or your customers need, quickly and with an eye towards updating your app with improvements in the future.

Corona SDK Hotshot will expand your basic knowledge of Corona with an insight into making the most of its event platform, using physics wisely and easily, and moving on to advanced programming tasks like path-finding.

You will focus heavily on how to keep your programs understandable as they become more complicated, by using modules and events to divide it up. You’ll practice ways to make AI scripts and map files easily understandable to designers and other collaborators, and use networks like GameCenter to publish progress.

The last projects will combine the full range of covered material to illustrate how you can produce sophisticated and exciting apps as a Corona Hotshot!

Using a project based approach you will learn the coolest aspects of Corona SDK development. Each project contains step- by-step explanations, diagrams, screenshots, and downloadable materials.

Get the book here: http://www.packtpub.com/corona-software-development-kit-hotshot/book

Next Steps

  • Hello World – Download the full source code*
  • Hello World OOP – Download the full source code*
  • Hello World OOP – Watch the HD Screencast Video Tutorial*
  • Checkout More Tutorials on LearningCorona.com (Fantastic!) and DesignerSandbox.com

*See ‘Member Resources’ below.

Member Resources

[private_Free member]Enjoy this members-only content!

Source Code

HD Screencast Videos

[tubepress video=”43251034″ embeddedHeight = “350” embeddedWidth = “550” showInfo = “false”]

[/private_Free member]

Will HTML5 Ever Catch Up to Flash on Features?

While reading Transitioning.to, a blog ‘Supporting the Flash Community’s Diversification into New Technologies’, I came across a good post about Flash vs. HTML5.

I shudder at the constant comparison and the partisan callousness on both sides. The article was indeed good, but I wanted to clarify something. When I hear the title question “Will HTML5 Ever Catch Up to Flash on Features?”, I rephrase it a bit. Will ‘HTML5′ (Meaning HTML5 + JavaScript + CSS) and community libraries for each, and developer-friendly IDE’s, create a cohesive replacement that runs predictably across browsers for what is offered by the technology of the Flash Player.

Well, will HTML5 do it?

I say yes, and no.

HTML5 Is Open

I’m underlining here the fractured nature of the HTML5 offering. I think HTML5 is awesome. It can do so much, it performs so well, and as a developer I love that it ‘compiles’ in 1 second instead of 5 or 10 or more with Flash. I think that the low level capabilities we see in HTML5 on Chrome (for instance) facilitated by a useable library (such as a game framework) could cherry pick most any feature offered by Flash and create compelling feature-parity. It could create competition feature per feature. However it is more correct to ask and more challenging to expect that that one feature-set to easily play with some other set of features created by some other developer for another library perhaps focused on another platform or device. HTML5 is by its nature spread more thin than the ‘closed’ Flash System. This allows for more freedom in what the community can do but also places a huge responsibility on the community.

As a game developer, there exist, today, HTML5-based game engines which present an compelling alternative Flash. Some are playable only on the hottest latest browsers, some can also be packaged to mobile ‘apps’ and offered in mobile marketplaces, and some need some time before they can be played by enough people. Depending on the target audience (and their browsers and devices) the feasibility of using a game framework may or may not be viable yet.

What I suspect is that based on early adoption, solid bug and new feature management, and good marketing several of these game frameworks will mature and become defacto choices for game development. But then the question is not – can HTML5 ‘catch up’ to Flash, the question becomes – can ‘Game Framework X’ catch up to Flash.

As a quick aside, AS3 for OOP developers, is a dream compared to JavaScript. Sure, both will mature, but I’m unsure a wholesale improvement in JavaScript is technically or politically possible.

There is news of ActionScript 4.0 though;
http://www.rivellomultimediaconsulting.com/actionscript-4-revealed/

Relevant to this issue, I have recoded one simple, complete game using many (13 as of today) different game frameworks. Check out all the source and learn from it. Its all available free and it is ideal for those who are interested in transitioning.to.

FLYER GAME, ONE GAME, MANY FRAMEWORKS
http://www.rivellomultimediaconsulting.com/flyergame-one-game-many-many-frameworks/

Alternativa3D Engine for Adobe Flash Goes Open Source

The Alternativa3D 3rd-party 3D engine for the Flash Platform recently announced it is going open source after 6 years of closed development. An example of this kick-ass engine is the recent release of LastStand Deadzone for Facebook.

The source code is published on the GitHub, and support can be found on the Knowledge Base and community discussion can be found on the forum.

No concrete reasons are given for the change to open source.

The Alternativa company hopes that the community will continue to use and extend the engine. It hopes this is only the beginning of a new life for the engine.

Going Open Source (Is Not Evil)

Going open source is interesting. Open source is the philosophy which promotes free distribution of a code-base and the community involvement to modify that code-base. Many AS3 projects start as open source and I think the general reception is ‘wow, thanks for starting this project, I may use it, and maybe I’ll even help extend it’. However the community response seems to be quite different if a close project exists for some time as a closed project and then goes open source. It feels to many like the project which was ‘created for my use for free’ now has been ‘abandoned’.

The community reaction to the Adobe Announcement that Flex went open source was strongly negative. Same when the popular Pushbutton Engine was recently rebranded as the community-based ‘Smash‘ game engine.

These fear based reactions are reasonable. The feeling is that what was once taken for granted as a concrete cared-for project now has a questionable future. However like most fear based reactions they are not beneficial reactions.  Project owners are free to chose if/when they release a project open source, and the community can care for a project or choose an alternative. The power is in the hands of the community.

Conversely, and open source project that becomes closed and introduces fees to the community (I have no examples of that) is indeed sad. But that is not the case here.

Stay Tuned

What do YOU Think?

  • Is going open source good or bad?
  • Please comment below.

Adobe Flash Player Premium Features for Gaming

So…

On March 28th, 2012 Adobe Announced “Adobe Flash Player Premium Features for Gaming“. Adobe will have new pricing for those creating certain types of advanced content. Content that is much more performant and of much higher quality than what developers (and their end-audience) are used to seeing in the browser.

It is my estimation, that the amount of current projects that this pricing will affects is very small. The amount of developers now or in the future that this pricing will affect is very small. However overreaction and misunderstanding about Adobe, this announcement, and the last 6 months of related news does have a negative affect on public perception, business owners, and the technologies chosen for new projects.

Before the community takes it out of context that “Adobe explains that in the near future, some developers will be required to pay Adobe on royalties from their projects” and overreacts about it — here is a clear programmer-friendly explanation shown below.

Who Pays?

Image URL: http://www.RivelloMultimediaConsulting.com/wp-content/uploads/2012/03/adobe_flash_player_premium_v1.jpg

How Much?

Let’s assume a company (or individual) creates a royalty-applicable project (see above). Here are a few sample payment scenarios to Adobe. If my math is wrong, please send a comment below. Prices are USD$.

  • 50,000 revenue (or less):  Payment to Adobe = 0
  • 75,000 revenue:  Payment to Adobe = 2,250
  • 100,000 revenue:  Payment to Adobe = 4,500
  • 500,000 revenue:  Payment to Adobe = 40,500
  • etc…

Community Reaction

Using Google, Twitter, and Facebook we see the reaction of the community over this announcement. The gross majority of media, bloggers, and developers are exaggerating the effect of this announcement. I appreciate the anger, but not the libel. Many err to say something like ‘all Flash developers will pay Adobe soon’, which is as we I’ve outlined here, not true.

The few balanced reactions to the announcement are here;

Full disclosure: Some of those listed are of course Adobe employees or have an otherwise vested interest in Adobe’s side.

Related Posts

Stay Tuned

The Vocal Minority

Bad press will hurt Flash being chosen for new projects. That I agree with and that is sad. Blame the messenger sure, but also blame the sensationalism of the community.

Truly, relatively few developer’s projects are affected directly by this pricing. And the quality offered by ‘Flash Player Premium’ is different than what is currently considered ‘Flash’ and is so high-quality that there are no rival alternatives to in-browser technologies. Don’t agree..

  • Please comment a  link to any ‘Flash Player Premium’ project (Using BOTH API’s mentioned, regardless of revenue) which is in-development or already launched?
  • Please comment a link to any in-browser non-Flash project that rivals the quality of a ‘Flash Player Premium’ which is in-development or launched?

What do YOU Think?

  • Is this good or bad? Remember taxes pave your roads. Ha.
  • Please comment below.

FlyerGame – One Game, Many Many Frameworks

I wanted to test out a few game frameworks learn more about AS3, Unity, HTML5, and other platforms. Here is a complete list of many, many versions with full source code (See ‘Members Resources’ below).

UPDATE: A new contender in the HTML5/JavaScript gaming space is phaser.io. I may add a demo to this page soon. Leave a comment if you’d like to see it.

Articles

I wrote ‘Flyer Game’ for a series of articles I wrote for Adobe’s “Inspire” (formerly ‘EDGE’) online magazine. To appreciate the HTML5 versions of the game, its great to look back at the general game theory as well as the Flash theory shown in these articles.

Downloads of FlyerGame

I provide full source-code to several versions of the FlyerGame. You can compare how each works, and learn more about gaming frameworks that way.

[nonmember]
FLASH VERSIONS

  • 1. Flash Pro and AS3 (Very Simple) – [Download in ‘Members Resources’ below]
  • 2. AS3 and PushButtonEngine (Component-Based) [PBEv1] – [Download in ‘Members Resources’ below]
  • 3. AS3 and PushButtonEngine (Component-Based) [PBEv2] – [Download in ‘Members Resources’ below]
  • 4. AS3 Stage3D [Starling Framework] (Very Simple) – [Download in ‘Members Resources’ below]
  • 5. AS3 Stage3D [Starling Framework] (OOP Version) – [Download in ‘Members Resources’ below]
  • 6. AS3 and Smash Framework – [Download in ‘Members Resources’ below]
  • 7. AS3 and Flixel (Coming soon!)
  • 8. AS3 and FlashPunk (Coming soon!)

OTHER VERSIONS

  • Unity3D w/ C# – [Download in ‘Members Resources’ below]
  • Loom w/ LoomScript – [Download in ‘Members Resources’ below]

HTML5 VERSIONS

  • EaselJS Framework – [Download in ‘Members Resources’ below]
  • ImpactJS Framework – [Download in ‘Members Resources’ below]
  • CraftyJS Framework – [Download in ‘Members Resources’ below]
  • MelonJS Framework – [Download in ‘Members Resources’ below]
  • Spaceport.io Framework – [Download in ‘Members Resources’ below]
  • LimeJS Framework – Github Source (Coming soon!)

[/nonmember]

Next Steps

  • Wow, there is so much content here!
  • Are you new to gaming? There is tons of gaming basics in this posts and code.
  • Are you a veteran? Learn to compare/contrast each framework for yourself using the source code (See ‘Member Resources’ below).

Member Resources

[private_Free member]Enjoy this members-only content!
FLASH VERSIONS

OTHER VERSIONS

HTML5 VERSIONS

  • EaselJS Framework – Github Source (Simple, like #1 above)
  • ImpactJS Framework – Github Source (Simple, like #1 above)
  • CraftyJS Framework – Github Source (Component-based like #2 above)
  • MelonJS Framework – Github Source (Simple, like #1 above)
  • Spaceport.io Framework – Github Source (Simple, like #1 above)
  • LimeJS Framework – Github Source (Coming soon!)

[/private_Free member]

Polls

[polldaddy poll=6052370]

Intro To The AS3 Smash Game Framework

After years of experience with PushButtonEngine from the PBLabs company, they released PushButtonEngine 2. PBE2 was a quantum improvement on PBE1, but PBE2 had a short life before being rebranded as Smash. It is now available at Smash.io and I have completed a simple, complete demo game.

By default most game developers use inheritance-based architecture. Make a class and fill it with method-based functionality, then subclass and subclass to create a hierarchy (e.g. PlayerClass, EnemyClass, ItemClass etc…) of concrete classes. This has drawbacks which I outlined in article I wrote for Adobe “Developing Flash Games with the Pushbutton Engine“. It is a good read and still is relevant to how Smash works.

I love component-based gaming. This means functionality is added as classes within an entity and is contrary to inheritance-based gaming. Its a bit of a mind-bender when you first start, but the benefits become obvious to most developers during his or her first project.

Quick Overview

Core features:

  • Small core. Just 4 central classes to learn.
  • Dependency injection. Wire game logic together.
  • Component-based object model. Build complex game objects from simple components.
  • Groups, sets, and object lifecycle. Track your game objects safely and avoid resource leaks.

Extended features:

  • Battle tested main loop. Keep your game flowing even on the lamest of netbooks and mobile devices
  • Debug Console. Log and command your code from a familiar command line interface.

Next Steps

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]