Wednesday, April 15, 2009

Not dead, just mortally wounded

Thought I should post something up explaining our quietness here recently ( And to thank our friends at other blogs for keeping on linking to our puerile words ).

nGFX's has had bits and bobs to do outside the GYW world, plus he's currently hard at work on a cheeky Unity game which when I last saw it was looking pretty damn nice ( And not an obvious Unity game at all ).
We had a chat today and we're looking to try and be a bit more pro-active with other Flash devs looking towards Unity, it's something I spoke to John ( Mate, update your blog! ) and Chris ( I didn't know pinball was on there, sweet ) about when we got drunk the other week, the whole "We're on the same side, let's share Unity stuff more".

As for me, my personal life has just turned to shit the last month. If I was on Facebook I've have to change my status to single. To be honest that's knocked the shit out of me and I've had to re-evaluate everything ( 8 weeks ago I was still blindly thinking how I could get enough money for the wedding in August, now I'm wondering if I'm even going to stay living in London.
Sometimes life is great, a joy where you can actually take for granted there is a God and you can almost feel Him straightening out the path before you, that your soul really can soar and although today was great, tomorrow is going to be even better again. Other times life is just a cunt ).

Anyway before this turns into an angst riddled wail of a blog ( I can think of very few worse themes for a blog. We all have emotional turmoil, it doesn't mean it's a valid thing to share in a public medium. I'm just trying to justify my apathy rather than screaming [ At the moon ] for help ) on the work front I've just today started a new project with thebasement which I'm really pleased to be doing, and it's a chance for me to work with ickydime which is more than cool.

I'm sure as my "whats the fucking point ?" attitude slowly gets replaced by anger I'll find my old venom and we can return to normal posting here ( For example, the GameProducer blog really bugs the hell out of me, but I can't slag it too much 'cause it'll be sods law that the next post on FlashGameBlogs after this one will be one from there, but seriously man, to be a game producer you have to actually produce a game. The clues are in the actual words. It's like me starting a blog about being an author, when I've not actually written anything. There's a world of difference between wanting something and actually doing it, otherwise we'd all have had sex with twins ).

Hmmm, I'm starting to feel more like myself.

Squize.

#    Comments [11] |
 
Wednesday, April 08, 2009

Thank you for wasting my time

This is going to be a rant post - yeah!

If your following us on twitter, you might have noticed my tasks for yesterday:

"Quick update on the CMS then coding on the first unity game"

Well, I didn't get to the unity game part, thanks to some weird flash (bug) that wasted 5 fucking hours of my time and still is inresolved. Here's a quick rundown:

For our new german site I wrote a simple flash based menu/header which reads in an XMl and takes two params. The xml reading was all done, but I needed to pass the params from the asp.net page to the header. I decided to use loaderInfo.params for the sake of a quick and dirty solution and then it all went down the drain ...

Testing params in THE IDE doesn't work, so I published a HTML page withit (I did mention that so far the menu worked very well?).
But opening the file locally in FF 3.0.8 did do nothing ... no menu generated from xml, it just showed the background shape.

OK, lets try in IE (6, 7, and 8) and it worked just fine, params passed, menu displayed.
Chrome worked, too, same with Opera...

FUCK! Why doesn't it work in FF?

Next thing I tried was to upload the whole lot and tried it from the server - and look it worked in FF, too. ONE FUCKIN TIME! After the file was chached it quit working just like it did offline. (All other browsers still worked just fine).

FUCK!

K, let's add some outputs to the loading process - and viola the problem was quite easy to nail down ...

Here's a stripped down version of the code: (I used a document class and a single frame with a few vector shapes on it and some textfields with an embeded font only)

Code:

/**
* ...
* @author nGFX
* @version 1.0
*/


package {
    
    // skipped imports

    public class Preloader extends Sprite {
        
        public function Preloader() {
            
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.showDefaultContextMenu = false;
            stage.quality = StageQuality.HIGH;
            
            trace("init preloader");

            this.loaderInfo.addEventListener(Event.INIT, this.initDisplay);
            this.loaderInfo.addEventListener(Event.COMPLETE, this.initApplication);
            this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, this.showProgress);            
            
        }
        
        private function initDisplay(e:Event):void {

            trace("init display");
            
        }
        
        private function showProgress (eProgress:ProgressEvent):void {
            
            var fPercent:Number = Math.round((eProgress.bytesLoaded / eProgress.bytesTotal ) * 100 );
            
            trace("Loading: " + fPercent.toString());
            
        }

        private function initApplication (e:Event):void {
            
            trace("init application");
            
            this.loaderInfo.removeEventListener(Event.INIT, this.initDisplay);
            this.loaderInfo.removeEventListener(Event.COMPLETE, this.initApplication);
            this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, showProgress);
            
            trace("loading language")
            Locale.loadLanguageXML("de", onLanguageFileLoaded);
            
        }
        
        private function onLanguageFileLoaded (bLoaded:Boolean):void {
            
            trace("language done")
                    
            this.initMenu();
                        
        }
        
        private function initMenu ():void {
            
            // some code here

        }
        
    }
    
}



