Are magic MVC frameworks really helping me? 2

As a preface, please read this about “magic” code.

It wasn’t that long ago that I gushed about Cake. But after doing some development with it (beta sites for Mockingbird), and after recently working on our current site (which runs on top of Pligg, kinda), I’ve started to kinda think, “hey, what are these guys actually doing for me?”

First, I am still baffled that with all of the auto-sniffing-magic that these frameworks (Rails, et al) do I still have to describe by database schema in two places. I mean, come on, Microsoft solved this problem in .NET. Sure, they do it through code-generation (XML database schema creates the actual underlying database as well as generating all of the C# classes used to interact with it in a completely typed, validated way). But with Cake (and with Rails, AFAIK) I have to go off and do DB admin creating tables and indices and such, and then I have to come and create some parallel classes in the framework. Sure, I don’t have to specify the individual fields, it’ll automatically attempt to map unknown properties for me… unless I want to build-in validation, or relationships, or serialization… you know, trivial little things that only serious webapps would need… ahem. Sure.

Second, I’m just terrified by the amount of decision-making that is made each time “through” the framework when one of my pages is served up. Sure, op-code caching alleviates some of this, but really, should I be executing 10x the necessary amount of code to save me from having to write out a dozen lines of completely self-explanatory, easy-peasy lines of code?

Maybe I’m missing something… maybe these guys are doing a lot of stuff for me I’m not realizing. But I get the itch’n feeling that they’re really just providing a different syntax (with some defaults that make building a bare bones blog in 15 minutes a snap) on bits that are already there, at a lower level.

Routing — mod_rewrite/.htaccess is the only routing tool you need. I almost guarantee you’re not doing anything in your webapp that requires some kind of routing logic that can’t be handled elegantly with mod_rewrite/.htaccess.

Controller — this is the PHP file that your mod_rewrite directs queries to. All you need to do is practice some self-control and keep all of the aesthetic bits out of this PHP file. Just do the work, the logic of the user’s request. When you done all your work, just pass the results off to the view.

View — go download Smarty. Just use it. Flickr uses it and they get more traffic than you ever will. It’s a templating engine designed with the viewpoint that the template should *only* be the view and that the designer and programmer are at least independent tasks if not entirely different individuals.

Model — I was very frustrated with Cake when I tried to combine it with Pligg. Pligg had a particular table/field naming scheme, and Cake had a similar (but different enough) scheme. There was no combination of tweaking that would get one to be compatible with the other. Writing the necessary SQL queries to bridge the gap manually was trivial. And I knew them all along – in fact, I used them when debugging the naming scheme in an attempt to work backwards. :) Just grab ezSQL, that’s as simplified and automatic as your database interaction should be, because the database is critical (and powerful) if you don’t discount it as just a big property list.

Helpers, Components, Behaviors &mash; these frameworks all have a bunch of additional “utility” features that basically just make life easier as a webapp developer. These could be worth it, if they’re you’re particular flavor. But I bet for each one there’s a strong, healthier open-source version that does more.

Maybe I should put my money where my mouth is? Maybe so. How cleanly could I build a webapp without a framework (and without implicitly building one myself)? In other words, have we heaped one abstraction too many on the pile?

It’s a beautiful thing. 0

From From Little Things, Big Things Grow, an A List Apart essay by George Oates, UI Designer, Flickr:

Treat your place like your home: welcome people, fix them a drink and make them feel comfortable. Before you know it, your guests will be chatting amongst themselves, the party will be pumping, and people will be making plans together.

Are you making a game, or are you making a game? 0

An oft-encountered problem when discussing “games” is that we don’t have a fully-developed, universally understood terminology. We’re getting there… we’re much closer than we were just a few years ago, and lightyears ahead of where we were ten years ago. But there’s still a significantly sticky term that we seem to be permanently stuck with: the name of our medium, games.

The term “games” has been around for Really Long Time&tm; (I couldn’t find a reference indicating the date of the origin of the word, buts it has its roots in Olde Englishe&tm;). When we use it today we’re generally referring to video games, board games, card games, sports, etc., i.e. structured (however loosely) activities with interaction, rules and goals. There’s a ton of academic writing on the specific definition that I don’t care to go into… we all know what we’re talking about.

Or do we? The problem with the term games is that for 99% of its history it referred to a formal structure of rules with some goal. But we use it far more liberally these days, particularly in the indie or academic game circles, meaning more generally interactive entertainment (as opposed to films/books/music being passive entertainment).

Randy Smith (EALA) raises this issue in a recent Next-Gen column. Actually, he doesn’t directly raise this issue, instead he raises the issue that we used to have games where the player was allowed to fail, didn’t have a clear path for success, and in general had a much “grayer” experience. He cites Ultima V, which to be honest is cheating, as that game is much more the exception than the rule in regards to “gray” games.

His larger point is that “modern” game design, borrowing heavily from the good designs perfected in the casual market, dictates clear paths to success, objective scoring, concise rules, etc. (you can read his article). His question is whether or not we’re losing something by focusing on these things exclusively, i.e. have we overcorrected and lost something powerful?

