Gaming Your Way

May contain nuts.

Air today, gone...

Air. The future of RIA. Unless you try and actually use it.

I've been wanting to write a swf encryptor for ages and last night I finally cracked ( As I'm working on something that I really don't want decompiling for various reasons ).
It was a toss up between Zinc and Air, but I opted for AIR 'cause in theory it is the future and therefore should have better support than Zinc.

So after all the hype surrounding Air I should just be able to google around, find out how to drag and drop, save a file and some other basics. I develop in Flex rather than cs3 'cause it's a million times better, but any search for Flex and Air just brings up examples using MXML. That's not great.

Eventually I found a hacky way to create an Air project in actionscript in Flex ( It's so convoluted it's untrue. You create a Flex project as opposed to an AS one as usual, tick the Air box, but on the part where you set the document class you alter the mxml extension to .as and it works ).
Getting there. Published the main class and up popped... nothing. More searching and I found out how to set it up ( A big thanks to Toby for blogging about it, without his words I'd have given up all together ).

Cool, got a window in place now. Close it, try publishing it again, and... nothing. Lot's more searching ( And swearing ) and I found out what the problem was, and the cure. If you don't exit your app correctly ( ie call an exit() after adding a listener to the close button ) then it doesn't actually exit correctly ( I found this out myself after a lot of messing about ).
When you publish an air app it runs something called adl.exe ( Adobe Debugging something. I've had enough air googling for a life time so can't face looking it up ) which runs the swf wrapped in the air api.
If you don't call exit() then when you close the app adl.exe keeps running. Ok, that's not the end of the world. What actually is though, is that you can only run one instance of adl.exe. If it's running after you've closed your app incorrectly, then you can't run any more air apps.
The beautiful thing is, it doesn't tell you. Flex doesn't tell you either. It's like they've ganged up to keep us in the dark.

Until I figured out the whole exit() thing, I was working with task manager open closing it down every time. The only solutions I found online were, yep, work with task manager open and...

Ok it kinda makes sense, and if you've got to call exit() then you've got to call it, but c'mon, this is the future of RIA and I've got task manger open to kill it ?
It all feels very beta-ish, from the hacky way to even create an Air project in Flex to that.

Once I got past these hurdles, I must admit it wasn't that bad. The lack of docs ( I only found this after I'd gone through a lot of pain ) has made it a less pleasant exercise than it should have been ( Oh joy, another mxml example for something I want to do with code ).

One weird thing which I'm putting down to me is that when I drag and drop a swf into my sexy little app it runs the app twice. I don't mean it opens another window, it just runs through all the code twice ( In alcon I was getting,
"wtf ?"
"wtf ?"
which was a bit of a give away ). A little kludgy check cleared that up.

At present we've got a simple little app which you can drag a swf onto, it then encrypts that with blowfish via the very nice Crypto library and you can then save that back out.

