define('DISALLOW_FILE_EDIT', true); Kevin Newman – Page 6 – unFocus Projects – Kevin Newman and Ken Newman

The forums are back!

I got a suggestion that unfocus.com needs forums (well, forum). So just for fun, I thought I’d dig up the old archive, and see if I could get it to work. And it did! Pretty easily too. You will have to register to post, since I can’t get the anonymous plugin to work yet – seems I’ll have to wait for an update on that. So please have at that forum!!

MIT License for unFocus.History Keeper

I have decided that LGPL is overkill for a tiny project like unFocus.HistoryKeeper (and friends) – so I changed it to MIT. LGPL would have been a pain for anyone selling or using a commercial product with history keeper, and I really don’t think the code is substantial enough to be such a headache. But now that’s not a problem! MIT is a better fit I think.

The change has already been reflected on the Google Code page, and in the newest release archive.

unFocus.History Keeper 2.0 (and SwfHTML) Beta 4 – Out Now!

A brand spanking new Beta 4 of unFocus.History Keeper is out, and ready for download! Download it from Google Code. (If you are wondering what happened to Beta 3 – I actually rolled that update about half way, and had it sitting in SVN for a while, but I never made the archive, or release notification.)

Sloppy change log:

Fixed Flash Player 10 PlugIn detection.
Changed license to MIT
Quick and dirty temp IE8 support (makes IE8 use the timer method).
– removed ObjectPatentMagic
– added Packed library files for Beta 4 (says RC1 in SVN, but I changed my mind, there’s more I’d like to add).
– Added svn:keywords to most files.
– Updated tests for EventManager, FlashPlayerInfo, HistoryKeeper, SwfHTML and SwfShim.
– removed WebTV code, since the entire FlashPlayerInfo script doesn’t work in WebTV anyway.
– Fixed Issue 5. Added methods for major, minor and bugfix versions, to reflect changes to the convention in Flash Player 10 – Also cleaned up issues releated to the changes in IE.
– Added getUpdateVersion for the special case Flash Player 9 updates.
– Quick fix for shimMode on SwfShim.
– Fixes IE support.
– Adds shimMode property (it’s off by default).
– Fixed typo in call to get initial hash value (deep link), which broke it.
– Updates to the HistoryKeeper Actionscript 3.0 files. These changes are generally significant.
– Added asdocs comments (to AS3 files).
– Added support for Opera’s history.navigationMode.
– Made IE8 Hack detection more robust, and IE detectin simpler.
– Initial commit of Actionscript HistoryKeeper and AS3->JS communication framework (really just an easier replacement for fscommand). All of this is pretty rough – vomit draft material.
– Some smaller code comment and formatting cleanups.
– removed problematic _createAnchor functionality. (Issue 6)
– updated IE version detect to be compatible with multi-digit versions.
– Reworked Error messages so that they make sense in FireBug and other Javascript consoles. Fixes Issue #3
– Added direct and gpu WMode values.
– Made value checking case insensitive.
– Added SVN keywords Revision and Date, and added text/javascript mime-type.
– Fixed SwfShim.

Enjoy! 🙂

unFocus.Games – Tetris clone

I made a promise on someone else’s blog to post the code for the Tetris clone I made a while back, probably in fatigue induced delirium, a little bit ago, so here it is in a new Google Code project called unFocus.Games. The post on bit-101 post was about game architecture. While developing the code for the clone, I did play with concepts around architecture quite a bit. I also played with learning about Flash 10 features – adding PixelBender filters, and even having an Ogg Vorbis based soundtrack for a while (tried both the HaXe decoder, and the Alchemy decoder). I took them both out for now though, as well as some of the more unorthodox uses of Actionscript 3.0 I had in there – I was experimenting, and besides, Flash CS4’s compiler is a bit more finicky than Flash CS3’s was. One of these days I’ll get around to blogging about some of that stuff.

The Tetris game has an event driven engine under the graphics. I wanted it to feel close to the old NES and GameBoy version of the game I remember as a kid, and didn’t want the animation stuff to get in the way of that. The text version of the game in the demo I posted is almost a raw dump of the engine data. The field is a 2D array of 1s and 0s (looking to learn bit shifting and similar concepts at some point, by converting that to a ByteArray of ints). I also did the pieces (tetrads) as 2D array representations of bitmaps at one point, but didn’t feel like working out the rotation math, so I ported a pre-calculated coordinate version of the tetrads from an old Actionscript 1.0 version of a basic tetris game I once wrote.

Quick note about the code – I used TweenLite to do some of the quick animations, but I did not include that in the repository. You’ll need to grab a copy of that yourself, and add it to your class path to compile the source code as it is. At some point I plan to remove that either entirely or replace it with Tweener (because of the licensing).

In regards to game architecture, I don’t know if it follows any particular pattern (MVC seems to be quite popular these days – can’t talk about software design without hearing of that). Anyway, the code is probably far from efficient, as that hasn’t necessarily been a goal as I wrote it, and it’s far from finished, but there are some fun bits in there. Feel free to take a look, and share any thoughts. 🙂