PHP, Zend Framework and Other Crazy Stuff
Quantum Star SE Evolved 0.18 – released for testing
Today marks another Quantum Star SE milestone. Back in September the quest started to rewrite QS in earnest in what we called the “Evolved” branch. Today I have released a limited version of Quantum Star SE Evolved 0.18 which is primarily aimed at exercising the backend library (Partholan) and catch any final bugs that need fixing.
The download: http://www.quantum-star.com/devsite/Quantum_Star_SE_Evolved-0.18prealpha.tar.gz
So what makes QSE so different from the normal Solar Empire derived flavour of QS2 and QS Generations? A lot. QSE leapfrogs 6 years of PHP usage, debate and best practice. Where SE still lingered in the 90′s when PHP3 was predominant and security practice non-existent, QS Evolved was written for the new age of PHP. It relies heavily on design patterns, code generation, variable filtering and escaping, object oriented programming, and the key objectives of security, maintainability and reuse.
Its not perfect. I never had an intention of building an all-consuming framework. But as a loosely combined collection of classes it excels for my purpose – creating PHP games easily modified by users. So where complexity might have made things easier to maintain, I opted for simplicity in some cases. Where a design pattern may have injected an unintuitive connection, I opted for a roundabout yet clearer method. The code is readable, commented, tested, PHP4 compatibable, easy to work with and avoids any form of messy spaghetti solutions Solar Empire is famous for.
It’s one of the most complete approaches ever seen in a PHP game. And its completely re-usable. Want another game? Then take a shortcut, grab Partholan 0.18, change a few constants, and off you go. The basics you get for free – no time investment of a few months required.
This is not a complex application to figure out. Knowing what MVC stands for is 80% of the battle, the rest is experience and a little experimentation. The main barrier is the OOP approach. Most novice PHP developers are procedural fans, but the jump to OOP is worth making.
The good points get better. Where QS and SE generally are difficult to install and work with, this new version offers as its test case the new Installer. This is so simple a complete newbie can install the game in a few minutes. It just requires a little general server know-how for changing 2 directory permissions, and knowing your database details. No path settings, no url setting, no niggly little variables about file writing or other options. It’s simple, intuitive, effective and fast. It works.
The installer saw a lot of attention. Many will see that as something of a waste of time but QSE was never going to follow the Solar Empire tradition. QS has always had a strong user focus. Despite its numerous flaws, a year-old version of a buggy QS2 beta still draws a loyal following. QSE will draw a lot more when its playable. If anything the Installer is key to gaining a following. It is the single most important application that determines how an application is perceived by the public. Make it simple and they will see quality and care, make it difficult and they will see the opposite. It’s worth the time spent designing and simplifying it.
Now the bad points. ![]()
There are problems with my approach. Every “action” requires the use of 3 classes: Command, InputFilter and View. You need all three to be created and edited for every action in the game/installer. The reasoning is to facilitate flexibility. So thinking an action needs one class is not possible in QSE. The code is also slower than an equivalent app written without OOP (i.e. procedural code – like QS2). This is a price paid for the superior maintenance and stability of an OOP based framework.
There is also a level of inflexible structure in the source. For example the code cannot handle UNIONS, JOINS or other database queries that generally save the app from running unnecessary queries and slowing execution. Another price paid for the simplicity and standardisation of Data Access via a fixed, predictable API.
There are other problems and blemishes, but none at this stage are considered show stopper criticals, barely any are even rated minor. What’s important is that this release complete testing, we fix the bugs, we announce it stable and we get this game up and running! ![]()
Related posts:
| Print article | This entry was posted by Pádraic Brady on February 20, 2006 at 6:13 pm, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
-
http://www.visionsofdarkness.net Moocat
-
http://www.visionsofdarkness.net Moocat
-
Anonymous
-
Anonymous

