21
Oct
stored in: iOS and tagged: , ,

I’ve been tinkering with Swift, Apple’s new programming language, over the last few months. It’s a really neat programming language and probably isn’t that far off what ActionScript 4 would probably have become if it had ever seen the light of day. While Objective-C can look complicated and confusing, Swift is very easy to get up and running with. In fact, those from an ActionScript or JavaScript background will probably find programming in Swift to be great fun. I know I have.

For me, blogging is a great way of learning. I find writing tutorials to be a particularly good way of pushing myself. So two months back I set up a new blog named Yeah But Is It Swift? It’s a tutorial site aimed at those wanting to learn Swift. I don’t plan to post as frequently to it as I do with this blog. Instead I’m planning to post about six significantly sized tutorials over the next twelve months. Hopefully it’ll be a good resource for anyone who comes to this blog but wants to start dabbling in native iOS development.

The initial three or four tutorials that I’m writing are part of a guide that will get you up and running as quickly as possible. The first two of those tutorials are already live:

Part 1 covers the following:

  • How to work with playgrounds
  • The basics of the Swift programming language
  • Grouping multiple values into a tuple
  • How to work with optionals
  • String fundamentals
  • Control flow

While part 2 covers:

  • More detail regarding strings
  • How to work with arrays and dictionaries
  • Control flow with while loops and the switch statement
  • How to work with enumerations

I’m still undecided whether having a separate blog for these tutorials is a good idea or not. For the time being I’ll keep it separate but I may bring the articles directly into this one in the future. I’ll see how it goes. Anyway, let me know your thoughts and happy programming folks!

14
Oct

The next Flash Online conference takes place at 12:00pm (UTC+0) on Thursday the 16th of October and it looks like it has a star-studded line up of speakers. Here’s the list:

  • Chris Campbell: Update on recent releases and roadmap
  • Chandra Prakash: VideoTexture support on iOS
  • Neha Gupta: Adobe AIR Cross Promotion service
  • Ajay Kumar Shukla: What’s new in Flash Professional CC
  • Rob Bateman: Away3D
  • Josh Tynjala: Feathers
  • Daniel Sperl: Starling
  • Ariel Nehmad: Flare3D
  • Zwetan Kjukov: Redtamarin

It’s great to see a heavy presence from Adobe again. I’m really looking forward to Chandra Prakash’s presentation about iOS video texture support, and Neha Gupta covering AIR’s recent cross promotion service.

There’s some great Stage3D coverage too. From a 2D perspective, Daniel Sperl will be talking about the Starling framework, and Josh Tynjala will be on hand to cover the latest with the Feathers UI library. Away3D and Flare3D are probably the two most popular 3D libraries so it’s great to see that Rob Bateman and Ariel Nehmad will be speaking too.

Finally, Zwetan Kjukov will be covering the latest development with his redtamarin project, which aims to support the use of ActionScript 3 within the command-line. Essentially the project will let you run ActionScript 3 as a server-side solution.

Looking forward to it.

11
Oct

Adobe just released an update to Flash Professional CC and there are some nice additions.

WebGL

I’m personally delighted that Flash recently gained support for WebGL and it’s good to see some more WebGL features arriving with this update. You’ll now be able to write frame scripts directly within Flash, which makes adding interactivity to your timeline animations much easier and more natural. There’s code hinting too, making your JavaScript coding easier thanks to contextual suggestions.

Sound is now supported within WebGL documents too. You can import audio files and embed them directly within the timeline. Alternatively you can play audio at runtime by importing audio files into your library and assigning linkage IDs to each.

Finally, some optimisations have been made to ensure that your content publishes faster than before.

If you’d like to know more about Flash’s WebGL support then check out my tutorial: An Introduction to Flash’s WebGL Runtime API.

Intel x86 Support for AIR for Android

Good news for any AIR developers who target Android devices. Flash Professional now supports packaging of AIR applications for Intel x86 based devices. This was obviously a major blocker for many AIR developers, and while the AIR SDK itself had been updated to support Intel x86 devices a while back, Flash Professional was still using an older version. So it’s certainly good to see Flash Professional targeting a newer version of the AIR SDK.

Custom Brush Support

The previous release saw the introduction of variable width strokes. This time it’s the Brushes tool that’s had a makeover. You can now create new brush types and customise them from the Properties Inspector. The shape, angle, and flatness of your brush’s nib can be edited along with the smoothness of the lines you draw with it. It’s a welcome addition that’s sure to go down well with illustrators.

Animation Guide Support

