Unity3D Exports To Flash Contest Winners

As EDGE online reportsTail Drift has been selected as the winner of Unity’s Flash In A Flash Creation Contest, which tasked entrants with porting Unity-authored games to Adobe Flash.

Developer Cameron Owen has won $20,000 for his flight-based arcade racer, which was selected ahead of more than 500 fellow entrants.

Unity Technologies‘ Flash development lead Lucas Meijer said: “Not only is Tail Drift incredibly fun, but it also shows off both the amazing technology and fast development capabilities of Unity.

“It’s extremely gratifying to see the development community adopt and take off at such a rapid pace with the new beta, and we can’t wait to see the stellar work that is still in store.”

CEO David Helgason added: “This was a thrilling contest for all of us at Unity. Our engineers have created some terrific technology for the Flash platform and it’s truly inspiring to see so many developers adopt and create such amazing games so quickly.

Runner Ups

Three games were named runners-up, and the developers of each receive $1,00, Unity Pro with iOS Pro, and an iPad 2. A further six games  get Unity Pro with iOS Pro.

Honorable Mention

Las Viditas – Comparing ActionScript 3.0 and 7 Rules for Biological Life

Las Viditas (The Little Lifes) is an exploration project which compares ActionScript 3.0 programming concepts and structure to the 7 criteria for biological life.

You can see the Live Online Demo. I originally presented this project on a fantastic 360|Flex sponsored 7-Day cruise in the Caribbean several years back. What a great event! Finally, its all available now online..

I always find it fascinating to compare the technical world and the biological world. There is even an area of technological innovation where engineers study animals to influence new robotics designs. Here is a great Ted.com video of Robert Full Learning From Gecko Lizards. In my simple demo I learned a lot too, and am inspired with many game ideas too.

See Screenshot

The ecosystem on the right is the “petri dish” where the green viditas grow and move. There intelligence guides them to eat the blue ‘food’ and bounce off the walls. As they eat, they grow. As they starve, they shrink. Too much time without food, and they will permanently die.

Experiment with the settings and see how the population’s survival rate changes.

The sliders on the left allow for several changes such as;

  • Simulation Speed
  • Viditas Population Size
  • Food regeneration frequency
  • Food amount that is created each distribution

Watch Slideshow

[slideshare id=11770278]

Next Steps

  • Run the Live Online Demo.
  • Download the full source code (See ‘Member Resources’ below).

Member Resources

[private_Free member]Enjoy this members-only content!

[/private_Free member]

HTML5 Framework – Sencha’s Ext JS 4 HelloWorld

In a recent article I overview the major community/commercial projects in HTML5 for HTML5 Game Frameworks as well as HTML5 App Frameworks. One of the app frameworks I listed there is the Sencha Ext JS 4 Application Development Framework. This post serves as a tutorial to get you started.

The full source code and 3 HD Screencast Video are available far below. For general questions. please comment below. For RMC’s Consulting services, please contact us today!

Before You Start

Before you follow along with this tutorial you’ll need to setup the development environment for Sencha. This includes a web browser, a web server, and a text editor (or code IDE). I’m using a Mac Computer  w/ Chrome Browser, Mac Web Server, and Komodo Edit. I’m new to Komodo Edit and cannot yet recommend it.

Follow the setup instructions here in the Sencha Getting Started docs.

1. Hello World For Application Development

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 a Sencha component (Viewport), Sencha classpathing (src), a custom super class, a custom subclass, and an example of a mixin class (which allows for something like multiple inheritance).

The Project Output

Here is the example running. I show it running in both Desktop browser and iOS (through an emulator I have – provided by Apple, not Sencha). Sencha also offers a ‘Sencha Touch’ library that is built specifically for mobile. I’m NOT using that here. I’m just using the mobile browser to show (not-specifically-mobile) HTML5 content. Works pretty good.

Debugging: In the chrome window, its clear that the bottom is using Chrome’s Built-In View->Developer->Developer’s Tools which Sencha outputs to very nicely.

In Chrome on Mac

In iOS (Via Emulator)

The Project File Structure

Sencha’s official getting started recommends some (optional) folder structure. I choose something I feel more comfortable with here;

The Entry Point

You can see the index.html loads 3 external files.

