Gaming Your Way

May contain nuts.

Lead to gold

So I'm a little behind the times with this post, but to be fair I've had other things on.

Adobe have released Alchemy, which is a c/c++ compiler that outputs to Flash byte-code. Sweet.

I guess most people reading this remember when news of F10 broke and there was a video clip of Flash playing a native version of Quake that blew everyone anyway ( Better font rendering in FP10 ? Who gives a shit, that's Quake dude! ). At the time there were very few details about it, and it seemed to just disappear from view.

Well it's back and has a new poster boy, Doom. Runs a little dog rough for me when there are a couple of baddies on screen but hell, it's Doom ( I think it's the sign of a platforms maturity when someone ports Doom to it ).

How does this all work then ? Basically it relies on LLVM ( Low Level Virtual Machine ). This takes your source code, or "Front-end", currently  c/c++ but there's support coming for other languages, and compiles it down to a very simple byte-code.
With the byte-code in place you can then add your own "Back-end" which converts that code to run on your cpu of choice. Basically it's converting a high/mid-level language to an ultra low-level language ( RISC like ) which is then easier to port.

Because Flash uses a virtual machine model a back-end has been written to support that, so it goes c++ > RISC code > AVM2 byte-code and we're left with either a swc to include or a standalone swf ( Not sure how much use that'll be in real life though ).

My first thoughts ( Even after seeing the Quake demo ) was that anything written using this is going to run like poo. I mean as3 isn't the fastest language in the world. But there's a couple of reasons why it works and works well.

Firstly the LLVM compiler is really good. It optimises the pants out of the code, which reduces some of the percieved overhead.

Next up, the system works by allocating a byte-array in memory which the alchemy code uses for pointers / stacks etc. as well as storing it's own byte-code in there. In FP10 additional byte-codes have been added to the avm2 to deal with byte-arrays much quicker ( Allowing this to work at a good speed ), the haXe guys have done some amazingly quick work to figure these out.

Finally 'cause the alchemy converted code ( Is there a proper name for that yet ? Something catchy and slightly rude sounding ? ACC will do for now ) runs in it's own little byte-array "enclosure" it can access memory ( ie a location in it's own enclosure ) and call functions really quickly ( It's like coding in assembler on the old 8-bit machines ).

You lose performance when your action-script has to call / recieve data from the ACC ( Known as "
Marshaling" ), but such is life. If you plan so you pass as much code as possible outside of the mainloop then hopefully it shouldn't be too harsh.

Byte-Arrays are F9/F10's bitmap methods in terms of a new feature offering a huge leap forward in how we work with Flash. They offer up so much scope for some really cool stuff, from mod-players to things like
Alchemy.

It's looking like it's possible to finally in-line byte-code thanks to the avm2 back-end for LLVM, which has a lot of possibilities for speed enhancements. Also take things like box2D, natively written in c++ ( That is currently being converted, although there have been some teething problems ), or a* pathfinders taking advantage of the much quicker memory access, or engines like Coco3D which could be ported over and solve issues in existing 3D engines, or self-modifying code, or things I can't even hope to think of yet.

Squize.

Cessation Time Distortion

What a great title. It sounds nice and gamey. Like a sweet bullet time effect, or maybe a real time rewind function. Picture that, being able to pause and then rewind the action in any game, just by dropping the cessation time distortion component into your game. Nice.

It's actually got nothing to do with gaming or Flash, it's yet another smoking reference. Promise it'll be the last mention of my own personal trial on here ( In 15 mins I'll have been a non-smoker for exactly 1 week, hence my final farewell to banging on about how hard it is etc. etc. ).

"A cigarette is the perfect type of a perfect pleasure.
It is exquisite, and it leaves one unsatisfied.
What more can one want ?
"
Oscar Wilde.
I've been doing a bit of reading about smoking and the effects it has on you, it does help when trying to stop, as it makes you realise it's not just a case of you being weak. It's a bit more than just caving in and eating that last bit of cake.
Ok we all know smokings bad. No one is so stupid as to think otherwise. Non-smokers just don't get how smokers can smoke, I mean it stinks, it's bad for you and it costs the earth. Smokers just hide behind a million different reasons just to keep smoking.
( Personally I used the combination of "I do actually enjoy it", "It helps me think" < Strong reason for me there, "I stopped before, and I remember how hard it was, and now I'm self employed I just don't have the time to effectively write off two weeks suffering withdrawal pangs". If you're a smoker I'm sure you can add your own to this list ).

So we all know all the bad things about smoking, the smell, the social costs ( It's no longer cool kids, try standing outside in the rain smoking, far from cool. Speaking of which, I'm sure I can't be the only smoker ever to stand in the rain, thinking "What the fuck am I doing this for ? I'm not even enjoying it that much anymore" only to do it again the next day. Same as going to a shop at 3am to buy some smokes 'cause there's nothing worse than waking up without a cigarette is there. ).

But here's something I only found out over the past couple of days. I was kinda aware of it, but never really knew the details. It's something that's never really thrown up as a reason to not smoke in the first place, I assume that cancer and heart disease are treated as good ( Bad ? ) enough reasons, in addition to the usual staples ( Smell, cost, ages your skin etc. etc. ).
To me it's caused more of a knee jerk than either of the big boy reasons not to smoke.

( Again, there's this pre-conception that smokers are dumb 'cause smoking greatly increases your chance of getting a million different cancers, with lung cancer being the big one, the mother of cancers. God's way of really smiting the smoker. You want to smoke ? Here's a cancer just for you. That'll fucking teach you.
As a smoker you know that, but it's an addiction non-smokers, so you can twist anything to suit your argument [ To keep smoking ].
Here's some stock replies, that I'm sure I've used before "I could get run over by a bus tomorrow", "You only live once, life's too short to worry about things like that. Anyway they say you can get cancer from <insert whatever has just been in the news recently that can give you cancer> so what can you believe anymore?" or the classic "I know it's bad for me, I'll stop smoking as soon as I notice my health getting worse, so I'll be fine".
I'm sure my Dad used that last one, he also used the other classic "Uncle Tom smoked 80 a day from the age of 14 and died in his 80s and was fit and healthy right to the end". Every smoker has that uncle Tom. My Dad died of lung cancer when I was 20, so 16 years ago. I started smoking when I was 17, and by the time Dad was dying infront of us I was quite happily smoking 20 a day. At his funeral ( Which btw was the first one I'd ever been too. Not the best way to lose your burial virginity ) I was desperate for a smoke, and when I got the chance, I did.
Here's a good definition of an addiction, "The uncontrollable, compulsive drug craving, seeking, and use, even in the face of negative health and social consequences." [source]. That's what smoking is, that's what makes you want to smoke at your Dad's funeral. It really is more than just not being able to turn down that last bit of cake ).

Nicotine is a poison, we all know that. It's the tobacco plants natural protection from insects. Drop for drop it's 3 times more deadly than arsenic. I guess there aren't too many insects eating tobacco leaves. It's also a member of the same family as cocaine, morphine, quinine and strychnine. Nice family.
But here's the detail that I only discovered the other day, the "If only I'd known that before I started smoking" bit of info ( That really wouldn't have made much difference in all honesty, but more than the big guns of reasons not to smoke ).

Eight seconds after your first ever drag your brain releases a ton of dopamine ( You can read the very dry definition here, or if you want to skip that, it increases heart rate and blood pressure. Basically it's an instant rush. It's also connected with your bodies reward system, which is handy in terms of forming an addiction ).
K, you've taken your first ever smoke. Nasty as hell. You're going to have to work quite hard to get addicted to this, but don't worry, smoking messes up your sense of smell and taste, so in effect it masks the fact that it tastes like what it is, poison. Also you know that stat about cigarette smoke containing 4000+ chemicals, included in those are things like Cocoa and Corn Syrup, added to make it smell less like death, and more like a white stick of nice.

Your brain knows poison when it gets a lung full of it. In return it reduces the number of [ Acetylcholine ] receptors available to receive nicotine to try and protect itself. It also reduces the number of transporters capable of moving the nicotine around in your brain, and as a final wave of protection, in other areas not affected by that first ever rush of nicotine it creates millions of extra receptors, so if you do have any more nicotine intake it's spread out more.
That's why you'll never ever get the same hit from a smoke as you did on that first ever time, every cig since that very first draw has been an attempt to re-create that first buzz. Your brain has re-wired itself to protect itself from having too much posion concentrated in one spot.

That's the thing that's freaked me out. That the crap I breathed in is dangerous enough that my brain is physically different, that it adapted itself straight away to avoid the harmful effects of nicotine ( The same thing happens with other drugs, it's the bodies way of coping with having something in it that really shouldn't be there ).

And connected to your brain being different to cope with nicotine ? Cessation Time Distortion.
In that first 72 hours when you stop smoking you have some nicotine left in your system ( It has a half life of 2 hours that's why when you're a smoker going over a couple of hours without smoking is hard as hell, for me it was an hour before I'd start getting really needy for one ), but it's not enough and that's why your brain throws a hissy fit.
This includes mood swings, lack of concentration ( It's exactly a week today that I stopped, and it's only just starting to sort itself out, although this post has taken ages to write ) and all the other things that make you a pain in the arse when you stop. At it's most simple level, you have a panic attack due to not being able to get what you crave, mixed in with your body regaining control of it's fight or flight mechanism, which has been run by nicotine since you started smoking ( Hence the attacks of instant pure rage for no real reason. Your body isn't used to handling anger itself properly any more, it's like when people have their sight restored after years of being blind, it's just over whelming and your brain doesn't really know how to cope ).

After those first 72 hours your brain kinda gets it, and starts resetting the changes it had put in place. Basically you're learning how to be the real you again, as opposed to the smoking-in-the-rain-even-though-you-don't-enjoy-it you. This isn't too smooth either, but should only take a couple of weeks.
Part of this re-wiring process is this really weird side effect, time distortion. Your whole concept of time is screwed. As a rule we all have pretty good internal clocks ( We've all had that "Got to get up in the morning it's really important" and then woken up a couple of minutes before the alarm was due to go off ) but during this process of re-wiring it's a million miles out.

At first that's a nasty thing. You know how when you're waiting at the doctors or the dentist time just drags. It's 'cause you're a bit bored, perhaps a bit worried about what's coming up, and it just seems to go in slowmo.
When you stop smoking, the whole day is like that. It's like the week before Christmas when you're a kid, it just goes on and on forever. Apparently actual physical nicotine cravings only last for 3 minutes at a time, but during the first couple of days you get hit by a lot of these cravings, and mixed in with this newly found no concept of time at all, they really really don't feel like 3 minutes.

Now I'm at the worst is behind me stage, this whole time distortion is nearly as cool as a component you could just drop into your Flash game to control time. I'm getting more done because I have more time on my hands. Not just 'cause I'm not having to shoot outside every 45mins / hour for a smoke, but because my brain really doesn't have a clue how long things take.
Which is such a result, as I have a deadline this Friday, and I've done relatively little the past week because I've had no concentration at all. I'm hoping I'm going to stay ever so slightly mental long enough to get the new game done.

And on that note, we're back onto games and leaving smoking behind. Normal service should resume tomorrow, thanks for indulging me.

Squize.

Enough about you, lets talk about me

I have an inherent dislike of self indulgent blog posts, the whole "I'm not feeling well today" thing.

I've found twitter takes this part of a blogging to it's natural extreme. "I've just been out to buy some tea bags" kind of pointless, mindless, please have an interest in me and my life crap.

Well check my hypocrisy out, here's what my twitter post would be today:

"Gave up smoking Monday. Hate everything right now. Haven't got a civil tongue in my head, so not posting until I'm less of a cock".

Sorry to everyone who I owe emails to, but I really can't write more than 4 words without them turning into some sort of nasty rant for no real reason so it's best I go to ground until I stop wanting to burn down the whole world.
Normal service will resume as soon as my brain fully understands that I don't want to smoke any more and so stops thinking about it every waking second.

Squize.

Everyone loves a number

The indie Flash game community seems to love stats. I guess it's 'cause it's always nice to see someone whose written something good getting the recognition ( Even if it is more in terms of traffic than cash ), and because it's slightly inspirational, that everyone is just one good game away from achieving the same results.

When our game Chimbo got blammed on newgrounds it really shook me quite hard. It's the first time that I've really had a project fail on me ( I've had games I've not been able to sell before, but never something out there which has performed badly on a critical level ).
We thought that was it for the game. We were under no illusions of what the game was, a reskin of an even older game. It's far from great, but both Olli and I chatted about it before hand ( Like we always do ) and considered it good enough to go out under the gyw banner. It's an average game that looks pretty with varying degrees of presentation.
That was it then, a footnote in our history.

And then the traffic started to creep up. It got on some front pages of high traffic sites, only for a day or two ( Such is the turnaround on such sites ) and got spread around a little.

chimboStats.png

At present Chimbo is hosted on 392 sites, and in the 281 days it's been hosted on gamejacket it's served up 1,248,011 impressions. Not a hit by any stretch of the imagination, but average traffic for an average game which started it's life quite badly ( And apparently in gamejacket's all time top 20 hits, although I think that's more through default 'cause it's been there pretty much since the beginining ).
Today it's had 4359 impressions, which is a nice trickle of people ( Hopefully ) having some fun with it. It's proved to be a slow burner ( Hopefully pinball will be the same, as that's done relatively poorly ).

So is there anything you can take away from this ? I mean it's all well and good seeing a nice graph and knowing one of our games hasn't done too badly, but it doesn't help you much.
Hopefully it shows that sites with a typical teenage boy market ( Ninja zombie pirate shoot'em up anyone ?) aren't the be all and end all. There are a lot of sites which are targetted at young girls too which have insane amounts of traffic. Chimbo had 50k+ hits in one day purely by being front paged on a girl site ( That sounds terrible, "A site aimed specifically at girls" is what I should have said ). If you got that sort of traffic on ng or Kong in one day you'd be pretty pleased.

To show this isn't a one off, the game I did for gimme5, Loved Up, died on it's arse on all the "usual" sites, then went on to be g5's top referring game for months.

Is there a large mostly untapped audience for "games for girls" ? Hell yes. I spoke to Barry at gamejacket just the other day and he told me that they're now generating two lists [ Of portals ], the usual one and one for the female audience.
You may think it's selling your soul to do a game targetted specifically at girls. You want to do Metal Slug X, not Me and My Pony, but a game which appeals to a young female audience doesn't have to be overly twee or technically "cheap". Just see it as another genre which should be on your list of ones to try, same as doing a puzzle game or a mode7 racer etc.

Anyway to wrap up this posts about stats, here's a great couple of links where you get to see dirty hard amounts of cash, compiled by Drastika ( Cheers Paul, saved me hunting these down ).

Elite games' earnings ( For Oct )

Emanuele Feronato's one year money making experiment results

Squize.

Another google post...

I've posted here before on our google indexing. Also the blog software records what search terms drive people here, the most popular being "as3 frame counter" and "as3 flex preloader". We get a lot of disappointed Cure fans with "I don't care if Mondays blue" as well as some other really obscure searches landing here ( "Boylinks" comes up a lot, don't ask ).

Checking the logs Friday I came across this gem from google.com.au,

"WHY THE FUCK WON'T STUPID FUCKING as3 LET ME FUCKING CREATE AN EVENTLISTENER"

( We've got the number one rank for that phrase, I really don't know why, we can't be the only people using the word "fuck" and "as3" in the same posts surely ).

Anyway to be so pissed off at coding to swear at google is something we totally sympathise with ( As well as admire in a slightly mental way ), and whoever you were, you're a kindred spirit mate.

[Update: I've also noticed other people are entering the phrase into google, is that just to see if we're ranked number one for it ? I think we own it now :)
Also today, "wee sex" gets us a front page hit. I think I may need to calm down the bad language and obscure sex terms on here, as we're going to be getting hits for the most obscure stupid things. golden showers ].

Squize.

This is very lovely

A really nice abstract demo, called Sugar Cubes, which feels like it uses a lot of Box2D.

sugarcube_grab.png

Visually it reminds me of Thrust, due to the simple colours and heavy scanlines, and it's got an abstract soundtrack which fits perfectly.

Yet more great work by Yoshio Ishii / Nekogames, just making something visually arresting out of very simple movement and images.

Squize.

Happy Halloween

petal.jpg

Meet Petal

As way of a slight added bonus, click here to expand your mind ( Or make yourself feel sick, it'll be one or the other ).

Squize.