Flash CS5 – 5005: Unknown error optimizing byte code

MarkBlog

A quick post, as this issue has been covered in massive amounts of detail over at negush.net but this really is a doozy!

Basically, if you have a LOT of code and/or library files being compiled into your project and then… poof… Flash drops this crazy error:

,line 1: Error 5005: Unknown Error optimizing byte code

OK… what?
If you try and ask Flash for more details, it tells you there aren’t any.  Wonderfully useful.

For us, it was adding the Bamboo SDK files (a pair of SWC libraries) to an already hefty project, that pushed the compiler over the edge.
But, fear not, for there IS A SOLUTION!

There are many suggestions in the link provided, but the one that worked for us was to add an environment variable to the operating system:
Name: JAVA_TOOL_OPTIONS
Value: -Xmx1024M
Then reboot your PC – that should allow the environment variable to take affect.

This is telling/allowing the Java Virtual Machine to use up to 1GB of system RAM to perform any single operations… or something to that effect.  Open up Flash (in our case, Pro CS5) and compile the troublesome project.
Et voila.  It works!

___________________________________

Skin Ink in EDGE!

MarkNews

Gaslight Games debut game Skin Ink is in this months issue of the video games publication EDGE Magazine!

Look out for us in the article on Culturalisation in the games industry – how we need to go beyond localisation and translation in the video games industry.

Skin Ink… a long road!

MarkBlog

With the official announcement (and Twitter post, of course :-) the latest version of Skin Ink has been submitted for approval and testing… and it’s about time too!

Everyone here has been working tirelessly on this latest version.  I’m sure anyone who has worked on any project will have felt the way that everyone here has felt: When will it end!?
Sure, we love the title – wouldn’t work on it, if we didn’t feel that way!
And, of course we wouldn’t rather be doing something else.
BUT…
When tiny, niggly problems, errors or strange scoring mechanics go awry it can get a little… frustrating.

I blame the last second crunch-rush to get the game into testing, so that it can be released on time.  Sleep deprived, caffeine fueled brains make such mountainous mistakes out of tiny molehill sized updates that it takes twice as long to resolve than any other time.
Let me recount the tale of 20 minutes before submission…

“What!?  Since when is 9’820 bigger than 1’207’460!?”  I scream.
Yes, it’s a scoring conundrum and in our case, the high score table has decided not to follow basic maths.
Ugh.
This is the sort of thing that was working before and now isn’t.  What have we changed.  What have we updated/fixed and subsequently broken… just… what?

Anyone who has used XML to store numerical values will already know the answer, and is probably chuckling at your desk.  I can laugh now.
But to everyone else, someone (and I won’t name any names ;-) forgot to ensure that the values – when read from the XML file – are always interpreted as integers.  Yes, a simple fix.  And, as I say, something to laugh about now, but when you’re at the home stretch, every major aspect is in and working and *pop*.

At this point, I’m recalling a most poignant quote:
“No beer and no TV make Homer something something… ”

Still… we made it.  Well, that is until we get the bug report.  But until then, I bid you adieu!

___________________________________

Skin Ink 2 – Submitted for Approval

MarkNews

The latest version of Skin Ink has been submitted for approval and testing!

Starting with Wacom Bamboo, then moving to Android, Blackberry Tablet OS and finally iOS devices.  Keep an eye out for Skin Ink on your platform!

Including SWC’s via Relative Path Instead of Full Path

MarkBlog

I recently sent the current code and project files for a simple application to a fellow developer, so they could get to grips with some key points… I forget the specifics, but it doesn’t matter for the purposes of setting the scene :-)
They received the ZIP file.
Extracted it.
Fired up the FLA.
And everything seemed great until they hit the ole’ Ctrl+Enter and received errors.  I know this code and project work.
So what’s the problem?

It’s a simple one: the library files, or SWC’s to you and I.

You see, I store my library files in one place.  It makes it convenient for me so that if there are any updates, I just make a backup of the old one, put the new one in place (making sure the filename matches) et voila.  No changes to the multiple projects.
But what if you’re sharing a project?

Well, I figured you can use relative paths when including a folder for Classes, so why not for library files.  Turns out, you can!
What I mean by relative and full path is this:
A full path (on Windows) typically looks like C:\some\directory\where\my\SWC\lives\importMe.swc
Whereas a relative path could look like this ..\SWC\lives\importMe.swc

In a simple project like this one, I created a folder called “Includes” and put my SWC library files in there.  Next, in Flash, I hit the ActionScript Settings ->  Library Path tab.
In here, I removed all references to the individual SWC’s.  Then hit the “+” and put “./Includes ” (minus the quotes) instead and tentatively hit Ctrl+Enter.
Whatta you know… it works!

[My path is ./Includes, as that means “the current folder where the FLA is, then look for a folder called “Includes” and use the stuff in there.”  If you need to go “up” a folder, you want “../ ” and if you need to go several folders deep, then you simply ./type/multiple/folders]

If, like me, you have several projects sharing the same libraries, and having those (albeit 1MB in size) libraries copied a plethora of times can be an issue – then the updating that I mentioned before etc.
But, if you’re sharing a project or code, then this relative path method might just help!

___________________________________