[gist id=”1894698″]

1. Styles

I’m using the default CSS I found in some basic tutorials. I have not yet added/edited any styles. In the future I’ll study more on what’s possible.

2. Libs

There are a few choices that ExtJS gives you out of the box, each with their own distinct advantages or disadvantages. You only need to use one.

Here is a rundown of each of the files.

  • ext-all-debug-w-comments.js – Debug version of the entire framework, with comments. This is the largest file of the bunch and requires the most processing to display in browsers.
  • ext-all-debug.js – Same as above, but without the comments. Still very large, but very good for debugging in most cases.
  • ext-all.js – The entire framework concatenated and minified. Debugging is impossible with this file, so it should be used for production systems only.
  • ext-debug.js – This file contains the Ext JS foundation and white-space. With this file, you can remote load all of Ext JS as needed, and it provides the best debugging experience. The tradeoff is that it’s the slowest.
  • ext.js – The minified version of ext-debug.js.

3. App

The app.js file is the entry point for your custom code. It is where you put all your custom stuff as well as the ‘src’ folder and the ‘assets’ folder.

Within my custom code I show off a few interesting things;

Components

I have not dug deep into Senchas Component library but DAMN there are many good looking components. There are components for Accessibility, Grids, Charts, Tabs, Windows, Trees, Layout, Managers, Drawing, Drag and Drop, Toolbars, Menus, ComboBox, DataView, Forms, MVC, and more!

Here is a simple example of a ViewPort (basically a 100% 100% canvas within-which you can put panels or other things).

[gist id=”1894732″]

Classpathing

Sencha has a nice way to separate your code into classes and your classes into packages. The root of all your packages is your source folder or your ‘classpath’ in Adobe Flex parlance – if you are familiar with that. Classes/packages help greatly with both organization and debugging (breakpoints and errors show you (more) clearly where the problem is).

First we configure one (like here) or more classpaths

[gist id=”1894577″]

And to load and use a class from the main app…

[gist id=”1894638″]

I read in the documentation that the process is called ‘dynamically loading’ of classes. Coming from Flex, I thought ‘dynamically’ meant something really special. But it doesn’t. It means this ‘feels just like Flex  – Classes can import each other as needed, and then you just run the program’. Since JavaScript does not natively support OOP development just about every HTML5 framework requires the developer to use some framework-level conventions to mimic OOP. In the case of Sencha it seems to work quite nicely.

Here is the super class.

[gist id=”1894665″]

Here is a subclass which extends that super class.

[gist id=”1894679″]

Here is a mixin class which the subclass uses.

[gist id=”1894685″]

2. ExtJS MVC Template

If you enjoyed (and understood) the ‘Hello World’ example above, here is something more advanced for you.

In the spirit of the Robotlegs MVC Templates I created for AS3/Flex projects, I created an ExtJS MVC Template.

The idea of the template is to create (and later evolve slightly) a polished, simple example of an MVC app. This can serve as a starting point for all new ExtJS projects. MVC is a popular methodology to separate the model (data), view (user interface stuff), and controller (the ‘what’ that happens when you click UI and stuff).

The app features a simple ui with ‘load’ and ‘clear’ buttons. The load (See ‘Figure 1’) button from the view communicates to the controller which loads data from the model into the view. Clear works in a similar way (See ‘Figure 2’). Its very basic, but illustrates some key concepts about Sencha.


Figure 1.

Figure 2.

Checkout the full source code and 3 HD Screencast Videos (See ‘Member Resources’ below).

Conclusion

As part of my evaluation of HTML5 App Frameworks, I need to look at some other frameworks before I give an educated opinion. However, I’m happy with what I see in Sencha. The language looks good, the styling appears to be very flexible and robust, and the components (from a user’s perspective) look and feel great.

Some things I’d like to do next; I may try to make a blog reader app to load xml, parse it and populate a data grid as a future project with Sencha. I’d like to create a more complex OOP example which includes private/public members and fires events. All of which I know how to do, but have not documented yet. I’d also like to create a Sencha Touch demo or 2, which I think will be 99% identical code, but more suited for running on mobile as an app rather than the demos above which are for web browsers.

