State Machines in ActionScript
3
Dec/080
Dec/080
I love simple solutions to complex things. Squize’s post over at Gaming Your Way on State Machines in ActionScript explains an issue game developers often face that is elegantly handled with function pointers.
It’s been months since my last post (and coincidentally changing jobs) but I’d recently dusted off a grid-less rendering engine for 2d games and was slightly disgusted with it core. It’s really not that bad. It works but the main loop gets a wee-bit lengthy and burns up cycles evaluating items that could possible be out of context at any given moment.
Using function pointers to create a state machine wraps this up nicely. Cheers, Squize!
Comments (0)
Trackbacks (0) ( subscribe to comments on this post )
No comments yet.
Leave a comment
No trackbacks yet.
