Tag: actionscript

Showing 8 posts.

AGAL multitexture shader

September 5th, 2012    by sigman    4391
  Tutorials   actionscript, programming

Inspired by the great blog post from Devon_O on conversion of GLSL (OpenGL) shaders to AGAL shaders, I decided to pick one of the examples available on Shader Toy website and to my suprise it wasn't that hard to get it working. I wanted to put the example with code on the Wonderfl but I can't get it running over there so I decided to put it here. And while I put it here, why not add just few additional words about shaders in AGAL...

continue reading...

Box2D basics - Part 1

February 12th, 2012    by sigman    8444
  Primers   box2d, actionscript, programming

Box2D logoBox2D probably doesn't have to be introduced to anyone, even if you have never used it, you have probably still heard about it. This is the most popular physics simulation engine that has been ported to every popular platform available. I had a chance to work with Box2D in C++ and I have been reading tutorials from guys using it with Python, Objective-C, Java and JavaScript. So if you come from other platform than Flash, I encourage you to read this article anyway as although I'm using a Flash port here, everything works exactly the same way in other platforms. In the first part, I cover how to create a world, static and dynamic objects, how to add interaction and work with collision detection.

continue reading...

Saving and loading complex objects from a file with FlashPlayer

January 19th, 2012    by sigman    3643
  Tips   actionscript, programming

When building Flash apps or games there is very often a need to save some user data. It might be a player's progress in a game or some work done in an application. Usually online application data is being kept in a database and desktop apps are saving to a file on a hard drive. Flash also allows saving to shared objects, so called Flash's cookie files but there is a limit of size set by an operating system and some browsers or anti-viruses may clear them periodically effectively erasing users saved data. While for desktop apps developers choose Adobe AIR, which allows deeper integration with operating systems, not many people know that since Flash Player 10 there is also an option of saving and loading data from a file. In this quick article I will give you a code example of how this feature could be use along with JSON and ByteArrays to effectively save your data to a file.

continue reading...

Building iOS app with Adobe AIR - things learnt when developing ColorByShape app

December 1st, 2011    by sigman    30000
  Tips   actionscript, mobile

Color By Shape is my first app targeted for tablets only. Currently there is only iOS version available but the plan is to have it on Android Martket as well (it's pretty easy with AIR, just I don't have currently access to enough test devices). In this article I want to share some of the issues and ways of handling them when building an iPad app.

continue reading...

Simple pathfinding algorithm in ActionScript 3

August 6th, 2011    by sigman    9709
  Tutorials   actionscript, programming

I was asked to quickly build an algorithm to find the shortest path for a labirinth game. First thing I did was check for some quick ideas on Wikipedia and found this article: http://en.wikipedia.org/wiki/Pathfinding. As there was only a text description I quickly wrote a simple ActionScript 3 class returning coordinates that create the shortest path.

continue reading...

Building mobile games in Adobe AIR - techniques used in Jumping Droid

May 22nd, 2011    by sigman    44618
  Tips   mobile, actionscript

Yes... building my first cross-platform and multi-screen mobile game was quite a challenge. At the time when I started this project, the Adobe AIR for mobiles (2.5) was quite immature and the best source of solutions and workarounds to new problems (often bugs) was the Adobe's Flash Community forum. I'm going to share here some techniques I learnt and used in Jumping Droid game. I encourage you to try them, experiment and mix with others, to achieve better optimisation and better performance.

continue reading...

Starting with AIR for Android and iOS - building one app for both platforms

May 10th, 2011    by sigman    50895
  Tutorials   actionscript, mobile

Nearly half year after I published a quick tutorial on how to set everything up to build AIR apps for Android, I find it pretty much outdated... At that time Flash developers could export their projects for Android using AIR 2.5 and for iOS using PFI (Packager for iPhone) which had functionalities matching AIR 2.0. On March 2011 Adobe have released AIR 2.6, which brings plenty of new features to Android but more importantly it brings them to iOS as well. In this article I will go through steps to create and publish your first simple app for both devices - Android and iPhone using Flash Professional CS5 and AIR 2.6.

continue reading...