Latest Posts
-
Infinite Ammo 4k Source Code Released
11th Mar 200914Well everyone else seems to be blogging about the release of their 4k games, so I’m doing so too 🙂 I managed to get mine finished and submitted on-time. I don’t expect it to win a thing (results are in 3 days time), but I had great fun participating all the same.
I have created a games page entry for it, and in a slightly unusual move for me I have released the full source code for the game too. You can get it from it’s games page. What you learn from it I have no idea. At the very least there’s a pretty explosion / particle system, and a massively optimised and compressed Tween engine! Or you could just skim down through the code, shaking your head thinking “and he ENJOYED coding this?!” 🙂
-
AS3 Flash 10 Firefox Search Plugin
2nd Mar 2009I don’t know about you, but I rely on the Search box built into Firefox a lot. I use it almost religiously and have a selection of search engines in there, one of which is of course the ActionScript 3 Reference.
It was bugging me that there was no search engine plugin specifically for the Flash 10 version of the docs.
So, I created one.
If you use Firefox (or any browser that supports the OpenSearch plugin format) then you can add the Flash 10 search plugin to by simply going to this page on the MozDev site: http://mycroft.mozdev.org/search-engines.html?name=flash+10 and adding the Flash 10 version I created.
I’ve already used it several times in the past hour, so figured it’d be worth posting about incase anyone else found it useful.
-
How do you extract a Sprite back out of a ByteArray?
28th Feb 2009I should probably post this into some AS forums (and will do so later), but I had to get this out there quickly and it’s bugging the hell out of me:
In short, how do you extract a Sprite from a ByteArray? (or any kind of display object for that matter).
I can write the object just fine, and read it back into a variable, but I’ll be blown if I can then convert that back into what it was originally.
Here are my attempts so far:
[as]
var test:Sprite = new Sprite();
test.graphics.beginFill(0xff0000);
test.graphics.drawRect(0,0,64,64);
test.graphics.endFill();//addChild(test); // to test, works fine
var b:ByteArray = new ByteArray();
trace(b.length); // 0 bytes
b.writeObject(test);
trace(b.length); // 754 bytes, so our Sprite is definitely in there
// Reset the pointer
b.position = 0;trace(b.position); // 0 as I’d expect
var newTest:Sprite;
//newTest = b.readObject() as Sprite; // Ends up being null
//newTest = Sprite(b.readObject()); // Type Coercion failed error
//trace(newTest);
//addChild(newTest); // and kaboom, constant “Parameter child must be non-null.” errors 🙁var take2:Object = b.readObject();
trace(take2); // ok take2 contains an object, but how can I get the Sprite out of it?trace(b.position); // 754, so it has definitely read it all
[/as]Ummm someone, please help? 🙂
-
(Spoiler!) Play test my 4kb Game Competition entry
26th Feb 2009My 4kb Game Competition entry is very nearly finished. I’m in the final “tweaking” stages, trying to get the last few small bugs out, and iron the gameplay a little so it’s less “random” and even more progressive.
The game is a twitch shooter based (loosley!) on Geometry Wars and requires some pretty mad flying skillz to last more than 30 seconds. The idea is literally to see what kind of score you can get. Here’s a screenie:
There are 10 different baddies, “boss waves”, bullet power-ups and particle explosion effects galore! (I went a bit over the top in all honesty). I’d love to have added sound, but I’m pushed to the limit of my 4096 bytes shackles already.
I know the game isn’t quite as “playable” as it should be, and I’ll work on that in the final few days left before I need to submit to the contest. I also know I don’t have a chance of winning (having seen some of the other entries lined-up!), but it was bloody great fun to code anyway.
And so as a sneak peak to you here’s the latest beta to play. Comments welcome (but please do bear in mind this whole game had to fit into 4096 bytes, so don’t go requesting anything insane ok?!)
More posts to tickle your grey matter ...
- Phaser Coding Tips 5
- Phaser Coding Tips 4
- Phaser 3 Development Log - w/e 30 Jan
- Phaser Coding Tips 3
- Phaser 3 Development Log - w/e 16th Jan
- Phaser Coding Tips 2
- Phaser Coding Tips 1
- Phaser v2.1.3 and Pixi v2 are out!
- Welcome to the DarkForge - An archive of all my old DarkBASIC code
- Phaser goes to the movies
Hire Us
All about Photon Storm and our
HTML5 game development services
Recent Posts
OurGames
Filter our Content
- ActionScript3
- Art
- Cool Links
- Demoscene
- Flash Game Dev Tips
- Game Development
- Gaming
- Geek Shopping
- HTML5
- In the Media
- Phaser
- Phaser 3
- Projects
Brain Food