A few interesting updates have been introduced to motion guide layers. You can now draw a guide path using a variable width stroke, with the stroke’s width being used to control the scale factor of the clip attached to the guide path. You can also do the same by creating a guide path consisting of multiple connected uniform strokes of different sizes.

It’s also possible to control the colour and alpha transparency of your objects in a similar manner. Simply draw multiple connected lines and curves of different colour and alpha values. As your shape tweens over each part of your guide layer, its colour will change to reflect that of the guide path.

Import SWF Files

Back by popular demand is the ability to import SWF files into your library. It’s once again possible to bring assets from a published SWF into your FLA and work with them in a primitive manner within your timeline.

Custom Platform Support

The October update introduces probably the most significant new feature to come to Flash in quite some time. Custom Platform Support allows third-parties to create their own document types for Flash Professional that can then publish to platforms that aren’t native to Flash. Plugins are written using a C++ API that provides access to Flash documents in the form of a DOM.

Basically these plugins will enable designers to create great content in Flash that can then easily be exported to other target platforms such as Unity, Marmalade, Cocos2d, Starling etc. As an excellent example of what can be done, take a look at the recently released GAF Publisher, which exports Flash content to the GAF animation format.

I’m really looking forward to seeing what plugins become available over time.

Anyway, enjoy tinkering with the latest Flash Professional release, and I’m certainly looking forward to the next update.

22
Sep

If you’re an iPhone owner then you’ll probably be pleased to know that iOS 8 comes with WebGL support for Safari. This is huge news for Flash developers and designers since Flash Professional CC 2014 now supports WebGL as a publish target. Here’s a quick video of some Flash content I created running on my iPhone 5′s web browser.

As you can see, the performance is excellent and we can now look forward to creating visually rich Flash content for mobile web. I also upgraded my ageing iPad 2 to iOS 8 and the same content ran perfectly on it too. I was pleasantly surprised by that actually. If you’d like to see the results for yourself on your own iOS 8 device then simply point your device to the original demo. And if you’d like to actually see how that demo was built then take a look at my tutorial.

As for Android. Well I tried my demo out on an HTC One recently and the results were equally impressive on that too.

12
Sep
stored in: Projects and tagged: , ,

I just thought I’d show off an Adobe AIR project that I worked on recently. The Careers IT Seat Interactive is an iPad application that was developed as part of the Glasgow Science Centre’s Careers Hub exhibit. It consists of a series of games and quiz style questions designed to challenge and entertain visitors as they discover their ideal career based on their personality.

It has actually been a while since I last got my teeth into a decently sized project using the Flash platform. Most of the work I’ve been doing over the past 12 months has taken me away from that and onto HTML5 and native mobile projects. It genuinely felt good to be back doing some ActionScript 3. It’s still a lot of fun!

gsc-ipad-1

AIR’s performance on our target devices was seriously impressive, and the vector artwork created for the project looked gorgeous on those razor-sharp Retina screens. Also, there was no need for optimisation: all the vector animations and transitions ran smoothly first time. I was actually surprised at how easy it all was. Although I really shouldn’t have been.

If I can get a hold of a Retina iPad then I’ll make a video of the app actually running. In the meantime you can take a look at the screenshots that I’ve posted above.

Also, here’s a video of another part of the exhibit that was also developed using Adobe AIR (but not by myself). It’s a series of large touch screens allowing users to browse various sectors in the science industry to discover what jobs are available. The Open Exhibits framework (powered by GestureWorks) was also used in that project.

16
Aug

Beta builds of Adobe AIR 15 and Flash Player 15 are now available for download and I must say, there are some really nice features in the works. Here’s a few that caught my eye:

Cross promotion of AIR mobile games

This is possibly the feature I’m excited about most. Anyone who has released a mobile app will know the importance of promoting their app to maximise downloads. Well the good news is that Adobe AIR now supports cross promotion of AIR apps. It works by letting you include in-game promotions of games by other developers within your game, while your own app is promoted by others. It’s a great way of driving awareness and downloads of your apps. Adobe’s cross promotion solution will be free and will work on a points system. You earn points by promoting other AIR games.

The ActionScript API looks fairly straightforward and Adobe has released an article detailing how to use it.

It’s currently only available for Android but will be rolled out for iOS soon.

Stage3D “Standard” profile support for iOS and Android

AIR 14 saw the release of Stage3D “Standard” mode, which brought many advanced features to the Flash Runtime. With AIR 15, Stage3D “Standard” mode is now available on mobile. Any iOS and Android devices that support OpenGL ES3 will be able to request and use the “Standard” profile features, including multiple render targets, new texture formats, and AGAL 2.