Next up ( And what I've been swearing at for the past hour or so ) is the decryption routines. Well, the code is being embedded and decrypted, it's just figuring out how to then make that byteArray run as a swf rather than just sitting there annoying me.


The Real World of Games

Moms have tried their level best to prevent their kids from holing up in their rooms with their eyes glued to a computer screen and their hands busy at the controls of that new gaming console. But video game enthusiasts have found a way to beat this hurdle and prove to the older generation that these seemingly useless ways of passing time do have their practical uses in the real world that we inhabit.

•    Video game technology has been used with varying degrees of success to teach children with autism at the University of Victoria in British Columbia. The games are effective teaching environments because of their richness and continuous nature. Video games have also been used by researchers at the University of Edinburg and the Glasgow Caledonian University to study cognitive skills in autistic children by using software that recognizes gestures and movements and translates them to the screen. This would help bring out skills that they possess but are unable to showcase because of their inability to speak.
•    Video games are being used as tools to teach business prep programs by global accounting firm Deloitte & Touche USA to help develop their future talent pool. High school children are invited to participate in a gaming competition that will test their skills in conducting and planning events and raising virtual money. The games help them learn business, ethics, money management and decision making.

•    Virtual gaming worlds like Second Life are being used as 3D simulators to view plans and diagrams of real world drawings in three dimensions as opposed to the flat two dimensions we see on paper. The realistic drawings are used to conduct training programs and make changes to the system as well.

•    Corporate houses are saving tons of money by using Second Life as a gallery to showcase their advertisements, posters and other design materials in 3D settings to employees and clients all over the world without having to travel miles to achieve the same. There’s also the fact that this move reduces the amount of fossil fuels used up in traveling and hence is beneficial to the environment.

•    More and more surgeons are taking to video games now that there’s a study done that proves that game-playing improves the dexterity of their fingers and helps them during surgeries.

•    Moviemakers are using 3D gaming environments to simulate three dimensional models of characters in different poses and styles in record time. In a life prior to Second Life, physical models would have to be built and tested to achieve the same effect.

The future of gaming holds a lot of promise – we may be able to visit a supermarket from home, pick up things from shelves and feel them before we use an online checkout cart, all in the near future too.

This post was contributed by Kelly Kilpatrick,who writes on the subject of the top online colleges. She invites your feedback at kellykilpatrick24 at gmail dot com.

Banks. So you want me to just hold my ankles yeah ?

Credit crunch. Man I am ever sick of that term.

Hold my a hand a minute or two whilst we go on a brief trip back in time.

Way back wealth was gauged in precious metals, mainly gold. Coins were made out of it to make life easier. Then to make life even easier they was replaced by paper bills. A bill is simply a promissory note to be exchanged for specified goods or services. On the £10 note I've just fished out of my wallet at the top it says "Bank of England. I promise to pay the bearer on the demand the sum of ten pounds". Cash is purely symbolic, it's still easier than a big sack of gold, but at the end of the day it's still just a way to show how much gold you've got. That tenner is worth £10 worth of gold, which is known as the "Gold Standard".

Sticking with the whole gold thing, the original bankers were actually goldsmiths. They worked out that it was really unlikely that everyone who had their gold stored with them would ask for the whole lot back in one big hit, so they loaned money to people based on a percentage of the gold they had bagged up in the back office. It was a bit of a balancing act, a war could come along and everyone would want to withdraw their gold in one go ( Which would lead to a "Bank run" ) but as they were charging interest on these loans it was worth the risk.

To quote author G. Edward Griffin, "[bills] are made in such vast quantity that it must equal in amount to all the treasures of the world".

Being able to print your own money is in an easy fix. Governments soon realised that you know what, fuck it, we haven't got that much gold stored away but we can print some more notes as we're running a bit low ( The process of lending out more money than you have actual gold for is called "Fractional-reserve banking" ). The offset of this being, the more money there is, the less it's actually worth  ( So my £10 isn't actually worth £10 of gold, as the Bank of England has printed more notes than they've actually got gold to cover. They no longer adhere to the gold standard ). The process of too much money in the economy causing it's actual value to decrease is inflation ( When it's all going wrong it's just a downward spiral, as can be seen with what's going on with Zimbabwe's inflation rate ).

Let's go back to the good old Bank of England. It sets the base interest rate. This is basically the interest rate it charges banks for borrowing money from it. Currently it's 5%, so all the banks who want to borrow a couple of quid pay 5% on that. Now on the vast sums that are shifted around, 5% is still a ton of money coming back.

Ok, I want to borrow a couple of quid. I can't go to the Bank of England directly for a loan, so I'll go to my local high street bank. Now this is where it gets really beautiful, having a quick look at a loan comparison site, the best I can get is 7.8%
There's a bit of profit there.

Back again to Fractional-reserve banking. It is what it says. A bank only has to keep a fraction of the money it has in reserve. Say you've sold a kidney and have £10,000 to put in a bank. The bank only has to ensure that it holds on to a percentage ( Or Fraction ) of that £10k.
In the UK that percentage is voluntary  (According to the wikipedia link above, in 1998 it was 3.1% ).

You've gone to the bank and paid in your £10k. Looking at savings rates, if you want to be able to take your money out fairly soon then you're looking at getting around 6.5%. Now lets say the reserve rate is 10% ( As it is in the US ). The bank will have to sit on £1000 of your money, the rest it can loan out. At 7.8%.

Not only do banks get a cheaper lending rate from the Bank of England, they make money on your money. Sweet.

So who's actually making all this money ? Who owns the banks ? Well, they all do. It's like cash incest. Despite it not even looking like a direct link, they all own shares in each other.

Right hopefully I've set the scene for why banks are not the most likable institutions. I can finally get to the part that really grinds my gears.
If a bank goes belly up, the government will dive in and "rescue" it. It happened with Northern Rock and the US has just sanctioned a bail out scheme.
As a tax payer ( The driving force behind this huge rant was a really snotty phone call from the Tax man at 5 past 9 this morning. Just 'cause my form and cheque haven't got there yet doesn't mean I want to be spoken to like I'm a fucking rapist first thing in the morning, thanks ) I now own a share of Northern Rock. Or rather, my tax is paying to keep that bank afloat. As more and more banks get into trouble more and more of our tax will be spent shoring them up.
In the current climate mergers are going to be more common place ( Such as the Lloyds / HBOS merger ). The credit crunch is a bad scary thing, we're all paying more for things in shops, getting a loan or a mortgage is a lot trickier, but in two years time it'll all be forgotton. But these huge banking mergers which have actually been sanctioned by the government will still be in place, giving us as consumers less choice than before.

To recap. Banks can borrow cheaper than we can, and then lend to us for a profit. Banks pay interest on what we save with them but then lend it back to us at a profit. If we fail to repay that loan we can either be imprisoned or have our property taken. If a bank gets burnt by lending money to too many people who then default, our income tax will help keep it going, because the other side, the bank crashing, is even worse for the economy than nationalising it.
It's pretty much stacked in their favour on every level. You bounce a cheque you'll pay a £30+ fine, they screw up by taking too many risks ( ie To generate even more profit for their shareholders, the majority of which are their fellow banks ), we pay again to prop them up.

A very simple and naive summary I know, and possibly riddled with flaws. If you want to read real facts rather than my stabs in the dark I can recommend the book "The Shock Doctrine" by Naomi Klen ( Check out Amazon ) which equates the money markets to actual physical torture, and is an eye opening read.

Hang on, this has nothing to do with Flash or games. Arse.


What to read, and where

Ryan at freelanceflashgames has compiled another one of his cheeky lists.

This time it's regards blogs. We're in there at 14, which isn't bad, but I think we need to bump that up a little. I just need to think of a subtle way to do it.

Full flash CS3 serial download, flash CS3 serial serial, flash CS3 serial crack, flash CS3 serial keygen, flash CS3 serial free new torrent ddl.  Full photoshop download, photoshop serial, photoshop crack, photoshop keygen, photoshop free new torrent ddl. Paris Hilton Movie video interviews, celebrity photo galleries,...Paris Hilton Movie Collect the Latest and Hottest Gossip and ya podaru tebe lubov'

So skip on over to the page and see what other 13 blogs you should be reading before coming here.


PS. Can I just say it's amazingly hard to find content spam to copy / paste when you're actually looking for it.

Being a whore has never been easier

Ryan over at freelanceFlashGames has just posted an epic list of sponsors with links straight to their contact pages, and even sexier, has put them in their alexa rank order.

So if you're in the market for whoring your latest game, pop over there and remember us when you're rich.


Blam me baby

Here's a funny thing.

Law of the West Pinball was posted to newgrounds. All good so far. Got a score of around 3.15, nothing great. Some helpful feedback, some pointless ( Well, one pointless ).

Being kind of anal I check back on it now and again, and this is the weird thing, it's score is going down every day. Every day, someone is voting it down.

Now it was never really on the radar, I've never linked to the NG page anywhere ( I don't really like to, it feels very "Here's my game. Oh look, you can vote for it, I never noticed that before. Well, whilst you're there, give it a 5. Please. I'm needy." ) so it seems really odd that either one person is going there everyday fuelled with petty hate and knocking it down slowly but surely until it goes the way of Chimbo and gets blammed or someone new is stumbling across it every day, and hating it that much that they're voting it down.