The problem is the definition of what we’re doing, what we’re making. If you’re making a game that’s similar to a sport (Quake, practically any FPS with a military-theme, practically any RTS, virtually all casual games, all arcade games, etc.) then all of the elements of modern game design are totally appropriate. On the other hand, if you’re making a game that’s more akin to a simulation or a toy, then all the tenets of good usability, user interface design and accessibility (all different ways of saying the same thing) are critical.

But what if you’re making a game that’s like Ultima V, or Passage, or Super Columbine Massacre RPG, or the Olympic Torch Relay Game? These games are more about the message than the mechanism. The mechanics aren’t elements of structured play, but rather the necessary elements in order to get a specific emotion or point across to the player.

So, we’ve got serious games, casual games, hardcore games, just plain ole games… and message games? These are really our “art” games, games that focus on message or mechanics. They don’t dispense with mechanics, the mechanics are just secondary to the message. And as a result, they often have unoriginal mechanics because it’s not the point.

Note that I’m not dismissing mechanics as important in a “message” game. Cinematography is still critical to good film even if it is secondary to a message in many instances.

What are some examples of message games? I’d love to hear them in the comments. I’m looking for games where the point was the message they conveyed, not the mechanics with which the user interacted with them. I’ll start with the obvious ones I’ve already mentioned: Ultima V (and IV), Passage, SCMRPG… Planescape is probably one, though I’ve never played it. Others?

Magic Thinking 0

Code on the Road: No Magic

Amen, brother.

Mockingbird - The Game Making Game 0

Told you it’d be released in April 2008… ;-) Just barely…

Testing, 1, 2, 3 1

See you tomorrow…

Mockingbird Update 2

This casual games traffic thing is pretty crazy. I had no idea Addicting Games had such a spotlight to focus. Here are some interesting numbers:

  • 334,000 plays of the Olympic Torch Game on Addicting Games (within 48 hours of posting).
  • 874 ratings, 367 reviews on Addicting Games (mostly complaining about the game being too short).
  • 51,198 plays today on Addicting Games (since midnight PST), and that’s without being the biggest featured game on the homepage.
  • #10 most popular game on Addicting Games of the last week.
  • 54,000 visits to our homepage since the game was posted at Addicting Games. Nearly half of those visits came from sites that “borrowed” the game off of the Addicting Games website and reposted it on their own, primarily AGAME.
  • 2,000 people have signed-up for our beta test (but only 500 of those actually entered a valid e-mail address). That’s about the same number of people who played the two games on our homepage.

Wow, I’m blown away. We never expected that much traffic to be sent our direction from this game. I hope the momentum keeps up for the next week or so… we’re getting close to unveiling the real deal.

Oh, and for those folks who saw my presentation on the Craft of Gamemaking: this is what I meant by “replay is a myth.”

Olympic Torch Relay is a success? 1

So, we’re up to 148,000 plays on the Addicting Games website, making us the #2 most popular news-related game of the week (behind some game about taking pictures of chicks — unfair competition). We’re the #1 most popular game of the day with 57,000+ plays since midnight. We’re the featured game on the homepage. And we’re google hit #2 for “olympic torch relay game”, which goes to show how much weight Addicting Games has because the words “olympic”, “torch”, “relay” and “game” appear in about a million news articles and blogs posts right now.

The opinion of those who are playing it? Almost universally bad, usually along the lines of “I don’t get it” and “it’s too short” and “where’s level two?”, though some folks with positive comments along the lines of “it’s the message, stupid!” clearly get the point. Personally, I see even those negative comments as glowing compliments. It’s exactly what I would expect a relevant, disposable game made by an average guy (my business partner, who’s neither a programmer nor an artist) in less than a day. Actually, if you forget about the time it took to get the custom art, the actual game making process was more like a few hours. Tops. I could rebuild that game from scratch using Mockingbird in less than 10 minutes. Maybe less than 5 with practice.

In other words, the game was basically created as quickly as it could be imagined. About like me writing this blog post… I’m making it up as I go along. Now imagine thousands of folks doing the same thing on subjects that are relevant to themselves and their friends. And now imagine that feeding an even larger group that takes those games and mashes them up with their own content and tweaks, extending them with their own levels…

That, my friends, is the future of games, the future of the medium of games. That’s the long tail — the world of player-created games, of participatory games. That’s the true YouTube of games.

And that’s Mockingbird, The Game Making Game.

Olympic Torch Relay — The Game! 1

Wow, kinda out of nowhere we’re the featured game on the front page of Addicting Games. I never would have expected this… yesterday morning when the idea was pitched to us. ;)

Olympic Torch Relay

Mockingbird is currently in a closed, private beta. We’ll be slowly inviting more people to join over the next few weeks. If you’re interested in a sneak peak, or you want us to let you know when it’s unveiled to the public, visit our homepage. Or those who know me personally can e-mail me personally and I’ll bump you to the front of the list… ;)

Now *that’s* physics… 0

I wish the Flash Player had just a bit more performance… people are doing some wild stuff with 2D physics and particle systems.

Next Page »