Thursday, April 30, 2009
As I already mentioned, the Unity docs are not quite what I would call helpfull. I think they cover a lot and most of it will solve your problem, finding the right info in them is what really is the hard part.

Take the GUI scripting guide for instance "Reference Manual > GUI Scripting Guide", this covers everything you need to know to build a GUI. My mission currently is to create a simple form for the game I talked about earlier.
For the salutation I needed a drop down list, so I had to do it on my own, because that's the one usefull control I missed.


unity_igts_00.png
After a few hours I came up with this (scaled down a bit)

The form is dynamic (you can turn of the salutation for instance) and already has a working validation, but it's dead ugly. So the next task was to skin that up ("Reference Manual > GUI Scripting Guide > Customization").

Yet again the manual does a good job to tell you what you can do, but fucking lacks some basic examples on how to deal with the textures to skin up buttons for instance. That's where I got a bit pissy (although I must admit that I hate searching in boards or wikis when the solution should be in the manuals).

So the key to skinning the buttons (and the rest of the UI elements is the GUISkin file or for single use the GUIStyle. I knew that there has been a psd file with "templates" of the default textures used, but alas I still havent been able to find it again, though I know I saw it while playing with Unity for the first day (and I was like wtf?).

unity_igts_01.png
After skinning for a few minutes

I found the most valuable (and yet again MISSED info) in the scripting guide (after just testing it with a basic psd file) ...
So I looked at the default values of a new Skin and saw this:

unity_igts_02.png And I wondered why (and how) it'll become this: unity_igts_03.png.

What the manual is missing badly is the info that you can set a "fixed" border for a texture in a skin that isn't stretched:
var border : RectOffset
Description

The borders of all background images.

This corresponds to the border settings for GUITextures. It only affects the rendering of the background image and has no effect on positioning.

Why do I need to find that out by testing? (I guess no one reads through the scripting guide until he needs a specific info, I for sure do not)

By default the border values are set to:
left: 6, right: 6, top: 6, bottom: 4 ...

After knowing this it was oh so easy to just do this: unity_igts_04.png to get to the buttons used above.

Oh well.

I hope that saves some ugly searching for you,
nGFX

 | 
Thursday, April 30, 2009 5:36:07 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [3]  |  Trackback
 Wednesday, April 29, 2009
We've made no secret of loving Unity. We cuddle up to it. We watch rom-coms with it and feign interest. Hell, we'd lick it if we could.

But as we've fallen more head over heels it's just highlighted the fact that there's no tried and trusted business model for it yet. There's no mochi, there's no big ass portal wanting to pay for that shiny shiny 3D gameplay, shit there's not even sponsors with their $500 plus source code offers.

The handful of Flash game studios like ourselves who are looking to Unity I assume are following a similar pattern, knock out some nice generic games with some added wow, and then offer it as an alternative [ To Flash ] to clients with the added carrot of an iphone version of the game. So in effect you take a hit on the costs of making the actual game ( Unless you're lucky and can get a decent budget ) but make that back via the iphone version ( One code base, one set of assets, two games to charge for ).

Flashbang have a different idea via their Blurst site, and to be honest it's a real epiphany moment reading about it.

The full article is on the Wall Street Journals site ( Which is quite a wow in itself ) and can be found here.

To cover the key points before you go shooting off over there, the idea is that you have "True fans", the fans who really dig your stuff ( A great article which is linked to in the above article can be found directly here )
"A creator, such as an artist, musician, photographer, craftsperson, performer, animator, designer, videomaker, or author - in other words, anyone producing works of art - needs to acquire only 1,000 True Fans to make a living."
They have calculated that by using a subscription based model they only need 5000 people signing up every six months. That pays for their 6 staff.

In theory that's so simple it's brilliant. Ok it's nothing new, but it's just seeing the maths laid out so simply just makes it feel viable.

We've touched on downloadable versions before, and the general feeling was that very few people will pay for Flash no matter how good it is, because there's just so much free stuff out there and Flash games demographic in terms of indie players seem to be the younger end of the market ( Although that could be skewed due to the younger end of the market being the most vocal ) who
a) Don't have as much disposable income.
b) Have the mindset of "If it's on the net it should be free".
But with Unity your downloadable game can be so much more. Enough to encourage people to subscribe to get it ? Maybe, maybe not. There are more alternatives to just giving a exe version of a game though. Subscribe to gywGames and in our racing game we'll let you design your own livery, and you can take a snapshot which all your friends can see when you're logged on to the site, hell, they can even vote for it.