I'm not sure which is worse actually.

I just thought I'd mention it, as it's bugging me slightly, and what other reason is there to have a blog than to be self indulgent and post about petty things ( Tomorrow, "Why do people wear shades on the underground ?" ).


I can smell an alpha version.


CC is going to become early alpha tonight. I spent the last week adding levels and testing them along the way (which takes some time because they are quite ... complex ... and not easy to play). While making sure the game behaves like it should and fixing things that don't work quite like expected.

There are still some features missing and *a lot* of love left to add, but I think the engine is pretty solid now, it runs smooth in the editor and because it's tilesize independent it should also run in game mode (I'll see that later today).

Marmotte from dot-invasion has dome some georgeous tiles so this is done, too.

Basically there are a few renderings left (mainly for the player deaths) and I have to do all the sounds (including a lot of speach) and music.

And for the sake of it:
Our hero ...


Aiming at the big one

I think it's time to question my motivation.

While working on client projects, I allow myself always a more or less big "sideproject" (because as Bill Murray put it in Groundhog Day: "Keep the talent happy.").

I usually try to stay on the easier side (game wise), but I'm not the button basher game type of developer, although I tried it ...
When sitting there and plotting down ideas, the transform from "one week and done" to "woha that's big" is almost instant.

So let's just accept the facts.
Looking through my sketches it shows that this is again no quick and easy project, I see a lot of locations, all done in 3d, different maps, a story that ties it all together and of course weeks of work.
I think that anyone with some gamecoding background (i.e. coding games beyond the scope of flash) is looking for: the big one. A real game.

