However, getting Flash ready to export to your iOS device and take advantage of Starling is a bit of a challenge. You need to overcome these two challenges:
Note: As always, make backups of anything that you overwrite.
It would be foolish to try this without a way to undo these changes.
1. Download the latest AIR 3.2 SDK here:
2. Extract the SDK
3. Rename the parent folder “AIR3.2″
4. Place the “AIR3.2″ folder in <FLASH CS5.5 DIR>\
(on Windows 7, this is located here: C:\Program Files (x86)\Adobe\Adobe Flash CS5.5)
5. Create a directory named “AIR3.2″ in <FLASH CS5.5 DIR>\Common\Configuration\ActionScript 3.0\
6. Copy AIR3.2\frameworks\libs\air\airglobal.swc and paste it in the newly created <FLASH CS5.5 DIR>\Common\Configuration\ActionScript 3.0\AIR3.2 directory
7. Navigate to <FLASH CS5.5 DIR>\Common\Configuration\Players\
8. Paste in the XML files found in this ZIP file: flashAirXML.zip
9. Remove (back up to somewhere) any other iOS XML file that already exists in <FLASH CS5.5 DIR>\Common\Configuration\Players\
You can have multiple Android XML files here, but not iOS. I have no idea why.
You can now build to iOS with AIR 3.2 and take advantage of Stage3D!
Tiny Wings has now been taken to the next level because there is a real danger of blood loss.
This is good news because, let’s face it, controlling games with your finger and tilting sucks for just about everything besides driving games, puzzle games, and gimmicky apps.
Many types of games are just NOT possible.
Megaman, Super Mario Bros., and any game that requires more precise control than can be achieved with a hot dog.
Attempts have been made to port some arcade classics, and most are terrible.
Putting a “controller” on the touch screen is just plain awful.
The bad news, or course, is that not everyone will have the gamepad. And even if you have the gamepad, you’re not likely to have it with you every time you want to play a game. Thus, games will have to be designed to support the standard control scheme anyway.
The best scenario would be to have actual physical buttons on the iPhone. However, this will never happen. Apple has spent a lot of money and energy to convince consumers that there is no need for physical buttons.]]>
iPhone 4 will support Flash, along with the iPad.
April Fools, you idiot.
The press release makes it sound a little like the sprite engine is specific to the iPhone, but this is not the case. You can see the “inside” info here (top secret):
Creating 2D games is currently very clunky in Unity. Basically, you have to billboard textures onto planes or boxes, etc. There is no hit detection for pixels.
In case anyone misses the point, a 2D sprite engine makes Unity a one stop shop for game development. This effectively provides competition to Flash and Silverlight, as well as the folks at Garage Games, and many others.
Being able to write games in 2D or 3D, and deploy to the PC, Mac, Xbox 360, Playstation, iPhone, Andriod, and Atari 2600… where do I sign up?]]>
Instantiating a prefab from your library is easy, once you know how. Figuring out how is a pain. The biggest quirk is that your prefab must be located in a directory called “Resources” if you want to instantiate it using C#.
Here are the steps.
1. Make sure you create a directory called “Resources” and place it in your Assets/ directory.
2. Create a prefab. Let’s all it “FooPrefab”.
3. In C#, instantiate the prefab as follows:
GameObject go = Instantiate(Resources.Load("FooPrefab")) as GameObject;
Why does the prefab have to be placed in a directory called “Resources”.
As a Flash programmer, I’m very spoiled by several of the development environments available to me. FlashDevelop, Flex, etc. all provide intelligent editors that give me code completion. Unity’s built in editor does not have this feature. Once you get used to code completion, you can never go back to a plain text editor!
The good news is that you can use Visual C# 2008 Express for all of your Unity coding needs, and its totally free! Thanks, Bill Gates.
Below are the steps to set up your environment. Have fun. Don’t say I never gave you anything.
One time setup:
1. Download Visual C# 2008 Express for free:
2. Install it.
3. Download the following file, which is needed for tool tips as you edit in C#.
Place the 2 XML files here:
(or wherever you installed Unity)
Repeat for each project:
1. When you create a new Unity 3D project, you need to create a new C# project somewhere in the Assets/ directory. It can be right in Assets/, or you can make a sub directory. Making a sub directory might be cleaner as C# will create solution files, etc. Use “Empty Project” as your project type in C#.
2. Add a reference to the Unity dll files in your C# project.
In C#’s Solution Explorer panel (on the right), right-click the project and choose “Add Reference”.
Browse to and add UnityEngine.dll.
(you can add the editor dll as well if you are going to write editor code)
3. Create new class files from within C#. If you do it from Unity, they don’t show up automatically in your C# project (there is probably a way to add them, but I don’t know it).
Code completion, tool tips, hints… it’s all there.
I really wish something like this had been available years ago. I create lots of multiplayer games and virtual worlds. This book would have saved me tons of time and effort.
In addition to being a fan of Jobe’s books, I had the pleasure of contributing to this one. Jobe did me the honor of having me to write Chapter 11: Cooperative Game Play.
The chapter discusses various cooperative game concepts. Also, I created a fully working multiplayer game to go along with the chapter: Super Blob Brothers (Thanks go to Scott Smith for writing all of the server side code to support the game). Of course, the book comes with the full source code for the game.
In Super Blob Brothers, two players must help each other complete each level by navigating from the starting point to the Goal Pad. The game is unique in that cooperation is required. No level can be completed by a solo player.
Obstacles include rocks, laser gates, and laser towers. Rocks can only be pushed by two players working together. One player has the ability to defend against lasers. The other player has the ability to disable laser towers.
Other games in the book include a real-time tank game and a fully working virtual world example.
Be sure to purchase the book as soon as possible! On a scale of 1 to 10, I’d give it an 11.]]>