Tuesday, October 20, 2009
That sound you hear is angels singing hallelujah whilst beams of light shine down upon our unworthy faces. Youtube have finally released an AS3 version of their chromeless API:
http://code.google.com/apis/youtube/flash_api_reference.html
If only they'd have released it 2 months ago.
Initially it's fantastic and really easy to use. The code example works, you can monitor and change the video quality and it's fairly smooth. Then the record scratches and you run into some problems.
Firstly the destroy(() function hasn't been implemented yet. At first glance this was a deal breaker, but someone else suggested using a hack and just requesting a non-existent video, which stops the stream. player.loadVideoById("Youtube are jokers") works well, though if I was building an app that was showing lots and lots of different video (the one I'm on will probably only have 5-10 max) I would be concerned.
Also the embed code coming from it doesn't work. This is less serious (I was very tempted to just leave it and hope no one noticed until Youtube fixed it) but I'm still not sure how to find a nice workaround. I might have to just write a function that manually assembles the code. Not optimal but it will probably work.
Monday, October 05, 2009
I've just released a new game, Ripples . I'm going for a chilled, atmospheric version of Every Extend. Lots of BevelFilter and some dodgy focalLength fake 3d hacked to bits. The premise and gameplay is purely derivitive but I thing the music, look and feel make up for it.
I'm releasing it as self sponsored to try to drive traffic to my site. We'll see how that goes. What I really need to do it write some script to catch how many people actually click the 'play more game' button. We'll see how it goes.
Thursday, September 24, 2009
More Flash youtube fun
Wednesday, September 23, 2009
Flash youtube nightmares.
So at work I’m working on a project that requires that youtube videos be embedded and controlled in an AS3 site. Unfortunately those lazy bastards at youtube still only have an AS2 chromeless player. This means that when you load it into your AS3 movie you can’t control it directly, you have to go through either local connection or javascript.
After a quick bit of research I decided on going the localConnection route, using TubeLoc, a nice and easy wrapper that loads in a ready made as2 swf and communicates using localConnection. Pretty simple and easy and I thought I had it cracked. Then we tested it around the office and found that it wouldn’t work on any of the office macs. It would work occasionally, but not reliably.
I got the tech department to set me up with a macbook myself so I could do some tests and research and found some pretty horrifying things. I found lots of people referring to localConnection not working correctly on Macs, especially since the last flash player update ( 10.0.32.18). Indeed, adobe did make a big change to how localConnection works on macs in that update, though they swear blind that it should be fully backwards compatible.
To test I made 2 swfs that use localConnection to simply send the contents of a text field back and forth. These worked perfectly on a PC, but on sporadically on the mac when I rebooted.
After this I concluded that I couldn’t trust localconnection, and so went over to the javascript method for the youtube api. This works, though it is a bit of a hassle, and it means that you can only test in a web-browser with the correct html and files.
If anyone has any suggestions I would love to hear them, otherwise I just wish Youtube would get off their arses and make an AS3 version of the player.
My localConnection test (switch LocalConnectionTest0 and LocalConnectionTest1 and save with different names - make sure you drag onto the browser as you standalone flash player probably won't be latest version):package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.net.LocalConnection;
import flash.text.TextField;
import flash.text.TextFieldType;
public class LocalConnectionTest extends Sprite
{
private var receivingConnection :LocalConnection;
private var sendingConnection :LocalConnection;
private var inputTF :TextField;
private var outPuTF :TextField;
public function LocalConnectionTest()
{
receivingConnection = new LocalConnection();
receivingConnection.client = this;
receivingConnection.connect("LocalConnectionTest0");
sendingConnection = new LocalConnection();
inputTF = new TextField();
inputTF.type = TextFieldType.INPUT;
addChild(inputTF);
outPuTF = new TextField();
outPuTF.x = 200;
addChild(outPuTF);
var btn:Sprite = new Sprite();
addChild(btn);
btn.graphics.beginFill(0);
btn.graphics.drawCircle(100, 100, 20);
btn.addEventListener(MouseEvent.CLICK, send);
}
public function onLocalConnectionEvent(object_p:Object):void
{
inputTF.text = object_p.text;
}
public function send(evt:MouseEvent):void
{
sendingConnection.send("LocalConnectionTest1", "onLocalConnectionEvent", {text:inputTF.text});
inputTF.text = "";
}
}
}
Monday, September 14, 2009
The ethics of flash games sites.
OK, so I have my distinctly low rent flash games site up and running. While I am pleased I’m not 100% happy. This is because deep down I think that there is something deeply scummy and unethical about running this kind of site. The whole concept strikes me as being faintly parasitic. Essentially I’m trying to build a site using other people’s content without really adding any value of my own. I keep on telling myself 'hey, this is how the web works'. To an extent that's true - look at aggregator sites like the Huffington post, but that doesn't really say much. At least I'm not doing the Ebaum's world thing and pretending the games are mine.
A large part of my dislike for this kind of site stems from the fact that when I first started in flash game there was no Mochi ads, and my first, most popular games pretty much earned me nothing, despite clocking up millions of plays between them. None of my more recent, Mochi enabled games have been anywhere near as successful (lack of competition back then probably) and I’ve never been able to make any decent cash out of my games. Something I’m still oh so slightly bitter about.
Luckily now things are different. Mochi ads have changed everything, in that if someone has ads at the beginning of their game then any hits are good hit no matter where they come from. The other common way for game creators to make cash is by selling sponsorship, and I guess for that purpose any hits are good hits. I try to only put up games that are either clearly sponsored or have ads.
At some point I may try sponsoring some games myself, but as the moment I don't have the cash for that or the site/ad to take advantage of any upticks I may get. To be honest if I wanted to sponsor some good games that would actually generate some traffic I'd be up against the big boys anyway, and I don't think I'm up for that. At the moment the site is still a spare time hobby thing. Once you start sponsoring you need lawyers, accountants etc.
So, for the moment I'm going to try to carry on like this. I have a few games in the works, but my day job has really picked up and I'm not sure when I'll have enough time to look at them. Then I can start adding some games of my own and actually feel like the site isn't so worthless.
Wednesday, September 02, 2009
Sam's guide to freelancing
Part 1: Making an impression*
Or rather, not making the wrong type of impression.
This relates to two different facets of freelancing in digital agencies. The first is that most small to medium size agencies seem to have large tech departments, and as a consequence a gender spread of about 2 men for every woman. Unfortunately in too many case for me to count they will also have only 2 toilets and despite the gender disparity they divide them into one men's and one women's.
The second is that at least initially people won't know who you are. Actually the chance are that they'll probably never know who you are unless they've worked with you directly. This means that if they need to refer to you down the line, say when they need more resource or (more likely) the project you worked on develops bug, they'll think of whatever first spring to mind.
'Remember that big freelancer guy we had in?'
'You mean the dashingly handsome one?'
'No, the morbidly obese one, you know, the one with really bad BO.'
'Oh! That guy who did that huge dump in the women's toilet and we had to call the plumber?'
Bingo. Don't let this be you.
*This may, or may not become an ongoing series depending on whether or not I can think of more nuggets of wisdom to share. And if I can be bothered.
Friday, August 28, 2009
Bug Squad post mortem
I made and release this game a month ago, but I've only just had time to write it up here.
It all started about 4-5 months ago when there was the first swine flu scare. I had an idea for a dumb game about shooting pigs and got it as far as being able to shoot circles with other circles. I then got a contract and forgot about it. After that was finished I had a bit of time off and finished it off. I decided to keep it as a dumb game about shooting pigs and concentrate my engergies on the production values.
I think I succeeded in making a game that looks really nice and has rocking music, but I'm not so happy with the gameplay. It works to a point, but I think that I may have over-simplified it. I was aiming for a combo building high-score game and it's works as that, to a point. The mistake I made was than I didn't make it short and snappy enough (check out Boomshine for a good example of this) to work as this type of game. Also it has a huge problem in that if you don't go for the combos it's possible to survive for a really long time just by being click happy, but that if you do this it's a fairly boring game.
Sunday, August 23, 2009
Sunday, August 16, 2009
Monday, August 10, 2009
I put the new version of my games site live last Wednesday. It was pretty much the first thing I did once we finally got the internet set up in our new house.
At first, of course there were lots of bugs, dead link where I had typos when uploading, and the rating system wasn't working, but that's all mostly fixed and I'm reasonably happy with how the site looks and works. At the moment it doesn't have very many games, so I'm going to try to get the numbers up as quickly as I can. As I said before, finding the right games and formatting them for upload is looking to be almost as big of a job as making the actual site.
My immediate plans are, in order of importance:
1.Get the search working properly.
This is a big issue. I'm trying to use the google site search, both so I don't have to write one myself and so I could potentially get ad revenue. My problem is that google doesn't seem to be referencing my pages - they're all dynamic links, but since you can get to every page from other pages in the site I assumed it would work it out. This doesn't seem to be the case. I'm going to look into it, but if I can't sort it quickly I'm going to have to ditch google and do my own one.
2. Change the thumbnail info to include rating and plays.
Hopefully this shouldn't be too much work. I just want to add the rating, date added and plays to the game thumbnails. Also I need to clean up the css and structuring of that element.
3. Make an admin page and image upload.
I really want to have a game upload page where I can enter in all the info and upload the image and swf. If I can do it properly so it error checks the paths and info I can avoid the annoying typo errors I've been making while uploading games using ftp and phpadmin.
4. Make and add some games.
In order to generate traffic I'm going to need to make some more games linking back to my site. Probably the hardest task, and I'm not sure when I'll next have time. I'm slightly regretting licensing Bug Squad, since it would be really cool to have a game to launch with.
I'm working on site at the moment at an agency, probably for the next week or two. I'm hoping that there will be a natural break where I can work, but I don't feel I can turn down work at the moment, and I don't expect the site to make any significant income in the near or medium term. Unfortunately if I don't pull my finger out it won't even in the long term. Oh well.