news's blog

Convert multiple images

The question was, how do I convert many graphic files (TGA) at once to other format (PNG, JPEG etc.)?

After spending some time on the net, I've found a simple solution. For batch convertion, there's a nice utility, ImageMagick Convert. It's often used on web sites (Wrenchgames is not an exclusion).

another one in progress

Another port of a casual game has reached Alpha stage. Come again soon & play!

Another useful piece (ActionScript3): dump the contents of a container

Here's a nice as3 code snippet that comes in handy. It dumps the content of an object, and all of it's elements recursively. This is a very common tasks, the code lets you avoid headaches.

public function dump(object: Object, indent: String=''): void {
   indent+='\t'
   for (var s: String in object) {
      trace(indent+s, object[s])
      dump(object[s], indent)
   }
}

Let's imagine we have a complex structure of this kind:

   var object: Object={
      item1: { subitem1: 'something1', subitem2: 'something2' },
      item2: { subitem1: 'something1', subitem2: 'more data', subitem3: 'something3', extra: {subitem1: 'extra data 1', subitem2: 'extra data 2'} },
      item3: { subitem1: 'something1', subitem2: 'something2', subitem3: 'something3' }
   }      

When you execute the code above, passing the object as argument, you get a neat list in your console window:

   item3 [object Object]
      subitem3 something3
      subitem2 something2
      subitem1 something1
   item2 [object Object]
      subitem3 something3

PeaceCraft is coming soon

Another game has been ported by us to Flash. Check again soon to see this great game by NevoSoft!

A tip for Flash developers: how to get rid of #1088 "Bad XML markup"

If you get the annoying message '#1088: The markup in the document following the root element must be well-formed', here is (possibly) the solution.
Some say, the slash is necessary in the opening tag (like <"entry"> is not correct, you should write "entry /">. Some say there couldn't be more than 30 items in the root element. The truth is out there, just do the following:

  • Check if there are any extra characters in the beginning. For example, UTF-8 header (also called BOM, Byte Order Mark).
  • Check if there's 0x1A (#26 ASCII, 'EOF') in the end of the file.
Syndicate content