The iOS Improved Packaging Engine is now default

The improved packaging engine will now be the default when developing iOS apps. This gives significantly faster packaging times compared to the legacy packager. Here’s a quick test I ran when the packager was first made available.

Automatic software fallback with StageVideo

Let’s be honest. When using hardware-accelerated video in Flash and AIR, it’s a pain having to implement your own fallback code for when hardware StageVideo isn’t supported. Thankfully, Flash Player 15 makes that a thing of the past as it now supports a software version of StageVideo that provides automatic fallback to the software version. Note that this is a Flash Player 15 Beta feature, which can be downloaded from here.

Using Stage3D and StageVideo together

Another new feature that I’m really excited about is a new ActionScript API that will allow hardware-accelerated video to be used as a source texture in Stage3D. As most of you will be aware, you can currently only use the Video object when working with Stage3D, which unfortunately isn’t accelerated. The new VideoTexture class will allow direct access to a texture object it sourced from a NetStream or Camera object. Initially this feature will start life off on AIR for Windows, but the intention is to roll it out across Mac and eventually mobile too. You can find out some more detail here.

There are other great features in the beta too, including enhancements to AIR’s gamepad feature for Android. Take a look at the latest release notes for more detail.

07
Aug

Sometimes at WeeWorld we like to break away from the constraints of the WeeMee and focus on other original character concepts. Jeff the Unicorn is one such idea that’s been extremely popular with our users, so we thought we’d try and explore some mobile game concepts featuring him. I’ve spent the past four weeks working on an endless runner mobile game demo starring Jeff.

The demo was written in Objective-C and gave me the ideal opportunity to play around with Apple’s Sprite Kit 2D framework. I must say, I really like Sprite Kit. The API is straightforward, the physics integration feels right, and the performance is pretty damn impressive.

We tried to add something different to the endless runner genre by adding a rainbow slide ability. To win the game you must slide on your butt, smearing Jeff’s rainbow coloured poop along the ground for as long as possible. Before Jeff can initiate a slide, you’ll need to collect enough coins and diamonds that are scattered throughout the level.

The demo is really rough and ready but considering we were doing some really rapid prototyping with limited resources I’m really happy how it turned out. Take a look at the video above to see the game in action. As always, sorry about the really shoddy camera work.

01
Aug

I got my hands on an HTC One the other day so thought I’d give the demo from my An Introduction to Flash’s WebGL Runtime API tutorial a quick run. When writing the tutorial I’d simply assumed it would work, but I didn’t actually have a WebGL-enabled handset to actually try it on. When my buddy Alex created the original animation and vector artwork, he’d made no attempt to try and optimise it, so I was actually a little apprehensive that the content would just kill the device. Well the good news is that it works a treat and the performance is really quite impressive.

I did have to make a small change to the source code to accommodate touch on mobile, which I’ve now pushed to my GitHub repository. Basically to handle touch on mobile you need to listen for the touchstart and touchend events. Flash’s WebGL export feature holds a lot of promise and it’ll be really interesting to see what people do with it. Take a look at the video above or if you have a WebGL-enabled mobile browser then why not give the demo a spin and let me know how it performs. I’d be interested to know.

Learn how to build interactive WebGL content using Adobe Flash Professional CC 2014 that will run across both desktop and mobile browsers.

What you will learn…

  • How to publish for WebGL from Flash Professional CC 2014
  • The basics of Flash’s WebGL Runtime API
  • How to work with Flash movie-clips using JavaScript

What you should know…

  • You should be comfortable working with Adobe Flash Professional
  • A familiarity with ActionScript or JavaScript is required

With the release of Adobe Flash Professional CC 2014 you can target WebGL-enabled browsers, allowing your content to run across both desktop and mobile devices, while taking full advantage of GPU acceleration. If you’re familiar with Flash’s existing HTML5 Canvas export option you may be asking yourself what the distinction between that and the WebGL target is? While both draw to an HTML5 canvas element, WebGL utilises the GPU for superior rendering performance. Additionally, while the two export options provide a JavaScript API, both APIs currently differ.

This tutorial will take you through the designer-developer workflow. You’ll learn how to export your FLA’s graphical resources to WebGL, before adding interactivity to it using JavaScript and Flash’s WebGL runtime API. We’ll be creating a prototype beat ‘em up game where your hero can perform either an attacking or blocking move. By doing so you’ll learn how to work with movie-clips and how to handle and respond to simple mouse (or touch) interactions. For a clear idea of what you’ll be building, take a look at the final result below.

