When writing classes for a framework I usually put a custom toString method into important classes so that debugging becomes easier. Normally they would go like something along the lines of:
But writing them rigid like that is a disadvantage when you decide later to refactor class names. Admittedly it’s also not a very elegant way so I got the idea to take the class name that is returned by getQualifiedClassName(). The only problem is that getQualifiedClassName not only provides the type name but also the whole package String of the class. Regular Expressions to the rescue! After twiddling around with them for a while (I’m by no means a RegExp expert) I got my toString method into the shape that I desired:
This way it matches the String returned by getQualifiedClassName with the Regular Expression [^:]*$ which checks from the right end for an arbitrary text up to the first occurring colon, but without including the colon. Taking the first element of the Array returned by match() and you got what you need!
A nice way of using this is when writing abstract classes that contain the toString method and any subclass can use that toString method without the need to override it … that is of course unless you want ot add other output information.
In this tutorial I will explain how to create a relatively realistic looking galaxy with Photoshop. I was searching the web up- and downwards to find any tutorials that could tell me how to get a similar fantastic result. There are like 100.000 planet tutorials out there and the few tutorials which were about creating a galaxy where either very basic or the result looked like everything but a realistic galaxy. The galaxy I wanted should have looked massive and intricate … just like the real ones but with a slightly more artistic touch. I’ve needed a galaxy that I could use as a star map for a space-themed roleplaying game design and the image you see above is a part of the result. Let’s go try to do such one …
Kore 2 from Native Instruments is probably every sound organizer’s wet dream with sugar on top. Not only can it control a multitude of Softsynths but it’s database makes it easy to organize sounds and find them quickly when needed. I’ve purchased this nice tool last December and what’s better than telling a few details on how I put it’s features to good use?!
Download: dark & modern looking UI skin for Ableton Live 6/7.
A while back I’ve created a custom skin for Ableton Live with this handy freeware skin editor. The editor dates back to Live 6 but it seems that skins made with it work just fine in Live 7. Live’s approach to UI design is very minimalistic which I think is a step into the right direction but the default color palettes are not everyone’s taste. I’ve been using this skin since a couple of months and it works nicely so here is Dark2008, a dark - but readable - theme for Ableton Live 6 and 7.
While Jagged Alliance is without discussion one of the finest squat squad-based strategy games ever made that has seen the daylight, I especially enjoy the ‘personal’ characteristics that the mercenaries bring with them and the frivolous Butt Groping demonstrated in this clip shows this side of JADG nicely. The map seen in this video is one of the scenarios that can be found here.
In game development randomness is often necessary for certain tasks, be it the random distribution of graphic tiles, a random factor in NPC AI or random stats in a roleplaying game. Especially for the latter purpose the static Dice class provides a set of methods to roll dice as it is common in a Role-playing game, to be exact four-, six-, eight-, ten-, twelve-, twenty-sided and percentile dice.
The AnimatedBitmap class provides functionality for Bitmap objects that are animated by using a series of still images. When creating a new AnimatedBitmap you provide a BitmapData object that contains an image that consists of the ’single-frame’ images for the animation.
Alcon is a lightweight debugging tool for ActionScript developers that provides several straightforward and quickly accessible methods to debug any ActionScript 2 or ActionScript 3 application, be it from the Web Browser, the standalone Flash Player or an AIR Runtime. It offers an easy way to output debug information from anywhere, not just while in the Flash IDE or in the Flex Debugger. It comes packed with an Application Monitor that can monitor the framerate and memory consumption, an Object Inspector for viewing the properties of any Object, Array or Class and up to two File Loggers. Alcon runs on any platform that supports Adobe AIR and can be used with the Flex compiler, the Flash IDE or MTASC.
FEAT (abbreviation for Freelancer’s Estimation Assistance Tool) is a tool to help freelancers calculate hourly rates and project pricing estimates. It is inspired by a very similar calculation PDF sheet which was created by Lauren of creativecurio.com and by some other useful freelancer pricing resources on the net.
The tool uses the same calculations like the ones from the links mentioned above plus it stores your values so you don’t have to enter them again every time. Version 1.0 features hourly rate calculation, a project pricing wizard and an option to change the visual theme of the tool. It also resides nicely on your desktop or wherever you put it and is there whenever you need to make an estimation.
Recently I needed a HashMap for a project to map key/value pairs but in that particular case the Map required to map not just one but several values to a key. I could have used an array or object to store the values in and map that one but in practice it turned out that accessing the map looked rather messy. It would be much more elegant to have a map to that multiple values can be mapped directly. After some investigation (strangely even Java seems not to have a MultiMap included) I came up with writing my own MultiMap class, so here it is!
These are the adventures of a random guy trying to be an independant game developer, utilizing ActionScript for programming and talking abouting gaming and nonsense in general.
Review: V-Scroll-Shoot’em’ups with MAME
Nothing rocks more for a spontaneous minute fun than playing a session of arcade shoot’em’ups! They always kicked up the limit of graphic power in the eighties and nineties that home computers couldn’t provide! Nowadays someone who collects and eventually owns a room full of arcade machines could count himself to the...