Archive

Posts Tagged ‘productivity’

Tip of the day: Publish Time & Memory Increase

April 1st, 2009

At my company “Hello There” we are currently developing a really cool game that is built on the base of Papervision 3D 2.0 (Great White). We suddenly run into a really really annoying problem.

I could publish the Flash files without any complication but the other two team members couldn’t, and we have the same set of workstations. After a lot of searching it seems somehow that it’s a memory problem and some suggestions points to changing JAVA memory, well, we didn’t get that to work either so we took another solution.

By making the Papervision package to a SWC file it’s already compiled and takes less memory for Flash. If you have a bigger framework you should as well take your time to create a SWC package for it. The publish time will decrease and your will be working happily ever after =)

TIP: Use more SWC, will speed up your work & use less memory.

If you have Flex, here is an easy tutorial on how to create your SWC package.
1.) Create a “Flex Library Project”.
2.) Add your code that you want to compile.
3.) Right click on the project, Properties->Flex Builder Path
4.) Mark all the packages that you want to compile
5.) Finish, just refresh the project to make sure everything is compiled when you change anything. The SWC file is placed in the /bin folder. Ready to use for Flex & Flash.

Did a really short video;
preview image.

Flash, Flex , , ,

XML in Production (lazy)

March 30th, 2009

I’m working a lot with international sites and there can often be times where the deadlines are short, customers aren’t so fast as I wish they where with feedback e.g.

This often messes up translations with XML files. They needs to be resend for changes and as the sites takes interaction you can find that things are missing.

Here is a small tip if you are running out of time, make sure your XML structure is simple, as well make sure that you are using unique id attributes. Then you can just combine the XML files and you don’t really need to go thru hours of copy/paste work.

A small example.
XML 1
<xml>
<gui>
<item id=”replay”>REPLAY</item>
<item id=”start”>START THE GAME</item>
</gui>
</xml>

XML 2
<xml>
<gui>
<item id=”volumeOff”>TURN ON VOLUME</item>
<item id=”volumeOn”>TURN OFF VOLUME</item>
</gui>
</xml>

So what I do is just to add on and on and combine the XML;s.

var copy:XML = levelLoader.getXML("data/en.xml");
var copy1:XML = levelLoader.getXML("data/en01.xml");
var copy2:XML = levelLoader.getXML("data/en02.xml");
copy = copy.appendChild(copy1.*);
copy = copy.appendChild(copy2.*);
 
var volumeOff : String = copy.gui.(@id=="volumeOff");

Flash , , , ,