AIR and iOS app options (cutsom url scheme, hidden)

Each day we discover new options and features giving the developer life more exciting!

Today I’m sharing some options for iOS development. Let say you have a main application including links to several games. You don’t want to include all this games into the main application because there are more like independant mini-games, or you don’t want to clean everything as it should when you leave your game (the lazy way), or there are several developers involved in this different games and they don’t use the same technology!

Anyway, you want to create a main application able to navigate to an other one. In other terms: communicate with other apps (Apple references check Communicating with Other Apps part and below).

Continue reading AIR and iOS app options (cutsom url scheme, hidden)

Unity and its asset store

This last weeks, I played a lot with Unity. Thanks to its Editor it’s very easy to set up a scene in no time!
Also one of its strongest features is its Asset Store. You can find excellent stuff (assets, code, utilities…), however you’ll have probably to pay for that.

Unity has succeeded to create a market around its product and make its own product even better. Imagine if Greensock/TweenMax or even the Citrus Engine were able to be included into your project in one click. People looking for game engine will see the different ones and reviews. By promoting its asset store, Unity promotes its technology and people which are using it. Developers are highlighted and they gain some profits for their hard work (Unity too it’s a 70% – 30% deal). How many Flash developers earn money thanks their libraries? Certainly less than Unity developers and there are more (were?) Flash developers.

It seems that Unity users don’t hesitate to give money for what they want, whereas Flash users pay more attention. The Citrus Engine wouldn’t be popular and used if it wasn’t free.

Well I could write a long blog post, comparing Unity and Flash frameworks/libraries management but that’s definitely not my goal. I just would like to say that if you pay $15 for this awesome component, you will be able to make a FPS in no time.
Like I did in 15 minutes. Demo.

I wish I could make this in Flash in less than 15 minutes, and I don’t care about the price (if it worths it and is reasonable).

Android 4.2.2. resolve problem with AIR mobile deployment

Google has recently pushed a new Android version: 4.2.2. Concerning the new features, this update brings about a new security feature in regards to USB debugging: now there is a gatekeeper on your phone! You will have to accept the RSA key before being able to deploy on your device. More information concerning this update there.

If you have made this update on your device, you won’t be able to deploy your application, even if you’ve accepted the RSA key. Your IDE won’t success to connect to the device and push on it.
When I tried to resolve the problem, it quickly appears it wasn’t related to the IDE but directly from the AIR SDK. Then I tried to deploy on my tablet with a Unity project: same problem. Using Unity, you work directly with the Android SDK. I just needed to download its latest version and replace the previous one, and it works!

Concerning AIR, we also use the Android SDK but not with its original structure. You need to replace some files on this folder: YourSDK/lib/android/bin. Replace those files: aapt, adb and dx.jar with files coming from the latest Android SDK: sdk/platform-tools aapt, adb and its lib folder with the dx.jar file. Using Windows you will also need to replace the dll files.

That was easy! I hope Adobe will quickly deploy an AIR SDK update for everyone.

First month as a freelancer completed!

Hey guys,

This month was simply awesome! I’ve worked on some cool exciting projects using mostly AS3 with Starling, and the new ones in the pipeline are even better ๐Ÿ™‚ I wish I could clone myself to work on all of them! I’d time to improve the Citrus Engine, give a first try to Cocos2D (loved to redo some Objective-C, but I’ll stay on Sparrow, a project using it is coming!) and started to learn Unity3D (you can make quickly some 2D games using Orthello framework). Learning Unity is very exciting, it’s definitely one of future tool I will mostly used in the future.

During this month there was the Global Game Jam. With some great guys, we made a game which won the local jury award using the Citrus Engine:

First achievements are unlocked ๐Ÿ˜‰

See you later!

Take photo with AIR on iOS

Hey guys,

Recently, I’ve worked on a mobile project and camera use drives me crazy about performances. On iOS, after taking a photo and validate it, it freezes the application during one minute to be able to encode it.
I’ve made lots of tests with several libraries, using Alchemy ones, and finally the fastest way (less than 5 seconds) is to use the new BitmapData encode method, available since Flash Player 11.3 and AIR 3.3.

Here is the code (lots of code come from this excellent post) :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if (CameraUI.isSupported) {
	viewsAC.addItem({label:"Take Photo", icon:cameraIcon});
	myCam = new CameraUI();
	myCam.addEventListener(MediaEvent.COMPLETE, onCameraComplete);
}
 
protected function onCameraComplete(evt:MediaEvent):void
{
	sqlStatement = new SQLStatement();
	sqlStatement.sqlConnection = model2.connection;
	sqlStatement.text =
		"INSERT INTO albumItems (album, photoFile, dateAdded) " +
		"VALUES (:album, :photoFile, :dateAdded)";
	sqlStatement.parameters[":album"] = model2.selectedAlbum;
 
	var mediaPromise:MediaPromise = evt.data;
	if (mediaPromise.file == null) {
 
		// For iOS we need to load with a Loader first
		_loader = new Loader();
		_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageloader_complete, false, 0, true);
		_loader.loadFilePromise(mediaPromise);
 
		return;
	} else {
 
		// Android & BlackBerry
		registerPhoto(mediaPromise.file.url)
	}
}
 