Puzzle games are somewhat of a different league beside all the clicketyclick-crap that is called "game" and not many flash games reach into that region for me.

One of the few ones I admire for it's depth is Luxregina's Two Kingdoms.

But how can you compare a flash game to a "real" game?
Savegames? Maybe.
Levels? Maybe.
Story? Maybe.
Depth? Certainly.

What was I talking about?
One of the questions that keep bothering me for the last days is: does it pay out?

Beside the fact that it will be quite fun to do a big game, this one question is really nagging me (espeacially since the LotW hacking incident).

There's the fact that flash isn't save at all. each damn script kiddy ot there could grab this application (which name I won't tell) and just open your swf and change a lot of things without even having to dig through the code. Changing an image or adding a new button is a case of a few mouseclicks. AS3 seems to make it a bit harder, but I doubt that it will be forever. (Maybe there might be some sort of solution, Squize and I have been talking about a ugly way of protecting you game from just changing things on the fly, but we need to test that before I can tell you more)

Using Director isn't an option at all and one of the environments that really would make me go away for coding a game isn't yet reachable because the dev environment is on Mac only and I don't have the space to have another box standing around, here even if is a pretty one.

Because we all know that such a project is normally for pleasure only, you still have to ask if you can get the odd quid out of it - can you?

Sponsoring isn't a route, because as I see it it's not a win situation for the developer, the exposure gained doesn't reflect in website traffic at all. The money isn't nowhere near what can be charged for a client development or an exclusive deal, but it's unlikely that you get one.

Ingame ads seems to be an option but you need some fairly good exposure to reach numbers that pay out well, too.

It's all personal again ...
So it all sums up to: do you enjoy doing such a big game. Well I certainly would. But there are doubts.

K. let's get back to some coding of CC, and later this week some tests on security ...



As regular readers will know, we've been done over with a hacked version of "Law of the West". Instead of just bitching about it, we've decided to be pro-active.

This is going to take a number of forms, one of which is SICO, or "Source In, Crap Out".
We looked at what encryption and obfuscator software there is out at there, and came across irrFuscator. It looks pretty cool, and at 69 euros isn't going to to break the bank, but it also looked like it was something we could do ourselves without too much effort.
Where SICO fails compared to irrFuscator is that from what I can tell it takes the whole project and messes it up, so public functions ( And therefore getters / setters ) get screwed with too, whereas our project just takes one file and so has to leave anything which could be called from a different class alone.
Also it converts strings, but it looks costly. Looking at the example on their page, "end" gets converted to irrcrpt(23, "uzd."). That kinda looks like a static class is added to the project with a method called irrcrpt, which takes the first value as the "key", and I guess it's just a simple XOR with the string value.
Fine for scrambling a filename, but I think it would be too harsh [ In performance terms ] to do that to every string in the game, so it's easy enough to just add a method in like that by hand for your filenames / passwords / cheat codes etc.

( In case this reads like I'm just bashing irrFuscator, I'm really not. It's better than SICO, I'm just pointing out the differences ).

So what can our baby do ? Here's the loader class we use for it:

package Classes {  
    public class IO {

// Properties
        private var loader:URLLoader;
        private var callBack:Function;
        public function IO(){
Null constructor, we don't need to do anything here


// Public
        public function toString():String {
            return "IO";

        public function loadScript(filename:String,callBackArg:Function):void{
            loader = new URLLoader();
            loader.addEventListener(Event.COMPLETE, xmlLoaded);

            var request:URLRequest = new URLRequest(filename);

// Private
        private function xmlLoaded(eventArg:Event):void{


And here's what it looks like after being run through SICO:

package Classes {  
    public class IO {

        private var _V64K0q:URLLoader;
        private var _87qjufb1lsM:Function;
        public function IO(){

        public function toString():String {
            return "IO";

        public function loadScript(M85u8En4i:String,_87qjufb1lsMArg:Function):void{
            _V64K0q = new URLLoader();
            _V64K0q.addEventListener(Event.COMPLETE, _v1zr6rD62q);

            var kDu541CN2C5:URLRequest = new URLRequest(M85u8En4i);

        private function _v1zr6rD62q(_wVl6q:Event):void{

Pretty mashed up. There are still some quirks to it which need ironing out, and it's not got a list of reserved words or anything that cool, but that code is nasty once run through it.

Next we need to actually make some sort of front-end for it, ideally using Air to get to play with that, more possibly with Zinc to make it easier, and then decide what to do with it. It won't ever be for sale, it may be a case of we just give it to friends and let it spread gradually like that, we're not sure yet, but it will be given away. There's no point bitching about hacking, and then coming up with something that makes our stuff safe and screw everyone else.

And that's part 1 ( Or 0.5 ) of our push to try and get the community as a whole being a bit more protected, there is more to come. Olli and I have had some long chats the past couple of days. We both came to the conclusion that yeah, having hacked games floating around sucks, but there are some things which are more acceptable than others.
If LoW had been hacked to use the hi-score component of the system it's been hacked for ( Some "shovelware portal in a box" system ) and everything else had been left intact, then we can swallow that. Just. The game gets spread so the sponsors happy, we get our credit out so it's not too bad for us, the ad gets seen etc. It's not that bad. It's only when the game is just ripped of everything like that we get pissy.

Part of this process of stopping it is to actually get involved with the boards that link these games, for fear of sounding like a politician, it's about education. A lot of sites with hacked games on are run by decent people, just trying to make a couple of quid, and not really knowing about any harm they could be causing 'cause they never ever have any contact with a developer.
Flash games are percieved as such a throw away commidity that the line between IP theft and hosting becomes very blurred. A lot of people who run boards wouldn't dream of hosting mp3's, but see Flash in a totally different light.

We really fucking resent having to spend time on things like this, but if we're in the position of toying with ads and sponsorship as well as the client based work, then we need to protect our IP. Like we all do.

There's more coming,


The curse of the generation C64 ...

This is somewhat of a rant post (again), although, it might just become some sort of history lesson... we'll see where it ends.

My current game somehow managed to be a real endurance test (as you might remember, if not, read it here), a lot of things that I had never done before, or at least not very often. The combination of the specific genre and the "new" language ... well it took it's time.
As a minor update on this, the game now seems to become more playable by the minute (oh, and yes, I rewrote the damn movement routine, dropping about 50% of the code needed making more stable and of course working - yet again I wonder why I haven't wrote it that way in the first place ... well never know.)

So while coding I started to look ahead for my next project. One of the things I didn't want this time, was to re-invent the wheel, so I had a lok at the game-engines I had coded so far and I discovered one, that never had been used in a game before, but was 100% working. It lacked of course all the nice and shiny things, it was just a working, ugly game - but something a lot of people seem to like (looking around the casual game scene).

The decission was quite an easy one, ignoring the fact that this is just a "me too" game.

Let the ideas come ...

Think, think, think.

One by one the ideas came in, this usually a blend of things I like or like to use, but hey, we're just at the beginning.


This time I want something less bloated, slick, clean, minimalistic UI. Once again, I've spend a good time just hunting for inspiration, playing a few of some of the best minimalistic games I've managed to find so far, Tonypa's. They are slick, clean, easy to pick up and don't contain more than the barest minimum of visuals.

Great. Wait. It would be nice if I would add a hint of a background story ...
Oh, and for that I have a great set of visuals in mind ...
Hey, what if I let the player decide what to do next, even though it's just a puzzle game ...

Darn. That's for "less bloated, slick, clean, minimalistic".

Why do I think that this belongs into a game - trying to find the answer.

First of all, I don't like 99% of the mini games that are available in flash. this includes all the "tunnel games", "click as fast as you can", and even praised games like "filler" (which is a nice variation of the qix heme) leave me cold.
I think, it may be, because I've seen their predecessor in various forms on different systems before.
OK, so for me there needs to be some sort of substance attached to a game.

I grew up with a c64 and I collected games (as nearly everyone of this time did), I think my collection had over 2000 games, most of them well, not quite legally optained. But I also owned some original games and paid real money for them. (30 DM, which was a fucking amount of money for a 12 year old school kid).

Anyway these games pretty much defined what I like about games and what not, I like pretty visuals (ok, compared to today those old games look really shit), I like good sound (and I think it's essential for a game) and I like some sort of depth (just clicking and holding for creating a filled circle is it not), a simple form of variation ...

I even tried to add that to "Law of the West", which is a bit shallow, to be honest, but there is some sort of variation in it.

Most of the full price games had at least one or the other, even the low price games from Mastertronic had a lot more game to it than some of the hyped flash games.

Back to pen and paper ... and forget "quick and easy"

Just before I started to write this (and bore you to death) I grabbed a pencil and some sheets of empty paper and began to sketch things out, draw a few charts about the progression of the game and what kind of things I want to add in order to distinguish my "me too" game from all the successfull ones that are already out.

So far I like what I came up with, as I believe I have added some unique things to the core gameplay. Of course it is way bigger than what I wanted in the first place and for sure just as I write this, someone had the same ideas.
To make it even more ... well, use a word you like ... I decided to go with a Pirate theme (still very popular, and although my first idea was to make a third LotW themed game, but I couldn't fit in the ideas I wanted to add)

The basic tasklist so far looks like this:
  • draw a worldmap based on the Caribbean Sea around 1500
  • create a set of outdoor images for the menus and ingame screens
  • maybe create some 3d characters (so it won't look like Myst, ... yet I still want to do my own Myst-like flash based adventure game)
  • draw a map of the decissions a player could make
  • draw the level maps/playfields for the levels (I mentioned it's some sort of puzzle game?)
  • decide on extras that can be used to help the player
  • create a list of nice "medals" (more about that in later post, but right now, play the LotW Pinball to see some).
  • find a way to allow savegames, either over the server, or using a code or shared objects

I'll let you know where this ends, and maybe (if there is interest) I go into detail and post some of the sketches and early renderings.
It seems like this one became a bit more than a simple re-use of an already existing game engine. It also seems that I decided to go a good deal beyond the usual flashgame timewaster - and it clearly shows that I'm nuts. I don't even know if there is money in this one (either as license or (most likely not) as sponsored game (as I had my share of sponsoring madness so far).

stupid me.