It's that divergence of media that will sell a subscription. The level editor that's unlocked once you join. That comp to win a psp when you're subscribed. It's allowing players to be that little bit more than players, to let them have a direct effect on the game they're playing, that sense of community. It doesn't have to be heavy handed, it's not all about achievements and gamerscore, it's about putting a little bit of creative power into peoples hands and seeing what they can do.

That to me is the business model for Unity that we've all been searching for.

Squize.

 | 
Wednesday, April 29, 2009 10:58:05 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [7]  |  Trackback
 Tuesday, April 28, 2009
You must have seen that old couple, the ones that look older than time itself and you know they've been together 40+ years. They're eating opposite each other in complete silence as anything new to say has evaporated a long time ago, and it's much easier just to stay silent rather than force something just for the habit of it.

I think the blog has become like that recently. We're in our little ( Tired ? Not yet, not by a long way ) grooves working away on nice things but without much to say about them.

Twitter seems to a better outlet for conveying the day to day little / funny / annoying things and that leaves us with only big things to post here, and right now we're clean out of big things.

The puzzle game I'm working on is coming along nicely. I can't really share the gameplay, and in terms of code, it's a puzzle game. Nothing new or clever there so I can't share some new sweet way of doing things.

We've set our invite only board up too, and I'm struggling to post to that too. Perhaps I have just run out of words of interest. Maybe there are only a certain number and then it's just forced. Like sperm.

If nothing starts happening soon I'll just start posting lies to keep things interesting here, like the time I wrestled a camel. With lazer beam eyes.

Squize.

Tuesday, April 28, 2009 12:39:07 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [9]  |  Trackback
 Tuesday, April 21, 2009
Hi folks,

most regular readers will have noticed that we've jumped onto the Unity wagon after it finally came out for the windows world and so I think it's time to write down a few of my thoughts ...