private function imageloader_complete(event:Event):void {
 
	_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, imageloader_complete);
 
	var loaderInfo:LoaderInfo = event.target as LoaderInfo;
 
	if (CameraRoll.supportsAddBitmapData) {
 
		var bitmapData:BitmapData = new BitmapData(loaderInfo.width, loaderInfo.height);
		bitmapData.draw(loaderInfo.loader);
		var file:File = File.applicationStorageDirectory.resolvePath("image" + new Date().time + ".jpg");
		var stream:FileStream = new FileStream()
		stream.open(file, FileMode.WRITE);
		var bytes:ByteArray = bitmapData.encode(bitmapData.rect, new flash.display.JPEGEncoderOptions());
		stream.writeBytes(bytes, 0, bytes.bytesAvailable);
		stream.close();
 
	}
	registerPhoto(file.url)
 
}
 
private function registerPhoto(url:String):void {
 
	sqlStatement.parameters[":photoFile"] = url;
 
	sqlStatement.parameters[":dateAdded"] = new Date();
	sqlStatement.execute();
 
	viewsList.selectedIndex = -1;
}

Becoming a freelancer

Hi! Since the new Citrus Engine website, this blog was in stand-by during the last two months. This year I worked really hard, using my personnal time, on the Citrus Engine which is the most advanced Open-Source & free AS3 game engine. This work and its support aren’t finished.

Now I’m happy to share with you some exciting news: in January, I will start my career as a freelancer! Thanks to this status, I will be able to work with companies on strong games using the Citrus Engine and make it even more professional. Take a look on its support page.

Will I only make games using this engine? No, diversity is stimulating. I’ve just bought an iMac to be able to re-do some Objective-C, and develop on iOS using Haxe NME.

To sum-up, I will focus on games, mobile applications, and maybe some websites using AS3, Haxe, Objective-C, HTML5 and PHP programming languages. In a long run I hope to improve my Unity3D knowledge, and in a short period I will give Cocos2D a try.

Also I will try to keep this blog alive, making one article by month which won’t be related to the Citrus Engine.

Future is exciting. Feel free to contact me!

Citrus Engine V3 and a new website!

Hey there,

I’m glad to announce the V3 release and a new website for the Citrus Engine! It has been a long and hard work. Most of the new tutorials and news will be displayed on this new website. Don’t know how I will manage this blog on Citrus Engine subject due to the new website, I will certainly replicate some contents.

Anyway I let you explore the new website ๐Ÿ™‚ Don’t hesitate to give some feedback.

Playing with Cadet Editor 3D and AwayPhysics

The 3D part is a bit in stand-by this last weeks on the Citrus Engine, because I’m polishing the engine for the V3 which should be out this week!

I’ve never clearly introduced AwayPhysics in the Citrus Engine, so it’s the day! The idea is to have a similar pre-built platformer objects that we already have with Box2D and Nape but with AwayPhysics this time for 3D stuff! This work and Away3D support will evolve during the V3.

Now that 3D views and physics are supported, it’s time to give a look on which tool we can use as a 3D game Level Editor. At first, I thought to Prefab. This is the best tool to create a scene with Away3D, importing assets, add lights… But too complex for a simple level design, I mean : hey the Citrus Engine is not a concurrent to Unity3D (which I started to learn thanks to this awesome tutorial) ๐Ÿ˜€ Its 3D physics part is just here to create basic 3D game / puzzle. Also the level editor has to support object creation (physics object), this isn’t obvious with Prefab.
Then I gave a look to Cadet Editor, the 3D editor is very easy to handle. You can create quickly sphere, cube and plane objects, add lights… That’s the right tool to see what can be done!

Continue reading Playing with Cadet Editor 3D and AwayPhysics

Create combination of physics objects in Citrus Engine

Some days ago, I said that November will be an awesome month for the Citrus Engine. So what is coming?

We’re the 2nd, November is already here and something huge is already happened to the CE : a tutorial on gotoandlearn made by Lee Brimelow, an Adobe Game Developer Evangelist! Definitely, an excellent tutorial to get start with the Citrus Engine. There’ll be other tutorials later, a new website and the forum’ll move on Starling website. Most of the future game will use Starling so that’s a good move! We’re not forgetting the 3D part, don’t worry ๐Ÿ˜‰

Everything should be ready for the next Adobe Game Jam in Chicago. So that’s the plan. Now let’s go for a small tutorial.

Continue reading Create combination of physics objects in Citrus Engine