For the past week or so, I have been investigating various Remoting solutions that I can implement for the Flex Games I have currently developing. The basic features that I am looking for were:
- Translation of complex data types (being able to map classes on the client and matched on the server)
- PHP supported
- Compressed data format
- Transparent RPC mapping
I initially started with AMFPHP but switched to ZendAMF. AMFPHP seems to be falling behind in support with the last release in 2008 which is decades in Internet time. Zend AMF is also backed by Adobe which is a good sign. On the side note, iPhone integration looks pretty good to with a Cocoa AMF. I would have preferred C++ but I guess it will do in pinch for now. I will be testing that next week or so.
Zend seems a bit fat, because you have to also include the Zend Framework as well. That’s something I’m going to have to figure out to see if it can add value to services I am writing.
Game developers are fairly practical in their implementations. The most practical of Design Patterns that every game developer should understand intimately are:
- Singleton – Singletons are needed but often abused as a design pattern. A singleton is basically a class with one instance. Most prior singletons were not thread-safe but with multi-processor architectures of hardware, this should be a consideration. Singletons are common used for creating loggers, database/networking access objects.
- Factories – Factories are usually coupled with singletons. Factories are often found in resource/assset managers allow managed assets to be created. The role of a factory class is to “create objects” based on a template with specific functionality or generic
- Model-View-Controller – The Model-View-Controller is a way to separate (but not necessarily simply) functionality of complex systems. A Game Engine could use the MVC design pattern to sort out the various components into logical blocks of code. MVC is used extensively in Flex development to break up monolithic applications into manageable portions. The Model contains all data used by the application. The View is what the user sees and the Controller is Application core, responding to events from the View and coordinating resources from the Model.
Right now there aren’t any good open-source development environments for Flex. Everybody seems to be using Flex Builder, which you have to pay for. For me, I like things free especially since my primary web development platform is Ubuntu 9.10. I did find AXDT which, which I feel shows the greatest promise in evolving as a free alternative to Flex Builder. Plus it helps that the primary target seems to be Ubuntu.
For more information, you can go to: www.axdt.org. I have got it working with the latest Flex 3.5. I am having some trouble with Flex 4 though but that’s still in Beta. Primarily I wanted something to allow me to edit mxml and Actionscript files not caring much about layouts. I have also been able to get it working with AMFPHP. So far it has done most of what I want.