What it is:
an easy to use development platform for 3d games (although easy, well, I'll cover that later)

What it is not:
Simply put: easy.
And it is not flash.

So?
The best part of it is, that you can do a decent 3d based game with it quite quickly, that is if you know how to code unity (I might have twittered once or twice that the docs are not one of the strong points) and (what's more important if you or someone in your team) can do low poly 3d.

So?
I really can't stress enough that it is NOT flash, not at all, when you get started with Unity all is nice and straight forward, but once you hit the point where you really would like to do a quick tween for the main menu, or use a fancy drop shadow on your font ... you'll probably start cursing and wish you could use a timeline and some keyframes.

One of the really big letdowns for me was to discover that a quick, easy and nice UI is not going to happen fast in Unity. You can get away with it if you don't need dynamic text to appear, but I need to do a lot of stuff with that, because nearly all of our games are prepared to be played in at least two languages.

How does all that relate to the title?
When I first got in touch with flash (6 I think) AS was really nothing more than a scripting language, coding for the best part was ... shit and most of us messed with onEnterFrames per movielclip. Then AS2 hit the light of the day and with AS3 it came very close to real coding ...
But when I entered the Unity world it seems like the old distributed scripts came back to haunt me. You've got the choice of using a set of different languages: javascript like, c#, boo and some others.

JS on the one hand is easy to use, ridiculously lose typed and commonly used. I really don't like lose typed coding, so for me it was c# ...
Anyway something that commes very close the the old MC based onEnterFrame is Update ... so a script that would move the object 1 "unit" (since we have no pixel) to the left would be:

function Update () {
    transform.position.x++;
}

(or something very close to that, I said I use c#, oh and I'm sure I saw some other methods to do the same)

Save that as a ".js" text file, add that to a cube on stage and viola (there you have the back to script part covered).

I hope you won't be doing that for a complex game, but ... thinking back ... I knew people who did that with flash  ** shudder **.

As I already mentioned, I hate lose typed coding and as I used c# for some years now for coding anyway it was a logical choice (that and the fact that I could continue using Visual Studio).

Oh and did I stress that there is NO timeline?

Everything you want to have animated either needs to be coded (ie for dynamic text) or already be animated in a 3d app ...

Oops, I think I need to get back to work ...

nGFX

ps: just to have something to look at a screenie of the menu (the start of a camera move) of my "test" game to see how I get along with Unity, if everything works well, I might be able to invite for a private beta test on Friday (give me a shout if you want to) ...

pots_menu_de_00.jpg
(the text for the menu was a big lesson in cheating, it uses GUI.Button, btw)

Tuesday, April 21, 2009 7:38:04 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [6]  |  Trackback
 Friday, April 17, 2009
I recently did a reskin for a new CGI movie which we're not actually allowed to take credit for due to the nature of the contract ( It's a project which filtered down a couple of agencies before landing in my inbox ) so I can't link to it without giving it away, or even mention that it involved both Aliens and Monsters ( If you follow us on twitter you'll see I've been a bit less subtle there ).

I noticed yesterday that it's been posted to gameJacket, so thinking the worse I fired off an email to which I got a good prompt reply from Simon. Long story short, it turns out Rubber Republic have been contracted by Dreamworks to distribute the game and they're using gameJacket to do so.

Perhaps it's just me, and I'm being naive ( I've been shocked in the past, and still am now and again, about the size of the budget for paid placements. I live in a nice little garden where viral games sit on their own nice custom webpage and people just swap emails about them based on their actual merit as a means of entertainment until they get a nice lot of traffic and everyone's happy. I fear the busy road outside that is all about paying to put a game in the #1 spot on high traffic portals ) but it just doesn't sit too well with me.

An adver-game supported by adverts just feels overly cheap. I've had this before with Brain Voyage, and I really fought against that at the time ( Obviously I lost ).
If you're using a game to sell a product, then surely the game itself should be enough without further ( And random ) advertising before it, that just dilutes the message and to me cheapens the end title.

I think it's because advertising is such a common way to pay for the development of a game that when you see it in any game you naturally assume the same. So when you see a game by Eidos or Dreamworks promoting their IP it gives the same impression, that the games development costs need to be recouped by advertising other products. That's not a great impression to give out.
We don't have ads on here or the site for that very same reason. It's not that we're rolling in cash, it's just that the returns vs the perceived loss of quality to the site massively outweigh each other. We've even been asked to do sponsored articles, but unless it's enough money so we can ignore the feeling of being dirty, then what is the point ?

We pride ourselves on producing the very best work we can, dependant on the budget / timescales / project scope, and I think for the most part we hit that self imposed target. We want our work to be presented in the best light possible, so why don't companies like Dreamworks and Eidos, who at the end of the day are IP driven, feel the same ?

Ok here's what I'd like to do, follow me with this. I'm going to set up a fictional game called "Mackerel Queef" and buy advertising space on mochi and gJ

queef.jpg

I think that's subtle enough. Now I'm not really going to do this, it was partly just an excuse for more dirty words on here, but it is kinda related to the point I'm trying to make.
If I was Dreamworks and I was advertising a family movie, I wouldn't want "Mackerel Queef" ( I've used it again 'cause I want this site to be the number one on google for "as3 fps counter and queefs" ) being promoted in the same breath never mind being seen as earning money from it.

Ok the ad networks are more responsible than that ( And I'm really not critising them, they've made Flash a viable development platform for a lot of people which is only a good thing ) but it shows the lack of control you have over such things.

I guess it all boils down to the figures. If you've commissioned $x worth of game I assume there's someone working out the cost per set of eyes viewing it ( A figure I found for cpm on prime time tv in 2002 is $17.78. Imagine getting that rate from mochi ) so to be able to turn around to your boss and say "$x worth of game was viewed by x million people which works out at $0.0x per person" then I guess your boss doesn't give a shit if it was at the expense of people watching an ad for "Mackerel Queef" first.

Maybe paid placements are a better way of making the whole seeding process feel less cheap. At least then your game is treated more like the art it is rather than as a product like a tin of beans.

Maybe the ad networks who have a great seeding process in place could offer it as an ad free service ? It'll be cheaper than paid placements for the clients, they get to drop a "Distributed by..." in there and it'll make the end game look a lot more on brand and less turned around for the minimum cost possible.

Maybe, but it's not going to happen is it. So developers like us, like you, will be working 'til 2am to meet the deadline and to just force that last bit of love into a project to really make it shine, only to see it a week later on some no-name portal with the size tags in the html wrong ( And a "Play it full-screen" option there, even though it will look and play shit like that ) and an ad at the start.

Squize.
Friday, April 17, 2009 2:43:28 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Wednesday, April 15, 2009
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.

Wednesday, April 15, 2009 2:25:47 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [11]  |  Trackback
 Wednesday, April 08, 2009
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 ....
Wednesday, April 08, 2009 7:34:47 AM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [6]  |  Trackback
 Saturday, April 04, 2009
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.

Saturday, April 04, 2009 6:26:32 PM (W. Europe Daylight Time, UTC+02:00)  #    Disclaimer  |  Comments [4]  |  Trackback