October 12th, 2009
When I set out to write a very simple Pixel Bender (PB) kernel/script thingy, I expected it to be relatively straight-forward, mostly because Adobe has been so good writing quality documentation for its products and/or there is a wealth of info on their products produced by their users. Unfortunately I didn’t find the dev guide in the Help menu and I missed some key AS3 bits from the links I’ll post below, but even so I still had a lot of trouble finding some info that really should already have been out on the interwebs. So this post is to fill in the gaps when going from AS3 to Pixel Bender.
Hope it helps 
Best resources for beginners
Here’s the best tutorials and explanations I’ve found so far:
Syntax overview
As a casual programmer of high-level languages and no mid- to low-level ones, I was thrown off by PB’s awkward syntax. It’s strongly typed, which is fine, except I’m not familiar with low-level languages like C or any previous shader language (PB is based on GLSL from what I hear). Here’s a basic difference:
AS3: var i:Number = 12;
…in PB is: float i = 12.0;
The decimal in 12.0 tells PB it’s a floating point number. If it was just 12 PB would think it’s an int.
When dealing with “vectors” (which are arrays, as in Flash 10’s odd use of the word “vector”) it’s float2 i = float2(12.0, 2.0). Notice there’s no brackets or anything suggesting any type of array present. It’s simply the type + how big the array is, eg float3. It goes up to 4, for the 4 channels in images: Red, Green, Blue, Alpha). Then, as you can see, intializing the array is a simple matter of putting in the numbers you said would be there. So float4(1.0, 24.2, 0.1, 3.4) is valid whereas float2(1.0, 24.2, 2) is not, because there’s an extra number in there and it’s an int (adding insult to injury).

October 10th, 2009
Makin’ games
I’ve been working on a couple game concepts and want to prototype a few more before committing to one to build out. I’ve been hacking the hell out of Flixel, which I’ve decided to use for a most of the games. There’s a screenshot of game3 on the right there. Weird, eh? Also fugly, but it’s placeholder art so there. I have a new collision detection system for it that I’ll be posting about eventually (at least, I’ve never heard of it before).
The microtransaction (MTX) dilemma
I’m really excited about all the new services that have been released to allow Flash developers to monetize their games through microtransactions. I fucking hate ads, plus the ROI of them in Flash games is usually shit. Many many years ago I knew microtransactions (MTX) were the future of digital content and I’m pleased to see the idea coming to the mainstream (in America at least, Asia was quicker on it as usual).
The problem I’m seeing with MTX is that Flash developers need to try a lot harder by making much bigger games in order to really reap the rewards. Before, you could make a pretty simple, fun and addictive game and monetize it easily with ads. But with MTX, you can’t do that as easily since you need to build more content for players to buy into. For example, to me, putting premium content in a Tower Defense game isn’t viable–the game concept is so small that I doubt anyone is going to pay anything for more turrets or maps (for example). There just isn’t enough game there.

May 18th, 2009
This is my most polished module and one that I’m most proud of. It’s a stupid fun module that, when you attach the behavior to an object, will allow users to browse a bar menu full of various drinks whenever they click on the object. It adds an icon of the drink the user selected to their nametag. The icon “drains” over time and eventually goes empty, at which point you should grab another.
Each drink adds a certain amount of “drunkeness points” for every sip (you can tell how many sips you have by the icon on your nametag) to your avatar and over time your avatar will show signs of intoxication, such as bubbles above their heads and the propensity to fall down randomly. You avatar has a drink tolerance that’s determined by your MP level and how many drinks you’ve had in a session.
As of this writing there’s only 4 types of beers to choose from. In the future I’ll be adding a lot more, and not just beer but wines and spirits too. Good stuff.
If you have any other ideas for what drunk effects I should add, let me know. (Note that I can’t touch the avatar graphics so I can’t add new animations. I also can’t currently blur the screen because that would kill performance and it can get annoying.)
Module page. Search the marketplace for “bar system” or my username, “vonwolfehaus”.
Price: 1700 coins.
Configurable options: x and y position that the bar menu appears at when opened
May 17th, 2009
With the opening of Metaplace to the masses, I can finally show off a couple of the projects I’ve built for the platform.
I’m not sure why I made this module but I did. If user sit in a piece of furniture with this behavior attached to it, they’ll be giving a dunce cap with the word “FAIL” on it. They’ll also be scorned by a message from the world owner. If the user tries to leave the chair before their time is up (time is also configurable) they will be kicked from the world.
Module page.
Price: 30 coins.
Configurable variables: timeout length, timeout message (title too), x and y position of the hat.
April 1st, 2009
What I wanted was a fast, seamless way to transition from clickable thumbnail on a zui canvas while dynamically loading the content of whatever the thumbnail represented. I just loved the idea of loading content while zooming into a thumbnail without loading a higher-res image to take its place, then having the pixelated thumbnail disintegrate to reveal the actual content that got loaded during the transition. Anyway, it was the best idea that I could come up with for my application, so here we are.


March 5th, 2009
A new section is up on the projects page where I put classes I’ve written that I think might be useful to others. People seemed to like my post on bitmap text so I released the class I use to do the boring work for me.
Usage:
// Optional format
var format:TextFormat = new TextFormat();
format.font = "Verdana";
format.size = 10;
var bmt:BitmapText = new BitmapText(300, 500, true, format, 12, 100); // only width and height are required
bmt.addText("This is html text, which can't be mixed with regular text.", true); // set last param to false for regular text
this.addChild(bmt.render()); |
More instructions/explanations are in the class itself.
September 18th, 2008
It’s been a while since my last update unfortunately. I’m planning on updating the site at least once a month with new projects and experiments but sometimes that’s just not possible.
This time it’s because I’m an alpha tester for Metaplace, and I’ve been putting most of my free time into that. Check out the site, post in the forums (maybe you’ll get selected for the upcoming beta) — it’s an excellent project with a ton of potential.
But I’ve also been working on a new AS3 experiment that implements a blitting engine for sprite rendering. This allows me to display over 1000 sprites on-screen at once, as opposed to the 300-400 that’s possible with no special code. I’ll be implementing this in my upcoming Flash game. Maybe.