flash


http://www.gamebrew.com/tactics100

I wrote a simple Inverse Kinematics object in Flex that I wanted to prototype before making a robotic arm project I’m going to work on. It has some instability issues (still needs an integrator), but it’s nifty. Click and drag on the examples to move the control point.

Robo Arm Test

I also found that making a ‘difficult to solve’ position makes for some interesting instabilities, so I made this ‘tail’ example to show that off.

Tail Flick Test

Ok so simple demo:

  • Login
  • Character Select (names will be replaced with ‘mid level zoom’ infoblocks… on click, they will go to ’sidebar’ for verification and a blurred version of the map where you were (stored as a screen shot from last game) will load on the left)
  • Chat Panes demo (forced ‘receive’ messages are moving the tabs around)
  • Character InfoZoom demo

There’s still a lot wrong with the transition code… Adobe did not make it easy, and it seems every possible method I try doesn’t work re: the black and the label text in the character select. I’ll figure it out eventually.

Demo Here (requires flash 9)

Got a new class, JSONSocket to work last night, along with the MessageEvent helper event.

Basically:

var sock:JSONSocket = new JSONSocket(”localhost”,8500);
sock.addEventListener(MessageEvent.MESSAGE,msghandler);
sock.writeJSON({ type: ‘login’, name: ‘oizys’, auth: authstring });

function msghandler(e:MessageEvent):void { trace(e.message.text); }

I’m going to further abstract it to a GameSocket class and tail some message-specific code off of it, and a smarter Event registration, but then we’re ready to roll.

I recently purchased this book: ActionScript 3 Cookbook and it’s been an awesome investment. Since so much of AS3 is still badly documented/exampled, this has been a livesaver on some things. The book agrees with me that Flash’s startDrag() and stopDrag() are fundamentally broken, and provides a simple replacement that I’m going to base my code on.

I’ve started doing some widget coding since flash could definitely use some of these. The last example (the color picker) uses a RibbonWidget (basically something that updates or triggers on first mouse down or anytime mouse is down while you’re over it).
It has to use my MouseState utility class which I had to write (along with KeyboardState and KeyboardMap). It’s truly a travesty that I have to write these at all, but AS3 seems to turn a deaf eye to stateful programming in favor of completely loopy event-only coding. Using those singleton classes as a base instead of Keyboard and Mouse in AS3, I can treat them as button matrixes and just poll them at event time to see what their state is.

I’ve got a lot of new year’s resolutions surrounding Gemini, so I’ll definitely be posting more often.


All super accurate, but some speed sacrifices for this. Going to try to make one that sacrifices the other way, and a couple other types.


Click a ‘piece’ and then drag sliders


Drag the screen around

Quick test showing a very dumb/slow ‘bloom’ type glow. Very easy to do. (flash 8 or greater)