As you can see there's no magic added to that code.

Running the swf through a a html page using FF showed the following:
- init preloader
- init display

... and nothing more ....
#    Comments [6] |
 
Saturday, April 04, 2009

Unity Plasma effect

Hey my beauties. Sorry I've been ignoring you all, I've just been pretty ill the past week or so ( I was going to say I've been sick, but I used that joke up last post ). It's me not you, honestly.

Just a short post to go with a small experiment. I've done the plasma effect to death in Flash but it's a nice little effect to play with when trying out a new language so I thought I'd see how straight forward it would be to port to Unity.

The answer is... fairly. If nothing else I've discovered that for...in is nasty slow in Unity ( All these new coding caveats to learn, joy ).

Anyway I still feel like crap, so I'm going to cut this short. The effect is hiding behind this link and it's really nothing special, I just wanted to show something after being away for a week or so. If anyone would like the source just ask in the comments.

Squize.

PS. I'm so sorry to everyone I owe an email too, I will catch up, and let's be honest you should know how crap I am by now.

#    Comments [4] |
 
Wednesday, March 25, 2009

I need teh codes lolz

Anyone who hangs around Flash boards for any length of time will see a pattern ( Usually around school holidays ) of script kiddies turning up, asking a million lazy questions, telling you that in spite of a lack of knowledge right now they're going to see their project through 'cause it's the best idea ever ( It's like Mario, but with guns. And tits. And rpg elements. And zombies ), that if you can just help them with the character select screen the rest of the game will be all but done, and how much can you earn via mochi again ?

I just like to push back on my rocking chair, spit out some of ma there chewing tobacky onto ma porch and grin like a hog that found the shit.

Tweening a zelda sprite isn't going to produce the best game ever ( From the best idea ever ).

So look at me now, I'm playing with Unity3D and I don't know what the hell I'm doing. I'm guessing it's not far away from the Unity equivalent of tweening a zelda sprite and yet I'm really confident about turning out a complete game fairly ( Relatively ) soon-ish.
Unity has it's quirks, and the javascript code is no as3 ( All those posts bitching about as3 being a pain in the ass, well it is, until you get a couple of games out of the way, then it becomes as natural as yawning in meetings ) but... already, 6 days into the trial, I have no desire to go back to making games in Flash again.
To me it's like going back to as1 and publishing for F7 only, it's such a step backward that it holds no appeal at all.

Now hopefully I'm not too much of an idiot to release I can just up and leave Flash. Unity may not be the pot at the end of the rainbow, for all the very lovely demos there still aren't a lot of complete games, which does ring some alarm bells, and perhaps it is a world of difference between having a nice mesh with some physics running on it all at 60 fps in your browser and making that full game ( The gulf between tweening zelda and making a game could be huge ) but... fuck me it's so good.