Next Steps

    • Hello World – Download the full source code*
    • Hello World – Watch the HD Screencast Video Tutorial*
    • ExtJS MVC Template – Download the full source code*
    • ExtJS MVC Template – Watch the HD Screencast Video*
    • For general questions. please comment below. Thanks!
    • For RMC’s Consulting services, please contact us today!

*See ‘Member Resources’ below.

Member Resources

[private_Free member]Enjoy this members-only content!

Source Code

HD Screencast Videos

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

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

[tubepress video=”39857830″ embeddedHeight = “350” embeddedWidth = “550” showInfo = “false”]
[/private_Free member]

The Future Of Apache Flex

Flex has been open source since the release of Flex 3 SDK. What’s so different about what you are announcing now? Now Adobe will no longer be the owner of the ongoing roadmap. Instead, the project will be in Apache and governed according to its well-established community rules. After the announcement from Adobe about handing Flex over to the Apache foundation, the community Spoon project (open source effort to contribute to Flex) announced its views on Apache Flex. As an active Flash Platform Developer at RMC I am excited, but there are uknowns about the future of Flex.

The New Apache Flex Branding

The image above shows the winning design. It looks really great! See more versions of the winner design here. It is now the official logo for the Apache Flex project.

Some other Apache Flex logo design entrants that I really like are here;

Five Questions

These are my best guess based on things read online. They may or may not be true.

  1. Is Adobe still committed to Flex? Yes. We know Flex provides a unique set of benefits for enterprise application developers.  We also know that the technology landscape for application development is rapidly changing and our customers want more direct control over the underlying technologies they use.
  2. Does Adobe recommend we use Flex or HTML5 for our enterprise application development? In the long-term, we believe HTML5 will be the best technology for enterprise application development. We also know that, currently, Flex has clear benefits for large-scale client projects typically associated with desktop application profiles.
  3. Is Adobe still committed to Flash Builder? Yes. Flash Builder will continue to be developed and Adobe will work to ensure Flex developers can use Flash Builder as their development tool with future releases of Flex SDK.
  4. What guarantees can Adobe make in relation to Flex applications continuing to run on Flash Player and Adobe AIR? Adobe will continue to support applications built with Flex, as well as all future versions of the SDK running in PC browsers with Adobe Flash Player and as mobile apps with Adobe AIR indefinitely on Apple iOS, Google Android and RIM BlackBerry Tablet OS.
  5. You said Adobe is committed to Flash Builder – what exactly does that mean in the context of future Flex SDK support? Future versions of Adobe Flash Builder will continue to provide code editing, compilation, debugging and profiling support for Flex applications. Adobe will undertake the required work to ensure Flash Builder is compatible with future releases of Flex SDK.

The Big Question

  • Isn’t Adobe just abandoning Flex SDK and putting it out to Apache to die?  Absolutely not – we are incredibly proud of what we’ve achieved with Flex and know that it will continue to provide significant value for many years to come. We expect active and on-going contributions from the Apache community. To be clear, Adobe plans on steadily contributing to the projects and we are working with the Flex community to make them contributors as well.

Flex vs. HTML5

So we see Adobe has a vested interest in both Flash Platform technology (Through Flash Builder, Flash Professional, and Flash Player) and HTML5 (Through Dreamweaver, and upcoming Muse and EDGE tools). So let’s take a quick look at Flex advantages.

Flex has now, and for many years will continue to have, advantages over HTML5 for enterprise application development – in particular:

  • Flex offers complete feature-level consistency across multiple platforms
  • The Flex component set and programming model makes it extremely productive when building complex application user interfaces
  • ActionScript is a mature language, suitable for large application development
  • Supporting tools (both Adobe’s and third-party) offer a productive environment with respect to code editing, debugging and profiling

In Summary…

I love the Flash Platform and I’m excited for the future of HTML5. I’ve worked mostly with Flash and Flex over a dozen years as a designer, developer, and consultant. It offers mature tools and a powerful OOP language to create great content. While I’m excited as always to learn more alternative platforms, I’ll continue to prioritize Flash and Flex development as long as I have clients contacting me and paying a premium for my Flash and Flex projects.

Resources

HTML5 App Frameworks