For the avoidance of doubt. What you are looking at here is Flash-authored content running in your web browser but outside of Flash Player. By publishing to WebGL you are potentially increasing the reach of your Flash content to devices that don’t support Flash.

Before we proceed, a special mention must go to my buddy Alex Fleisig, who has provided the artwork and animation for this tutorial. Alex has worked for the likes of Pixar and DreamWorks on a wealth of hit movies. You can see some more of his animation work here.

(more…)

19
Jul

It’s time to take a look at some more great games built with Adobe AIR. If you’re using the Flash platform, or any other development platform for that matter, to build your own games then hopefully you’ll find some inspiration here. If you’re just looking for a few games to play then I don’t think you’ll be disappointed either.

Haunt the House: Terrortown

Powered by Adobe AIR and the Starling framework, Haunt the House: Terrortown is another stunning example of what can be created with the Flash platform. It can best be thought of as a side-scrolling action puzzle game starring a ghost, where the objective is to possess objects in order to scare the hell out of people. In fact, if you’re really good at it you can scare some of your poor victims to death!

The game takes place over five vibrant locations, each with its own musical style and unique objects. In fact, each location has hundreds of different objects for you to possess, with several funny outcomes from moving and interacting with each. Get the timing right and you’ll have town folk running for cover, or darting towards the nearest exit. Haunt the House has some splendid animation and a great sense of humour.

It’s available on Steam for both Windows and Mac.

Infectonator: Hot Chase

Zombie are great. Endless runners are great too. So I’m delighted that Armor Games had the good sense to combine both to make Infectonator: an awesome zombie game where you rampage through a city infecting as many unfortunate victims as possible.

Unlike the traditional slow shambling zombies we’re used to, Infectonator’s zombie protagonist runs after his prey. Unfortunately he burns out quickly and needs fresh victims to replenish his stamina and boost his speed. Fail to infect enough people and you’ll grind to a halt. With coins to collect, power-ups to earn, and high-scores to bag, there’s more than enough to keep you coming back for some time.

Infectonator: Hot Chase is available for iOS on the App Store and Android via Google Play. And of course, being built using the Flash platform, you can also play it on the web too!

Mucho Party

I really like Mucho Party. It doesn’t take itself too seriously, offering up 30 fun mini-games for you to compete against friends or AI players. Each game is wacky, simple to play, and has a sense of humour that will keep players smiling as they compete and attempt to unlock new games.

While each game is straightforward and only takes seconds to play, Mucho Party will adjust its difficulty based on your own skills. So players of a wide range of ages and abilities can take part. Basically it makes itself as accessible to as wide a range of people as possible, which is exactly what an app of this type should. Great stuff!

Mucho Party is available on the App Store and Google Play.

CSI: Hidden Crimes

It’s great to see large games companies such as Ubisoft using Adobe AIR. It’s even better seeing them use it to build games based on big name TV shows such as CSI. At its heart, CSI: Hidden Crimes is a simple find-the-object game. You use your observation skills to hunt for evidence at crime scenes. Analysing the collected evidence leads you to new crime scenes and suspects. As you continue investigating leads you’ll start to build up a profile of the murderer, allowing you to ultimately solve the case.

CSI: Hidden Crimes is an extremely slick game that has a great visual style that captures the mood of the TV series without being too gory given the game’s subject matter. It’s easy to get in to and doesn’t demand too much of your time in any one sitting, which makes it ideal for casual gamers. CSI: Hidden Crimes is available from the App Store for those with iOS devices and Google Play for Android owners.

NANACA†CRASH!!

Note: Just found out that NANACA†CRASH!! isn’t actually an AIR app. Check out developer Kick Lensing’s comment at the bottom of the post.

It started life as a crazy Japanese anime web game and now NANACA†CRASH!! has made it onto mobile. It’s hard to actually put into words just how bonkers NANACA†CRASH!! actually is, but I’ll try. Basically the game begins with your character being sent flying into the air after being hit by a bike. You then spend your remaining time trying to see just how far you can keep him flying through the air.

It seems simple, but NANACA†CRASH!! has a surprising amount of depth and before long you’ll be uncovering tricks and moves that will keep your character soaring through the air. On my first attempt I only managed a distance of 50 metres. However, before long I was covering distances of several kilometres at a time. Cool!

NANACA†CRASH!! is available on the App Store and Google Play.