I've never been a Flash evangelist. I think a recent post I made on FK.games was the first time I've ever really bitched about what Adobe are doing ( And that was in the light of the windows release of Unity in comparison with the upgrade cost to CS4 ).
Basically I couldn't care less. I do like using Flash, but it's just a means to an end, it's a way for me to make games that can generate an income, a tool to do a job.
I'm not passionate about it.
I am passionate about making cool games though, albeit doing that within business constraints ( It is my job, so I can't just go off and do some GBA homebrew just for the hell of it ), and Unity seems to be far and away the best solution to that.
( I'm so glad I've not spent money upgrading to cs4, which is quite an indictment really seeing how I'm professional Flash game developer )

As a quick update to X++, nGFX was sick last week ( Well he was in bed with his nan, and that's pretty fucking sick ! Thank you ) so he's behind on things which means we're a little bit behind on where we want to be, although it'll be in selling limbo for a while even when it's done so I think the next update may just be a "Look it's live, tell us how much you love it" post.

Squize.

#    Comments [16] |
 
Monday, March 23, 2009

Self reflection ....

Hi all.

Back on coding CE again (at least for a few hours today) after spending a good deal of time coding and designing the backend for MYW, writing a tiny versatile CMS and doing some 3d for X.

So today I'm  going to ask myself why the hell I have done a few things in CE the way I did them (I bet you are a lot wiser now).

Let's raise the question if it is worth to add the extra amount of work needed to draw a hard line between the game's "engine" and the game's UI - for your average flash game.

You may have noticed that neither Squize nor me tend to make out lives overly easy when it comes to games, for some odd reason we both tend to try to give out very best for each and every game (even if it is a pain in the back) - well call that stupid.

Give me a good reason to split game and game (play) UI ...
The best reason I can come up with is: reusability, and it is also the least used one.

In most cases I can come up with there seems to be no reason to really split things, because the game is a one-of-a-kind thing. Even for games that share a good deal of similarites (like Wintertales and LogiMotion), a whole lot of things need to be rewritten in order to reuse the engine.

That leaves the reusability inside a single game. !?

WTH?

Inside a single game? Yep!

A good deal of our games either uses an ingame editor (although not usable by the player)  or uses an external editor to generate the level data. Mostly, but not always they share the same visuals. For instance the editor for Logimotion uses smaller tiles than the game itself (so have room for the tools and don't have to scroll the map). That is a good reason to split things between the UI and the "engine".
Another good reason is when you have a stupid designer and you just code - you know those guys tend to be smart and change the size of the assets as often as you should change your underwear.

So why question that and not do it all the time?

Well, it takes a good deal more planing to really split things up. in an ideal world, the "game" knows nothing about the UI, but it still has to control it (ie. update the score, display infos). In my case this is done using callbacks.
A good example might be a game we did (but still isn't playable online): CC

cc_game_00.jpg
(CC game, using 40x40 tiles)

cc_editor_00.jpg
(CC editor, using 32x32 tiles)

As you're meant to be able to play the game inside the editor (without leaving it), the engine had to cope with different tile sizes and environments.

So whenever the game needs to comunicate with its surroundings I provide a callback method, if I would have made it "the right" way, I should have used an interface for that, but ... hell you can overdo it too.

To make it easier and not having an endless number of callback methds I used only a few and gave them params (which are stored in the game's class as constants: like:

public static const UPDATEUI_INFO:uint = 0;
public static const UPDATEUI_BTNPLAY:uint = 1;
public static const UPDATEUI_ITEM:uint = 2;
public static const UPDATEUI_WIN:uint = 3;

Whenever you finish a level, the game would just call the callback provided for UI updates and pass the parameter needed.

And is it really worth the extra work?
Not always.

I like to spend that extra piece of work for games that require and editor or might have parts in it that seem to be a good start for reusing it in a second game. Sometimes you notice halfway through the project that you need to change something to make the game work again (ie. different tile size, or different UI), sometimes (like I did for CE) you notice that the game will be a one of and you cause yourself a good deal of fuzz for "nice code" only.

Well, lets get back coding CE.

nGFX


#    Comments [0] |
 
Sunday, March 15, 2009

Quicker than planned

I have that written on the front of my pants.

The penultimate preview of X is online now and panting for you to play it.

New in this are the options screens, which between you and me I'm really not happy about. I backed myself into a corner with using tweens and bitmaps for the majority of the text / buttons, which take ages to actually get into the game.
Once they were in I realised I'd messed up by not giving appropriate feedback on each selection. I should have re-done them, but it would have taken ages and been really boring, so instead I just dropped in a really cheap way to show the feedback.

If there's going to be a part of the game that really bugs me, it's going to be the options. But the rational part of my brain ( As opposed to the part that makes me want to delete the whole game and start again 'cause those options aren't as good as they should be ) is saying that people will only ever got to the options once or twice ever, that the pay off for the look & feel of the game text is greater than losing out on a bit of feedback, and, well, fuck it.

The main thing in terms of feedback about the options is the alternative control method ( Well two actually, but in a lame lazy way ), which to be honest I really struggle to get to grips with. I coded it a couple of days ago and obviously tested it, and after a while it wasn't too bad ( I'm kinda used to EveryDay Shooter on the psp so it's not a million miles away from that ), but since than I've not used it, and having a quick go today showed that I'd fallen out of the habit of playing X that way, and that I really didn't want to get back into it.
Not really giving it the hard sell am I ? Well it's a case of it's there if you want it, although to me the default method is always going to be better.

Squize.

#    Comments [10] |
 
Saturday, March 14, 2009

3rd from last

Only two more updates to go after this one, we're nearly there.

It's actually getting tricky now, as it's so close to being a final game, what I can and can't post. I don't want to give the whole thing away, but then I don't want to shut the door too early on you guys who have followed from the start.

In saying that the roadmap is as follows,
* build 19, the latest one, features the sound and music along with a couple of graphical tweaks and fixes.
* build 20, options so the new control modes can be tested.
* build 21, the global stats ( We've got something really sweet in mind that we're both really excited about. Not excited about the code, but the results should be way sexy ).

And then that should be it in terms of public releases. In my head I want the game to be finished next Friday, and then it'll just be a case of seeing what we're going to do with it.

For this build I've put a watermark in there. I was in two minds what to do, but I opted for the less sweary version ( I was going to put a harsh word onto the background, but figured that could just backfire ).
I'm not overly happy about having to do it, or rather feeling like I have to do it, but if it stops the game being spread in a beta version then all well and good.

Nearly there. It's really mad to think that it's just build 19. I've had some half days on it, and big breaks where real work has got in the way, but I've really not cheated ( ie worked on it for extra days but not said. I've had to "join" half days together rather than post builds after only working a couple of hours on it ) and to do a game like this in 19/20 full working days is pretty cool.
It shows what can be achieved if you have a real joy for the project, as opposed to an extended slog, and having pretty much complete creative control over it makes such a difference in terms of dev time.
We're going to have a really in-depth post mortem about this and see how we can transfer these things to client work to improve turn around.

Squize.

#    Comments [6] |
 
Friday, March 13, 2009

It's latin for Bullet Hell*

The results of the 4k compy have finally been announced, and it's been well worth the wait.

There are more great entries than your average porn film. Check them all out here and I'm pretty sure you'll be as impressed as I was with some of the stuff that's going on in 4096 bytes, it's just insane ( And you can grab the source for most of the games, which is even better ).

Without giving anything away ( In case you've come here first ), congrats to the winners ( And everyone who entered, you're all winners. Well, the two that came first and second are, the rest of us aren't ) and a huge well done to Pany for running such a silky smooth comp, you wouldn't believe it was his first time, good work mate.
Also thanks got to go to Michael and Chris for the great judging, it means so much more having people actually post considered responses about your work ( Would have meant even more if I'd won, but let's not dwell on the negatives, today is about the winners, not how you guys ripped my fucking heart out then stamped on it. Oh nothing ).

One last favour before you shoot on over there, the audience award is open now, so please show your appreciation to your favourite game and give it a little vote, every vote saves a kittens life, so don't have kitten blood on your hands, vote!

I'm off to find the $50 I need for that second prize, looks like that's another couple of pints of blood gone.

Squize.

* Bovis Abyssus

#    Comments [2] |
 
Monday, March 09, 2009

Time to leave the nest

Bit of a minor update for X++ in anticipation of the options settings.

So what does build 18 bring to the party ? Well lots of things behind the scenes ( Such as FlashJoystick support, which is so sweet. I swear a little bit of pee shot out the first time an asteroid hit a ship and the joypad rumbled ).

On the surface though it's not a world apart for build 17, not every new build is a huge step forward. The main ( Only ? ) user facing update is the option screen right at the start allowing the user to set the "quality" of their machine.

We've touched on the play back issues on previous posts in this little mini-series and it's now become the time to address them. Basically if you've got a good enough machine you get to play it looking all super sexy. If on the other hand you're stuck with a less than able machine, picking the reduced visual quality option will turn off some of the love and hopefully enable you to actually play it.

What would be really nice would be if any of you guys have had input problems in the past ( Due to the nature of the time based mainloop, if things over-run too badly then Flash can't keep up with I/O requests, such as reading the keyboard ) could give it a go with the reduced quality settings and give us a shout back in the comments about it ( Including your spec ).

I'm also going to post this over at FK.games for the first time in it's own thread, 'cause it really needs testing on a wide range of machines. I can almost picture the next hour being one of writing caveats in that thread...

[ Update, thread is here ]

Squize.

#    Comments [3] |
 
Friday, March 06, 2009

Art / Life / Art

< I wrote this yesterday, but then my net connection poo'd out on me, so it's a little bit past tense >

It's good to be back. My first free day for as long as I can remember ( This year at least ). It feels pretty damn great to be honest.

The main reason I'm free right now is that the Maths based educational project I was working on got cancelled the other day. There's a neat little story about life imitating art, indulge me a minute,

Story

Basically ( If you don't want to leave us ) an asteroid passed pretty damn close to the earth the other day.
The weird thing was that the concept of the game I was working on was to use maths to target a missile at an earth bound asteroid. So when I was in a meeting hearing how it was canned, we were all just a couple of hours away from starting over again and living in caves.

If you wrote it in a story it just wouldn't fly.

There's another game I'm close to based on the whole asteroids as the bad guys theme, and today I had a good crack at it again.

Where the development has been paused for such a long time, I'm not a 100% sure what's new and what's kinda new. So forgive any repetition.

The final flv is on the title screen now, and it looks great. It's really large in terms of filesize and ideally we'll be able to cut that down somehow and retain the quality, but it is a thing of beauty, nGFX has done some great work there ( It's worth watching all the way through, trust me ).
The player movement is less, well, shit, which is always a plus.
Options are in there now. Well, a button saying Options, I really wouldn't press it as you'll probably have to reload the swf ( Although you'll be able to look at our logo rather than a blank screen again, which is another new thing ).
( Adding that options button was a ton of work due to the curved text and the set in stone way I'd set things up. That'll teach me ).
The "play" options are in. They're all unlocked now so you guys can check them out easily, but in real life you won't see those options if none of those features are unlocked ( ie, pressing Play will just make the game play as you'd expect without an extra click ).
Notes are gone. They weren't that great so sod it, they're dead and buried.
There's a lens flair in the game now, although it's pretty subtle and is based on a "Chroma fan" rather than a usual flare.

I'm sure there must be some other bits and bobs, but those are the main things that spring to mind. As always, the latest build is here, thanks for taking the time to give it a bash.

Squize.

#    Comments [1] |