Category Archives: ActionScript3

Adobe Playpanel shows the best in online gaming

Playpanel from Adobe is a desktop application that automatically bookmarks all the Flash games played in your browser. It is a perfect tool for online and social game players because it helps to discover new games and also see what others are playing.

image2

What’s convenient about the app is that it silently runs in the background capturing your gaming behaviour without you having to manually do anything. The app captures information such as the games you’ve played, the game links, publisher information, the date you last played the games, number of times you played them etc.

The app is also browser independant, so you could be playing a game in any browser and it will automatically make it available in your Playpanel game list. I tried it with Google Chrome, Firefox and IE and it worked fine.

Playpanel requires you to login with either your Facebook login or Adobe login. I think this login compulsion could have been avoided because not everyone is comfortable inputting their login details. But then looking at it from a product perspective, it also needs to reach out to a wide audience through Facebook invites and virality through game sharing, so it can’t be avoided.

image1

The feature I like most is the discovery of new games from the “Discover Games” tab. This list contains high quality games from well-known publishers. The games are divided into Featured games and Popular games. The featured games are hand picked by the game editors while the Popular games are chosen based on their ratings by other players. You too can rate/comment on these games or see what others have commented about it before you start playing it.

image4

A feature called “Pinning” games helps to pin games which are then made available to your Facebook friends. You can also see what games your friends have pinned, thus collaborating with them on a multiplayer or social game mission.

It almost feels like Playpanel is like a mobile app store, the only difference being, the games are free and played in a desktop browser. Also, with so much gaming content out there it is almost impossible to know what to play or not to play. An app like Playpanel just makes it easier to identify good content.

However, it’ll be interesting to know how much further this product will evolve. One feature that I can think of is arranging games according to genres. Another is showing “similar games” thumbnails on a particular game details page. Also, it will be nice to have the game details page show whether the game is cross-platform.

With Adobe focusing heaviliy on HTML5, will it also serve as a future platform for those games? Just a food for thought!

Mariam

At the NASSCOM Game Developers Conference

ngdc stage

Another year of the NASSCOM Game Developer’s Conference, India has ended. Another year with a better turnout than the last! What a way to celebrate the gaming community of India.

The NASSCOM Game Developer’s Conference (NGDC as we call it) took place on the 15th and 16th of November 2013 at the JW Marriott at Pune. Located right in the hub of the Pune university area, the location is better connected than the earlier one in Pune city and probably encouraged more to attend the event.

The conference had 3 simultaneous tracks focused on Indies, Business and Technology. There were also workshops on Unity development, Game Design, Mentorship by industry experts, BYOG (Build Your Own Game) and Nasscom Gaming Awards.

I went to the event not just as a delegate but also as a speaker. As delegate I attended a lot of the indie talks. My favorite was the talk by one of the founders of Simogo. With just two people in their company, they have done some amazing games. Their postmortems were precise to each game but it was great to see their unique game mechanics.

A workshop for Unity got me introduced to working with 2D on the new Unity 4.3 platform.

Another good talk was by Martine Spaans from Gramble.com on Best Practices for Publishing Mobile Games in the Western Market. While some of the points were known from the best practices materials available online, the presentation was good with points from personal experience.

Interesting it was to attend the Crowdfunding and Kickstarter session by Pyrodactyl Games because they are a success story on Kickstarter from India for their game Unrest.

I spoke about Adobe AIR games on Multiple platforms. The presentation was basics of Adobe AIR but there was so much to share when talking it – Tools, Scout, Stage 3D, Starling, Native Extensions, Feathers UI, Away3D and it just goes on. I hope the audience (a lot of them non AIR developers) could understand it well.

The best the conference had to offer was meeting old friends, colleagues, twitter friends and networking with new people. Waiting for the event to repeat the success next year!

Mariam

Build a URLRequest with headers of multipart/form-data content type with ActionScript

BitmapData

 

 

 

 

 

 

 

Posting an image on a platform which requires it to be of a ‘multipart/form-data’ content type is different from posting a URL link of an image or sending an image as binary data.

For example, both Flickr and Facebook APIs require the ‘multipart/form-data’ type for uploading images and in the latter case I never realized it because there was an existing Facebook API which was doing the work behind the scenes.

