Great development languages: PHP, MySQL, Javascript/Ajax For killer apps.
Object-oriented programming capabilities in PHP have come a long way and allow for functional and efficient code. I have seen many scripts that take advantage of OOP and many are done well. However, it seems to me that some people tend to over-do it on the classes.
Code should be functional. It should be efficient. And equally important, it should be easy to read. I can't understand why so many programmers feel the need to write long and complex code to perform simple tasks. You don't need a class to convert a date format - a simple function will do the job. Why write 50 lines of code when you can accomplish the same task in ten lines? Is it to prove how skilled they are by the complexity of the code? The real skill is getting the size of code as small as possible - that's called efficiency.
There is a need for OOP when designing large systems that will be maintained by multiple developers. The strict structure of well-written classes will keep sloppy programmers from creating many errors.
In order to know if you should use classes in your program, ask yourself a couple of simple questions.
My Legends of Dhashar PBBG relies on classes to manage characters, monsters, and the map. This was a decision I made based on the scope of the game, the fact that I'm modelling concrete objects, and the possibility that I might allow other developers to work on the codebase. The classes make the code easy to read and to modify.
Classes in PHP make for very powerful and efficient code, but be careful not to waste your energy writing unneccesary classes to perform simple tasks. Overly complex code is not a sign of a great programmer, but that of an inefficient amateur with something to prove.
If you have been to www.conquerclub.com, then you have seen what I think is a very interesting concept in wargame design. They have taken the game mechanics of Risk and built a system around them to allow for the use of any type of map (game board) you can imagine. And all of this is accomplished in a persistant browser-based game (PBBG).
This flexibility appeals to my low boredom threshold. I play a game/scenario/map several times and then I need a change. So I have studied their site and reverse-engineered it, in a sense. It is now my goal to develop a similar system of map flexibility while keeping a consistent set of core rules. My design is different in that I want to expand the complexity of the game - instead of following the Risk system of simple numerical superiority, I want to incorporate different unit types, such as infantry, armor, and air units.
For the prototype game, I have "borrowed" a map and unit icons from other websites. Once the game gets to beta testing, I will either try to design my own map and icon set or ask a better qualified person to donate their time to create them.
The game is coded in PHP with the accompanying MySQL database. In its current state, it uses very little Javascript, but I would like to incorporate AJAX at a later time for seamless combat and movement. The map and military unit data are structured in simple text files that correspond with the map image. I have created two classes: one for the map and one for units. The rest of the functionality is in a separate "functions" include file.
I have invested around twenty hours developing the system and have at least 10 more hours until I have a playable system ready for Alpha testing. I will post the link here when it is ready to go. Once the game is live, I will also post code samples and go into the design of the game in more detail. Keep checking back for updates to this promising wargame.
In the meantime, I suggest you go to Conquer Club and try your hand at one of their interesting maps.
/* Comment */
function test() {
echo("This is my syntax highlighter test.");
return;
}