Archive for November, 2006
Tuesday, November 28th, 2006
Here are some hints on how I organize my Eclipse workspace that you might find interesting if you want to keep all the stuff together in one workspace, not only the projects but also shared classes, API docs and default Ant build files.

I’m only using one workspace for all projects, no matter what technology they’re using. I’ve heard others are using one dedicated workspace for every technology and that’s fine too but I find it more practical to just use one for all. I’ve created three sub folders in the workspace named .classes, .default and .docs. Note the period at the beginning of the name. This keeps them listed before all other folders (unless you name your projects with a starting period).
The .classes folder contains subfolders for every technology (or language) I use, namely as2, as3, haxe and java. From there on the ongoing structure depends on the language. For as2 I have folders like additional, mm7, mm8, mtasc, zinc etc. For as3 I only have additional and and swc. The additional folder contains all kinds of third party packages, the swc folder only contains swc files etc. whereas for as2 the mtasc folder only contains the classes that ship with MTASC etc. Here’s a diagram of the structure …
(more…)
Filed under Dev, Random Picks | 4 Comments »
Friday, November 24th, 2006
While reading Advanced ActionScript 3 with Design Patterns I’ve once again came across the AS 3.0 Singleton solution that has to deal with the absence of private constructors (I’ll save my rage and cursings about who had the idea to remove them for now ;)) and while the authors are using the already well known method of using a SingletonEnforcer class outside the Singleton’s package to verify that the class cannot be instanciated via the constructor they also note that this can be doublecrossed by giving null or undefined as a constructor parameter. As this is rather sub optimal I was wondering why they don’t just check inside the Singleton constructor for a null/undefined argument and throw an exception accordingly?!
I’m sure somebody else had the same idea already but here’s my idea of a waterproof Singleton class that cannot be misused from the outside (As always, if I missed any detail that accidentally breaks hell loose feel free to correct me) …
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| package
{
public class WaterproofSingleton {
static private var _instance:Singleton;
public function Singleton(singletonEnforcer:SingletonEnforcer) {
if ((singletonEnforcer as SingletonEnforcer) == null) {
throw (new Error("Direct instantiation of a Singleton is not allowed!"));
}
}
public static function getInstance():Singleton {
if (Singleton._instance == null) {
Singleton._instance = new Singleton(new SingletonEnforcer());
}
return Singleton._instance;
}
}
}
class SingletonEnforcer {} |
Filed under Dev, Random Picks | 6 Comments »
Friday, November 24th, 2006
Some links to nine articles about the topic on ‘becoming an Independent Game Developer‘, found via Digg. Some more interesting, some less, the last one from a Mac perspective. There seems to be a lot of discussion about if it turns out to be paying off or not etc., in short, things that don’t interest me that much, I’m just creating games because I have fun doing it and I like the practical side, I’m more of a hobbyist! Either way, here are the links …
Introversion
Cliffski’s Mumblings
GameProducer.net
Lemmy and Binky
Reality Fakers
Zoombapup
BoneBroke
They Came from Hollywood
gusmueller
Filed under Misc | No Comments »
Thursday, November 23rd, 2006
I’ve been reading this book by Joey Lott and Danny Patterson since yesterday and thought I’d loose a couple of words about it …
The book starts with a chapter about application design where it explains how to go through the analysis-, design- , implementation and testing phase. It introduces how to utilize Use Case- and Class Diagrams and then gives a lesson on how to use FlexUnit for unit testing. In the second chapter is a good explanation about why and how to use Interfaces (instead of Inheritance) and after that it goes into detail with teaching nine of the more common Design Patterns, namely MVC, Singleton, Factory/Template Method, Proxy, Iterator, Composite, Decorator, Command, Memento and State. In part 3 of the book you’ll find in-depth information about AS 3.0 features like Events, data IO, E4X and Regular Expressions.
(more…)
Filed under Dev, Random Picks | 3 Comments »
Thursday, November 23rd, 2006
“…Once you activate the product, then you would assume that you are golden to go ahead and use the product, right? Wrong.
You see, even after you activate the software it will, according to
the EULA, “from time to time validate the software, update or require
download of the validation feature of the software”. It will once again
“send information about the…version and product key of the software,
and the internet protocol address of the device”.
Here’s where it gets hairy again. If for some reason the software
“phones home” back to Redmond, Washington, and gets or gives the wrong
answer - irrespective of the reason - it will automatically disable
itself. That’s like saying definitively, “I’m sorry Dave, I’m afraid I
can’t do that…”
… So basically add some regular activation annoyances to your almost weekly Windows security updates to keep you from working on the PC!
Read more here … Vista’s EULA product activation worries | The Register
Need more reasons to switch to Mac or Linux?!
Filed under Misc | 2 Comments »
Tuesday, November 21st, 2006
This is not really a true productivity tool but I think it has enough value that it deserves to be mentioned. If you’re on Windows and work with the Command Prompt a lot, you might be fed up with the overly dull look of the black Windows command console and you look over to the Linux guys with their stylish terminals with envy. Then it’s time for you to grab and install Console, a Command Prompt enhancement that adds several useful features like multiple tabs, text editor-like text selection, different background types and - the real deal - transparent background. This alone is reason enough to throw the old console look overboard. The console font as well as window size and position can be configured. Get the latest release version 1.5 at sourceforge.net/projects/console/ for free.