Incase of Facebook, if you are using the Facebook Actionscript3 SDK for posting images to your own wall, you are required to convert your image into a ByteArray and then use the API to POST the image. The classes that handle this are the FacebookRequest.as, AbstractFacebookRequest.as and PostRequest.as, but as a developer you may never know of these classes or use them directly.

For instance the code below captures a Movieclip from the stage as a bitmap, encodes it as a PNG and then uploads it to your Facebook wall using the Facebook Actionscript3 SDK.

In my case I did not have any SDK or classes to work with this particular content type. That’s when I read about the UploadPostHelper.as class written by Jonathan Marston. It is an old class written in 2007 so it needed minor modifications to work with today, but nonetheless, it served the purpose of building a POST request with properly formatted headers required by the server to interpret the content of multipart/form-data type.
Assuming if I had to rewrite the code to post an image to Facebook without an SDK, the code below would work just as well.

Write to me if you want the UploadPostHelper.as class with the changes I’ve made to it or have suggestions to work with image data.

Mariam

Box2D for Flash Games – Book Review

Box2D For Flash Games

Box2D is a highly popular physics engine. Its popularity lies not only in it being a free open source engine, but also because it has many features to produce realistic physics effects in games. It has also been used by many popular games across the mobile and web.

Flash is one of the supported platforms, therefore this port of Box2D has become almost a priority for many game developers wanting to use realistic physics with AS3. The book “Box2D for Flash Games” written by Emanuele Feronato is therefore a great resource for understanding of the Box2D physics concepts and getting your hands dirty with actual game development.

The book dive starts with basic examples without going too deep into the engine theory. Every new line of code added to the examples thereafter is further explained in detail. Concepts such as friction, density, primitive and complex body types, shapes and collisons are all covered . The chapters then take a step by step approach towards developing actual game levels from popular games such as Totem Destroyer and Angry Birds.

I personally follow Emanuele Feronato blog and know that he comes with tremendous experience in gaming. He contributes to the community with his gaming articles and this book only lets him share more refined and in depth information with his readers.

 

Stop That Silly Chicken game for iPad

Stop That Silly Chicken

With the successful release of “Stop That Silly Chicken”, it is heartening to say that the game was developed using Adobe AIR for the iOS platform.

Stop That Silly Chicken is currently available on the iPad and iPhones. The game uses Milkman Games native extensions for social media and advertising. It also uses a native extension for in-app alerts.

Silly Chicken is a character owned by 9X Media, a brand providing entertainment on television through their various music and cartoon channels.

The game concept revolves around Silly Chicken who runs around a kitchen table in a quest to steal and break the eggs kept safely in a bowl. The player has to tap Silly Chicken before he reaches the table. The player can collect game coins from piggy banks and use them to make purchases from the game store that will make it easier to trap Silly Chicken. The game has 2 modes – Survival and Time mode and both are easy to understand and play. The game is completely free using an advertising model with Admob.

I’ve been reading the comments of the players since its release and glad to see it being liked. It seem that the idea of tapping Silly Chicken and seeing its reactions through different animations is funny for many.

Please download the game if you haven’t already and spread the word about it!

Mariam

The story of Adobe AIR and game development

Will Flash ever be able to get rid of it’s tag of being a quick prototype and animation tool? In India where we have a large developer base working on small games and animations for the web, the stereotype that a lot of people hold about Flash will probably always stay true.

Whenever the word Flash appears, people expect magic and quick turnaround times with development. At such times, the fact that “Flash” is going to be used for a more a sophisticated development on limited memory devices is completely ignored.

Whenever we begin work on a game on iOS or Android, my first suggestion is that if technology is not a restriction, we can provide game development services using the Adobe AIR platform. Most of the times there is never an argument on that because we are trusted to know our work well and deliver projects according to the brief given to us irrespective of the framework or tools.

The trouble comes when I explain what Adobe AIR really is. The fact is that Adobe AIR is a cross platform runtime using Flash and AS3 to write applications across platforms. But on hearing the word “Flash”, there is an instant expectation of quick results even for complex games.

