Casual Game Development http://blog.pettomato.com Techniques and Algorithms Thu, 22 Mar 2007 00:33:54 +0000 http://backend.userland.com/rss092 en actionscript-mode for EmacsW32 Ben Leiting just sent me his modifications of actionscript-mode.el to get it to work with EmacsW32. I don't have time right now to merge the two versions together, but you can download his version here. You'll want to remove the ".w32" from the end of the filename after you download ... http://blog.pettomato.com/?p=24 Memoization in Actionscript I love this programming technique, mostly because it is so easy to just drop into your code and instantly trade execution time for memory usage. More information can be found here. [as]package{ public class Memo{ static public function Memoize(obj:*,func:Function):Function{ // *** Each ... http://blog.pettomato.com/?p=23 Emacs mode for AS3 I've rewritten my actionscript-mode to support AS3. I've stripped out everything related to AS2, but you can still get the old version from here. actionscript-mode.el I have been using this new mode for a couple months and I haven't had any problems, but your coding style might differ from mine, so please ... http://blog.pettomato.com/?p=22 Sound Effects I've produced the sound effects for almost every project that I've worked on for the last 7 years. I've used synthesizers, tone generators, samplers, and sound libraries. At this point in my career, I've found that I can get the best results (for games) by starting with The SFX Kit. ... http://blog.pettomato.com/?p=21 Changed Blog Name I've renamed this blog "Casual Game Development," instead of "Flash Game Development." I'm only mentioning it here because I want to explain why. For the past three years, I have been using GNU/Linux for my personal work and general home computing, and for the last year, I have been using ... http://blog.pettomato.com/?p=20 Reinitializing an Instance Occasionally, I want to reuse an object without having to create a new instance from scratch. Creating an instance with the new operator can be prohibitively expensive if you have to do it a lot. For example, I'm working on a project where a firework explodes into several dozen sparks. ... http://blog.pettomato.com/?p=19 Hooks and Closures One design idiom that I have borrowed from Emacs Lisp is the concept of hooks. A hook is a function that's called when a particular event happens. In Emacs, for example, whenever I create a new file, I have a hook that checks if the file ends in ".as" and ... http://blog.pettomato.com/?p=18 Flash Socket Server in Lisp Here is another version of a socket server that you can use to catch your debug messages from a live swf. Python version here. This one is written in SBCL, which was compiled with threading enabled. NOTE: I am new to Lisp. I have a feeling this script will be revised ... http://blog.pettomato.com/?p=17 Heap A Heap is a really interesting data structure. It uses an array to hold it's elements, but the elements are ordered in such a way to form a binary tree. A heap can be used to sort an array efficiently, but other algorithms such as QuickSort are usually faster. A ... http://blog.pettomato.com/?p=15 Game Design: Magnet This is another idea we came up with for something that would be quick to produce. We originally planned to make it a downloadable game in Python, because we wanted to do a lot of things that wouldn't be feasible in Flash, but now with Flash 8 they are possible! ... http://blog.pettomato.com/?p=14