Grant Skinner

The "g" in gskinner. Also the "skinner".

@gskinner

Flash RTE on next-gen portable game systems

I was just reading about the next generation portable game consoles coming out from Sony and Nintendo via a post on FreakSauce. These units will feature large color screens, 802.11 wireless networking (presumably with internet capabilities), and processing power to spare. The Nintendo even has a touch screen built in.

I sure hope Macromedia is considering deploying a Flash run time environment Flash for these system. There should be a large user base for both of these consoles and there are so many possibilites: occasionally connected apps; apps that communicate with other nearby consoles for community, collaboration or gaming; rich productivity and commerce apps; apps that use the network to synch data between your portable gaming system and your home computer. The idea seems really exciting to me, and I haven’t even had a chance to think them through yet!

Obviously though, this could all be muck, if there are hardware, orlicensing limitations on these systems that would preclude it.

Anyway, I need to get some sleep. Enough ranting.

Source Code: EventProxy

A couple months ago, Mike Chambers released an EventProxy class, which served to make delegating EventDispatcher events simpler. At the time, I meant to release my own EventProxy class with some extra functionality, but it slipped my mind until today when Phil reminded me of it.

My EventDispatcher works almost exactly the same as Mike’s, with 2 differences:


  1. It calls handleEvent on its target, as well as the specified function.

  2. It has an enabled property, that lets you temporarily disable the proxy


Nothing too major, but I find these capabilities handy, and thought others might as well.

You can download EventProxy by clicking here. It should be placed in the com.gskinner.events package.

You can see a brief usage example below. For a full description of how to use EventProxy, please see Mike’s post on the subject.

// import the EventProxy so we can refer to it by name:
import com.gskinner.events.EventProxy;
// create an instance of EventProxy, and tell it to call
// doStuff in this scope when triggered:
clickEventProxy:EventProxy = new EventProxy(this,"doStuff");
// register the EventProxy to listen for click events
// from the button:
myPushButton.addEventListener("click",clickEventProxy);
// this function will be called when the button is clicked.
function doStuff(p_evtObj:Object):Void {
trace("button clicked");
// stop it from firing again for now:
clickEventProxy.enabled = false;
}

PathFinder enhanced.

I recently updated the PathFinder algorithm with the ability to attempt diagonal paths, and ability to make diagonal movements. Diagonal movements approximately doubles the time required to find paths, but that is easily overcome by publishing for Flash Player 7.

As with the original PathFinder (original code can be downloaded by clicking here), this PathFinder is aimed at being a fast and reasonably accurate solution. It runs exponentially faster than an A* solution (the larger the map, the larger the speed gap), but will not always find the best path (sometimes it won’t even find a path). It was also developed to be scaleable, so you can adjust the processor usage for different scenarios. To this end, you can adjust the maximum depth of the path (max length), and the “level” of the search. The level is a value between 0 and 7 that indicates how many different paths the PathFinder will attempt and compare (a level of 7 will check 8 different paths and choose the best). PathFinder will also return a best fail path if it is unable to find a solution, so that you can have agents move towards a goal even if a full path can’t be found.

Once I have a chance to finish the updates to PathFinder, and test it fully, I will release the source code for non-commercial uses. If you’re interested in licensing the code for a commercial project, you can contact me using the contact button at the top of the page.

Read on for demos…

Continue reading →