So I’m sharing a list of of points that I felt kept coming up during AIR development on mobile/tablet game.

  • Development with AIR may be familiar ground because of AS3, but the development workflow is the same as with other technologies, especially with good OOPs practices.
  • There are plenty of frameworks available which provide support to Adobe AIR to enhance game development. A developer who wants to give the best to the project considers the time he/she will be spending on including those frameworks in the game.
  • Development of game logic or controls is not about copy pasting code from different places. Each game logic has its flow and limitations which cannot be solved by existing code (unless if it is a port of a game owned by the developer).
  • Mobiles have limited memory. There is a possibility of the game taking up too much runtime memory thus leading to crashes and low frame rate. Optimization of code and graphics is top priority when developing for non-web platforms.
  • Sprite sheets, no matter how much fun they may be to work with, are not easy for replacing the graphics in a game.
  • Compilation of game for devices take time. The workflow of deploying and debugging a game on devices is a time consuming process.
  • Comparison to an existing game is fine, but assuming that the game could have been developed in 2 days and wanting the same time frame for a new game development is an unheard story.
  • Any existing game code of a web game cannot be picked and pushed on Adobe AIR. If the game was developed using AS2, the process of converting the code to AS3 is tedious. What’s even more tedious is optimizing badly written code.

I’m ranting about the way game development with AIR is thought of by some people in India and it really saddens me to think they take it for granted. I know this will change over time, but till then we have to bear the brunt and keep educating people about it.

Mariam

Working with Debug Mode in Starling with Box2D – AS3

I recently started work on a Box2D game project using Starling, and one of my concerns was getting the debug mode to display correctly.

Box2D is a very popular physics engine. It has a debug mode which draws shape outlines, defines center of mass and shows joint connectivity, all very useful while debugging shapes behavior in a physics world. Debug mode is also very useful during prototyping when artistic graphics are not ready. Box2D has its own API but still uses native Flash objects and events.

Starling on the other hand is a game framework developed on top of the Stage3D APIs which helps write fast GPU accelerated games without having to access the Stage3D APIs. The Starling API is very similar to native Flash AS3.

Once a Starling stage instance is created, all display objects subsequently become part of this core Starling instance.
Since Box2D uses native Flash Sprite, the best way to work with Starling is to add a native Flash sprite on top of the Starling stage instance. I’ve given a quick example of how this will work in the example below –

The PlayGame Class is where the Starling framework is initialized. Within the PlayGame class, the Box2D debug sprite instance is defined. The Box2D debug Sprite instance is a native Flash and not a Starling class.

The Box2D class

Adobe ships Flash Player 11.4 and AIR 3.4

Adobe has released the new version of the Flash Player 11.4 and Adobe AIR 3.4. The runtimes have a list of new features, enhancements and bug fixes. Adobe has also upgraded the technology behind the AS3 Reference for the Adobe Flash Platform (ASDoc).

The updates to the runtimes are very critical, especially for mobile development. I had filed a bug about using the Adobe Native Extension (ANE) with Adobe AIR 3.3 on iOS some weeks back. Hoping the new release would be easier to work with ANE.

Flash Player and Adobe AIR Feature List

ActionScript 3.0 Reference for the Adobe Flash Platform

Mariam

Flash Facebook Cookbook Review

Facebook IS building the social web! It has more than 800 million active users and connects more than 500 million users monthly on its Facebook Platform through devices, apps and websites (source Facebook Statistics).

With such a huge demand for content on the Facebook Platform, the requirement for developers has also grown, thus leading to more learning material being available; material especially related to tips, best practices and simple guides to help one progress with the platform.

One of the newest resources for Facebook Developers is – the Flash Facebook Cookbook by James Ford. I received a copy of this book and decided to write a short review for it while reading it.

The Flash Facebook Cookbook contains around 60+ recipes for integrating Flash applications with the Graph API and Facebook. The recipes are simple and start with the basic explanation of Facebook and Flash integration. It graduates to moderate and complex examples such as News Feeds, working with the photo albums, uploading pictures, working with events and integrating HTML5 geolocation capabilities etc.

The book does not expect the developer to know the Facebook platform, but does expect some knowledge of working with Flash Builder and the Flex framework. It uses the Facebook Actionscript 3 SDK available from Github. Apparently this version is supposed to be more community driven than the official Facebook Actionscript SDK supported by Adobe and Facebook on the Google Code repository. I’ve always worked with the official version of the SDK, so I didn’t try using the Github version with the receipes.

I think it is fair to say that the book is a good resource for Facebook development on the Flash platform for the web and desktop. It does not cover the mobile platform, although a refined developer will be able to adapt the knowledge gained from this book to multiple Flash supported platforms.

Mariam