Filed under Misc | 1 Comment »
Monday, November 20th, 2006
This might be old news for you but I’ve just coincidentally stumbled over an ActionScript 3 class named FZip that was written by Claus Wahlers and Max Herkender which provides functionality to load standard Zip compressed files into a Flash movie and unpack them on-the-fly. This is amazingly useful and I can see a lot of possible use for it in the future.
It also reminds me of an AS 3.0 framework that I started to write a while ago which provides all kinds of file reading and writing means. It can read and write compressed and uncompressed XML-, text- and binary files. The file writing is currently only done by use of mdm Zinc but support for other data storing methods like for example LSOs are planned and I can imagine that this could be extended with native file writing once Apollo is live. Also the compression it uses is based on AS3’s own ByteArray GZip compression but it writes it’s own custom header tag to the files to identify the file type, compression, original file suffix etc. Eventually I also started to add encryption classes so the compressed data can be encrypted before.
However this started as an offspring from my current game development project where I want to use it to keep external data files compact and it is still in beta. Now that I found FZip I’m thinking about adding support for it as well so the publish date for this is delayed a bit more.
Filed under Dev | 1 Comment »
Sunday, November 19th, 2006
Just found this yesterday via Adobe Consulting Blog … Converse - Chuck Taylor, Jack Purcell, Basketball Shoes, Design Your Own Converse Shoes. Click on the first shoe under Collection. You can design your own sneaker with your own style of color combination and even add a personalized text at the side or back. I first thought its a nice gimmick for playing but in fact you can order your designed shoe in your preferred size! I’m a big fan of classic sneakers but I have rather large feet and finding large sneakers in Japan is more than just a challenge so I thought I’d make my own couple of neatly colored Cons and order them … until I saw the Shipping in U.S. only sign! Damn! Well at least I could print my design out. Here’s my low top suede model ‘Venice Nights’
…

This shoe designer is a nice example that shows that Flash really needs to support 3D! Imagine you could freely rotate and texture the shoe model! Wouldn’t that be cool?!
Filed under Misc | 9 Comments »
Saturday, November 18th, 2006
I’ve been using Interfaces a couples of time now when needed but I never fully understood those down-sized Class construct wannabes. I knew they are useful when it is required to have an universal type for different objects but I haven’t fully grasped to scope why they are so useful otherwise. Also the fact that they can’t contain properties and only public method declarations confused me.
(more…)
Filed under Dev | 2 Comments »
Saturday, November 18th, 2006
If you’re working with XML on Windows and you like your tool full-featured there’s a good chance that you have worked with Altova XMLSpy, a first of all very good and powerful XML editor but on second look becomes a nasty bugger that calls home as if there is no tomorrow.
Thats fine and good! Let them try it to call it home as long as they want, I can block it with my Firewall! It was noted by some other blogs that XMLSpy not only transfers data to check the legal ownership but also transfers private data that is none of Altova’s business, so there is good reason to block the spy (what a fitting name!) off!
But what if you want to use the Eclipse (or Visual Studio) XMLSpy PlugIn? If you block Java’s JRE, Eclipse also can’t connect to the web anymore. But fear not, there’s an easy solution. Here’s how to block off XMLSpy …
Go straight to your WINDOWS/system32/drivers/etc/ folder and add the following line to the host file:
127.255.255.255 link.altova.com
This redirects every access to link.altova.com to the local machine, thus blocking of connection attempts. With that you’re free to let Eclipse access the net while XMLSpy has to stay inside the system.
Filed under Misc | 3 Comments »