Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs or learn how to Submit Your Own Blog Post
Unity started off their annual Unite conference with a Flash Day, designed in previous years as a way of transitioning flash developers to Unity development but used this year to announce and discuss their own Flash build option.
We're live blogging from Unite 2011 in San Francisco, California. Day 1 is actually the day before the conference official kick off. We're there now with an initial look at the Flash player publishing capabilities coming very soon as well as a few other features arriving with the next version of Unity, version 3.5.
Flash Developers Unite!
by DAN MILLER-SCHROEDER, design3
September 27, 2011
SAN FRANCISCO, CA - Unity demoed their new Flash export capability today in the first of a four-day conference to support their developers. Unity started off their annual Unite conference with a Flash Day, designed in previous years as a way of transitioning flash developers to Unity development but used this year to announce and discuss their own Flash build option.
Flash Export Option
In the near future, Flash will join Unity's already impressive cast of build options. While the release date and price are undetermined, developer Lucas Meijer demoed a working Unity Flash build. Built off of the 3D Molehill API, Unity outputs a SWF file that can be embedded into HTML and played back as with any other Flash application.
Developers author in Unity's scripting languages (javascript, C#, or Boo) which are then translated to ActionScript and built out to SWF. This process offers many 1:1 translations (such as Unity javascript's Mathf.Random to AS3's math.random), but it also provides more complex workarounds when direct overloads and correlations aren't possible.
Many existing Unity features will be supported in the Flash build option. Whenever an existing feature can't be implemented within Unity or .NET, the ability to access Flash's implementation of that feature will be provided. RakNet, for example, will not be supported at launch, but a developer will be able to access Flash's implementation of networking instead.
The ability to author a high-quality Flash web site will also be possible, as Unity supports the abilities to create a UI completely in Flash and create callbacks into your app. In addition to a SWF file, an SWC file is output than can be imported into any Flash authoring tool. A developer can then use that tool to create a Flash UI and use sendmessage to communicate with the Unity app. This also lets developers use their own preloader screen and debuggers. Callbacks are possible using IUnityHandler in conjunction with web code.
Features that are not supported in the launch version of Unity's Flash export option include mouse lock (meaning embedded first-person shooters may have a less-than-desirable user experience), advanced audio features like reverb zones and doppler effect, and dynamic shadows. Also unsupported are anything needing depth textures.
Why Unity for Flash?
Unity Senior Developer Ralph Hauwerst brought his Flash background to the company in recent months and laid out the workflow and implementation optimizations that Unity provides over existing Flash authoring tools.
Instant-compile physics engine
Unity uses the PhysX physics engine, which is supported in their Flash export. The Unity IDE has almost zero compile time for simulating and modifying physics behavior, which stands in contrast to any number of non-visual physics engines currently available to Flash developers.
Particle Systems
Unity's particle system allows for an easy and powerful particle solution, again with instant visual feedback. Unity 3.5's upcoming particle engine update will add a curve editor to most parameters, allowing for more sophisticated control over a particle's lifespan. It will also support 3D mesh emission in addition to the current 2D plane emitter.
Custom and built-in shaders
Unity ships with 40+ shaders that support normal maps, reflective and specular surfaces, and transparency. Unity's shader language also allows for more advanced shader creation if desired. When compared to a low-level Flash shader tool like Agal, this shader system greatly reduces development time.
Built for 3D
Unity has been building a 3D engine for years and, as a result, has created tools and under-the-hood code for optimizing 3D performance. Lightmapping allows the effects of environmental lights to be baked onto textures at build time rather than calculated at runtime. Unity 3.5 will also ship with a new feature called light probes, which allow moving objects, such as player characters, to be dynamically affected by lightmapping data, emulating the effect of runtime lighting effects. Finally, occlusion culling lets developers specify areas of a level that a user can see at any given time, reducing the render load.
Editor Scripting
Unity can be viewed not as a finished tool, but as a tool you can build to your liking. The same API that Unity uses to create their editor is available to developers to modify and add tools. For example, if a team making a real-time strategy game needs to constantly add NPC waypoints, they can create a tool to let them quickly "paint" waypoints rather than place their coordinates manually.
Flash/Unity Best Practices
Hauwerst suggested developers perform certain optimizations to help their Flash applications run smoothly. Asset size should be taken into consideration, as most SWFs are running in web browsers over a data connection. The barebones Unity SWF is about 1.7 MB, and meshes, sounds, and texture sizes could send that skyrocketing if care isn't taken. Editor scripts and texture clamping can be used to optimize the build process if you're targeting multiple platforms with different technical capabilities.
Also, if possible, stress the GPU and not the CPU. This could mean that instead of animating a texture via Unity scripting, you create the animation directly inside the shader. GPU skinning currently has much lower performance on the Flash player than in Unity's web player and isn't currently recommended.
What is Unity?
Unity is a game engine that integrates many middlewares into a single "unified" software tool. It allows for development in javascript, C#, and Boo, and builds to PC, Mac OS, iOS, Android, XBox 360, PS3, Wii, a proprietary web player, and now Flash. Mainly used for video games, Unity also has applications in architectural visualization, serious games and educational simulations, and web app development.
The central concepts are "game objects" and "components." A game object is a focal point for functionality, and a component is a unit of functionality that can be attached to game objects. Components include Transforms (position and rotation), mesh renderers, colliders, and all custom scripts. By developing with this in mind, a more aspect-oriented approach can be taken rather then the conventional object-oriented/inheritance approach.
Dan Miller-Schroeder is the Content Manager for design3.com, a portal for game development and game art tutorials.
That's it for today guys, come back tomorrow for the official first day of Unite 11. The morning should be awesome, starting with the Keynote and more glimpses of the future of Unity straight from the source!
a hidden gem in Carl's presentation. Unity 3.5 contains ability to add 'button' to any game object which can be given a label and color. Makes it wayyyyy easier to identify and select objects in your scene. Nice tidbit, Carl!
Going through the basics, starting a new project and importing some standard asset packages, creating a simple terrain and dragging an dropping some textures to our scene. For a detailed guided lesson on getting started with unity yourself check out our Unity fundamentals video series.
Carl is up and starting to give an overview of the current Unity 3.4 interface and tools for those unfamiliar with it.
Modules exist in the particle system to change/add parameters such as forces, visual effects, etc.
Clarification on the mesh emitters. New system supports mesh shaped PARTICLES as well as mesh emitters - very cool!.
Allen is taking us through the process of creating a new particle system from scratch with the rebuilt particle system shipping in Unity 3.5.
Some top level big improvements are: LIVE editing, curve editor, modular based structure for better organization and more possibilities, graph view to quickly compare and adjust values. Each module is independently customizable and can be quickly turned on or off in the stack. Also include ls additional emitter shapes and meshes.
Slight change of plans, were starting with Allen, Unity Technical Artist, and are looking into the NEW particle system shipping with Unity3.5.
Unity devs are happily chatting with attendees asking a range o questions face to face. A very friendly and approachable bunch. Carl Callewaert (a previous design3 dev and friend of the site) is getting ready to take the stage.
Q&A is now over. Everyone (except us) taking a short break an then we'll be back with some Unity tutorial type insight for those familiar with Flash development. We'll also be writing up a more detailed recap of the last couple hours and posting here long form since we've surely missed the reporting of some good tidbits and more in depth technical explanations. Stay tuned!
"If you existing Flash project using Paper Vision, etc. can that just be 'upgraded' and published" Unity: that is not what this is about. If your project used source files in FBX, DAE, or other Unity supported 3d assets you can bring them into Unity and export. This isn't a flash conversion tool.
Asynchronous downloading of asset bundles will work. Question is does it make first release (meaning do they hold it up... Probably not) but soon after. Flash player is not threaded so no asynchronous drawing of objects to memory.
Unity skins on the GPU. Many skinned characters running on CPU may cause performance issues in Flash player compared to Unity web player. GPU skinning for flash is coming. Performance is looking very good - beating developer expectations so far - but they do not want to overpromise. More optimizations to come as any performance issues arrise (and before).
Reminder by Unity reps to check the Unity Asset Store. If there are features you want that aren't provided out of the box (matchmaking came up) there are lots of devs out there with solutions. <> If the solution isn't out there, make it and sell it!.
More questions about the importing graphics/movies from sources like online APIs, webcams, etc. at runtime. Use case examples include fetching Facebook friend photos during games and texturing avatars with them. Unity devs find this interesting and promise to take a look, no guarantees on timelines.
The Stage3D background layer cannot be transparent. That is not a Unity limitation. You can change it, but it cannot now be transparent..
"What options do we have for movie playback textures" Unity: Not in version 1. There are probably ways to do so..
"Knowing we want to target multiple platforms with many levels of optimizations can we designate different LODs for multiple asset types and have Unity chose the right versions per target?" Unity: For the assets this makes sense for you can create an editor script to help do this very quickly. The "Angry Bots" game has something similar that will be available to some extent.
RE: security - Flash will own the app security, security code from .net/Unity will be stripped since that *should* be redundant.
<> questions are flying by now guys. Were taking offline notes and will continue to update this blog as there are any breaks, etc..
Will we be able to import .SWC's back into Unity in future. - Unity: Assuming you want this because you want to make Unity UI's in Flash and import them in, the answer is we like/want this too, but there are very tricky business/legal issues to consider with Adobe and we (Unity) need to ensure you can continue to publish to many platforms.
A senior Unity/Flash developer asks: do you want a .FLA file exported as well for templates games or just to investigate? Crowd eagerly applauds - "OK, we can add that ability."
Audience Q&A begins.
Your SWC exported from Unity can be imported into Flash for you to create your UI within flash if wanted. But that means you will have to rewrite your UI for other Unity piblished platforms.
While Ralph fixes up his scene we're checking out the powerful editor scripting abilities within Unity to increase your productivity 'by orders of magnitude'.
Ralph Hauwersr giving the existing Flash devs out there an overview of prefabs and their advantages within Unity.
Publishing: 'Unity Content & Flash' - publishing flash player content in Unity generates HTML embed code, SWF, SWC, and swfobject. Also contains calls to communicate with player. Ralph Hauwersr, senior developer at unity for flash projects checks with crowd to confirm they are meeting developer needs and the workflow makes sense.
Good news: it looks awesome and most of the features you want and expect will be there. When Flash player publishing does ship you'll get a full sample project to orient you on your own projects. You can be sure design3 will further help make sense of what is available and provide even more to help you along.
Pricing and release info not yet available. Let's just get that out of the way right now. You'll here 'when ready' a good amount.
Things getting kicked off late and we're struggling with an internet connection but here we go: Unity + Flash!
======
UNITE LIVE BLOG
We're live blogging from Unite. Check out Day 1: http://www.design3.com/blog/item/2131-unite-11-live-blog-from-the-event-day-1
Read more about:
Featured BlogsYou May Also Like