Setting Up PushButton Engine with Eclipse 3.5 (Galilleo) and AXDT
Posted by Ace
Since last week, I’m trying to learn ActionScript 3 (AS3) language to create a game.
I use Linux as development platform, and there’s not much IDE available for AS3 for Linux. FlashDevelop for linux is still in the middle of development last time I check. And I don’t want to use Adobe Flash IDE on Linux using wine. There is a FlexBuilder for linux from Adobe site, but that project is still in alpha 4 stage since last year, I’ve tried it but I think I’ll stick with AXDT for now.
After looking in the net for a good editor for AS3, i found OSFlash website. And from reading that site, I found out that there’s a good plugin for Eclipse IDE called ASDT, which only support AS2 development not AS3. Luckily, that project is now evolved into AXDT which give a full support for AS3 development within Eclipse IDE.
So, my next step is finding a good game engine for me to use. After googling for a while, I want to try using PushButton engine. There’s a nice tutorial to set it up using Eclipse and Adobe FlexBuilder though, but that tutorial is for Windows and I’m failed at implementing that tutorial in Linux. Probably I’ve some how made a mistake when following that tutorial.
So after some trial and error, I managed to run the demo game which included in PushButton engine archieve file. And here’s how I do it :
- Download PushButton engine framework
PushButton engine could be obtained from http://pushbuttonengine.com/download/. Here, I’m using PushButton engine revision 65.
After downloading it, extract it to your home directory.
- Installing AXDT plugin
For this tutorial, I’m using Eclipse 3.5 RC2 classic package. The latest copy of Eclipse IDE can be obtained from http://www.eclipse.org/galileo.There’s a tutorial for installing AXDT in it’s web for Eclipse 3.3 and 3.4. For Eclipse 3.5 the method is similar as in Eclipse 3.4.
Run your Eclipse IDE and go to Help > Install New Software. Insert this following url in the ‘Work with‘ field and press Enter.
Wait until Eclipse finish fetching all the software available from that url. That update site is needed to download all the tools needed by AXDT later. After all Eclipse finished fetching the software list, then enter this following url into the ‘Work with‘ field and press Enter.
After Eclipse finished fetching software list from that url, select latest AXDT feature and either or both Flex 3/4 SDK feature. After that you can click Next button, finish the installation process and restart Eclipse.
When Eclipse finish it’s restart process, AXDT should be installed.
- Setting up the project in Eclipse
Create an AXDT project via File > New > Other and select AXDT Project from the wizard.
Fill the project name and the location to save the project in the next step, here I’m using PBDemo as a project name and I save it in /home/a3/PBDemo
After finishing this step, AXDT will create project directory PBDemo in my home directory, and inside it, a src directory for all the AS3 source files. That project structure is also viewable from Project Explorer tab.
Now, I’m going to use PBFlexlessEngineDemo which available from PushButton archieve.
Copy directory Assets and all it’s content from Project/Demos/PBFlexlessEngineDemo in the PushButton engine directory to our project directory. And then copy all the content of Source directory from Project/Demos/PBFlexlessEngineDemo to our src directory in our project.
Now all we need is add PushButton library to the project.
Create lib directory under project directory, and copy all .swc files from PushButton engine’s Libraries directory. And the create config directory under project directory, this directory is used to store flex config file.
The project structure will look like this
- Run the demo
Now to run the demo from within Eclipse, we’ll need to creat a simple config file.
<?xml version="1.0" encoding="UTF-8"?>
<flex-config xmlns= "http://www.adobe.com/2006/flex-config">
Put the configuration in PBFlexlessEngineDemo-config.xml file and save it in the config directory.
Now, right click on PBFlexlessEngineDemo.as and select Run As > Compile and Open a SWF File. In the lauch configuration, check on In the config folder checkbox.
Click Run button, and after compiling the result would be something like this
That’s it. Now I’m going to explore this engine and start develop a (simple) game.
Posted on 9 June 2009, in Dev, Flash, Game Dev, Linux and tagged AS3, axdt, Eclipse, flash, flash game development, flex, game development, game engine, Linux, PushButton. Bookmark the permalink. 11 Comments.