Psyked *
it’s easy once you know how.StarRequests, Simple-Box2D & Flickr – a example mashup.
Posted by James - 08/06/10 at 12:06:30 amMark (of MarkStar.co.uk) has been working away on his pet project “StarRequests“ for a little while now, so I thought I’d give it a whirl and see what he’s come up with – and of course, what I could come up with off the back of it. This is the result; a Flickr image loader, with a smidge of Box2D mixed in to make it all seem more interesting.
Continue reading StarRequests, Simple-Box2D & Flickr – a example mashup….
Link: Value Object Class generator for ActionScript 3
Posted by James - 26/03/10 at 10:03:42 amA bit specialist perhaps, and the need for such a tool might become redundant if the Flash Builder hype is to be believed, but I found this quite useful for speeding up the process of writing a value-object class in AS3.
http://projects.stroep.nl/ValueObjectGenerator/
What is a value object anyway?
For the uninitiated, a value object class is essentially a class with very little or no application logic inside it.
Instead of being a file that actually does something, it’s more of a class for just storing data. What makes it special is that AS3 classes are not all dynamic, so you have to plan what data you need to store and how you’ll store it; and you can achieve a vast majority of that with value object classes.
If you’re coming from an AS2 or Flash IDE background you might think it’s a bit unnecessary or even frustrating, but when you plug value object classes into a development environment like Flex Builder you see where it comes in useful, when it can actually gives you useful autocomplete suggestions, and warns you if you’re passing the wrong type of data into your classes.
Link: Computer mind control with ActionScript 3.0
Posted by James - 20/01/10 at 09:01:32 amThis is a very cool experiment – using a socket in AS3 to interface with Brain Computer Interface (BCI) hardware. Check it out at this url: http://seantheflexguy.com/blog/2009/12/30/neurosky-mindset-brain-computer-interface-actionscript-3-0-api/
Simplifying Box2DAS3…
Posted by James - 08/01/10 at 09:01:15 amOne of the downsides to the Box2DAS3 project – and probably one of the major hurdles to most Flash developers – is the fact that it’s inherited a lot of the syntax from the C++ project that it’s derived from. Maybe it’s just because we’re used to it, but Actionscript is pretty easy to understand, and its methods of working pretty tolerant of inefficient coding.
C++ – or whatever Box2D is written in – is not, and it’s a little painful to setup and easy to break. For my sanity as much as anyone else’s I’m working on a set of classes in AS3 that wrap around the Box2DAS3 classes, and provide you with a more familiar syntax for working with Box2D – objects, methods and utilities that makes it quicker to throw things together and don’t require you to rethink the way you work.
Well, that’s the eventual aim anyway.
Here’s the result of the first round of development – creating a Box2D world and adding objects, in about 6 lines of code.
var options:Box2DWorldOptions = new Box2DWorldOptions( 500, 280, 30, 9.8 );
options.setWorldEdges( true, true, true, true );
var world:Box2DWorld = Box2DUtils.createBoxedWorld( options );
world.debugDraw = true;
world.animateOnEnterFrame = true;
addChild( world );
for ( var i:int = 0; i < 30; i++ )
{
world.createCircle( 500 * Math.random(), 280 * Math.random(), 50 * Math.random());
}
And here’s the result:
Continue reading Simplifying Box2DAS3……
The results of my annual “code something different this Christmas” idea.
Posted by James - 04/01/10 at 09:01:39 amIt’s becoming something of a tradition now I guess, but once I’ve allocated that extra Christmas holiday time appropriately, I find I have that little bit of extra time to devote to trying something new. This year, I thought I’d try rewriting (again) one of my old university experiments.
Here’s the result:
It’s pretty. I won’t even try to explain the idea behind it, but it’s basically an attempt at simple life simulation, with some AI governing the actions. This time around I’ve built it with the aid of Box2D, so all the movement, impacts and interaction is achieved by punching some figures into the Box2D world, which makes the thing a helluva lot easier.
The big plus of “trying something new”? I now have a basic understanding of trigonometry! I didn’t even have to Google anything!
Link: Name your loops
Posted by James - 04/12/09 at 09:12:25 amYou can name your loops! Okay, so it’s not very exciting, but naming your loops will make things so much easier to organise and understand – I expect. Check out the link to read all about it;
http://blogs.adobe.com/cantrell/archives/2009/12/labels_in_actionscript_3.html
Cool ActionScript projects to try out, if you haven’t already…
Posted by James - 05/11/09 at 09:11:52 amHopefully I’ll get a chance to cover each of these in more detail shortly, but there’s a whole bunch of cool new Actionscript 3 projects that are floating around at the moment – here are some of my favourites that I’m trying to find enough time to explore in detail. Each stands out from the crowd for being pretty awesome, and I’m hoping to find some killer way to combine them into my projects.
For Animations & Tweening:
GreenSock Tweening Platform [link]
The name actually encompasses five different varieties of animation libraries, and is awesome at scripting individual and timeline animations. Not just that, but it comes packed with a load of animation options that you didn’t know you wanted, until you see them. Like realistic motion blur. That one’s cool. Especially once you’ve tried making it yourself in the past…
Game development
Collision Detection Kit [link]
Much like the GreenSock stuff, just how good this is really has to be seen to be believed. The basic Actionscript hit-test tools were never really that great. Sure they worked, but if you wanted anything more than a Boolean response, it was no good at all. The Collision Detection Kit gives you enough information to do proper physics – working out things like what, where and how hard things hit. It works with any display object – vectors, bitmaps, even video.
Box2D [link]
Box2D. Runs blindingly fast, precisely calculates physics and interactions. It’s a true physics engine, rather than others (like Collision Detection Kit) which are just imitating physics. A little hard to get into because it’s all written differently to every other Actionscript example I’ve ever seen (“You must unlearn what you have learnt”) but once you get over that hurdle, it’s just so… powerful.
Documentation for Box2D isn’t very new user friendly, but Emanuele Feronato has a fantastic series of blog posts on Box2D which will prove invaluable.