HTML5 allows for great in-browser app development. Recently, I wrote a few Great HTML5 games and on the Pros and Cons of HTML5 for gaming. Overall, the potential is high, but issues with browser compatibility, immature tools, and lack of elegant OOP and architecture will slow the progress of HTML5 for gaming.

For HTML5, I’ve found many frameworks to support application development in the browser. Many also have IDEs to help development and other (non-browser) publishing paths such as iOS/Android.

Fundamentals of HTML5

We probably all forget that HTML5 means “Hyper Text Markup Language”. Its a formatting language that allows for linking (hyper). Version 5 is here, but will not be finalized for a few years (2014?). So what is version 5 and why are people so excited?

Well, ‘HTML5’ technology is really a combination of 3 key technologies. All are free to use, standardized, and far more powerful than previous versions. So people are excited. Also many people are using mobile to access the web. And mobile web usage is increasing really fast. *AND* because mobile browser was created more recently (and thus not limited by historic limitations in computers and the related bureaucracy, *much* mobile web browsing TODAY is compatible with HTML5. All good things.

The Challenges of the New Platform

Software Developer Jesse Warden points out the following; The issue, however, is that it’s not that straightforward. There are 5 main issues that the HTML/JS/CSS stack (which I’ll here after refer to as the HTML stack), have when coming from the Flex platform in a consulting context (there are more, but these are the ones that matter with regards to the context of this post). They are:

  1. DOM as a dynamic display technology
  2. JavaScript lacking mature language constructs (Most frameworks have built-in workarounds)
  3. There are larger problems for multiple Browser Vendors to solve
  4. the industry’s libraries & frameworks are young from an Enterprise context (yet not!?)
  5. The Video Codec Issues
  6. Tooling

HTML5 ‘Frameworks’

Above HTML5+JS+CSS, a framework adds a consistent library of actions, events, and UI. We generally hope that a framework can be powerful to meet our needs, fast to meet our development deadlines, and flexible to allow us to customize and extend the framework to meet our particular needs and fringe cases.
Types of frameworks (sometimes they overlap

  • HTML5 Framework– Low-level, flexible, but not specific for app, game, or mobile development. Runs in an HTML5-enabled browser
  • HTML5 Game Framework– High-level and game specific. This is ONLY good for game development. Runs in an HTML5-enabled browser. See this awesome post Flyer Game for HTMl5.
  • HTML5 App Framework– High-level and app specific. This is ONLY good for game development. Runs in an HTML5-enabled browser
  • HTML5 Mobile Framework– This is generally an ‘app’ framework PLUS it may allow you to publish to ‘native’ device languages and handle finger ‘touch’ events, accelerometer and other mobiles-specific features.

Table of ‘HTML5 App Frameworks’

Framework IDE? Video Site API Docs
SproutCore No Site Video API Docs
PhoneGap XCode Site Video API Docs
KendoUI No Site Video N/A Docs
Axure Yes Site Video N/A Docs
JoApp No Site Video API Docs
Sencha Yes Site Video API Docs
M Project Yes Site N/A N/A Docs

Resources

Deep Dive Into Each Framework



Hello World for Sencha’s Ext JS 4 HTML5 Framework
– Full Source Code and HD Video Screencast

Next Steps

  • I wanted to test out a few frameworks for HTML5 to learn more. Check back soon for a review of the best frameworks.
  • Please add any comments or suggestions below…

RMC Is Recording “AS3 Tutorials with Cocktails”

AS3 Tutorials with Cocktails

I am planning some new videos. See the mindmap. The goal will be a code-only (no slides) screencast I as I code and talk improvisationally. Each bullet point will be addressed quickly with a working example and without much context or background. The tutorial videos and code samples will be cocktail themed (beer, wine, Gin & Tonics) in terminology and graphics. Why? Why not.

Watch!

Suggestions

  • What would you suggest I add to the EXISTING topics? What NEW topics would you like to see? Please comment below this post.

Suggestions for topics to add to these tutorials?

1. AS3 Language Basics
2. AS3 OOP With Cocktails
3. AS3 Flash API With Cocktails
4. AS3 3rd Party API’s
5. AS3 Language Advanced With Cocktails

MindMap of Topic Ideas

[mindmeister id=”137010594″ height=”600″ width=”600″]

Want More Video Tutorials?

[polldaddy poll=5983808]