Archive for December, 2007

tournaments and ladders, oh my

Monday, December 17th, 2007

I know all of you duelists out there are patiently awaiting Duels 2.0. We’ve been quite ambitious with this one and right now we’re wrapping up on Tournaments and Ladders. We spent so much time focusing on the gameplay for these that we didn’t even imagine how many architecture changes would be necessary. I wanted to share some of the difficulties I’ve been facing during these late nights of work.

In Duels 1.0 a challenge is very simple. There’s a challenger and a defender and some settings for the loadouts, openers, and scrolls of the two players in the fight. The challenge doesn’t actually exist until the challenger issues it to the defender. The defender then responds with an accept or reject before the challenger cancels the challenge. Keep in mind that rejecting and canceling have no adverse effects.

In Duels 2.0 a challenge is much more complicated. In addition to Duels 1.0 settings and the new action sets which must be replenished before a fight, there’s the complication of Tournament and Ladder fights.

With a Tournament, a challenge must be issued to both players at the same time and their individual responses to the challenge must be tracked. You no longer have a reject or cancel response, but either duelist can explicitly forfeit by taking that action or implicitly forfeit by taking no action before the current round of the tournament ends.

Ladder challenges are even stranger. When you request a Ladder fight you are matched with another player. You accept the challenge and it gets sent off to the defender, or you forfeit and lose Ladder points that your would be defender now gains.

New data models are necessary to track these multiple responses and old data models have to be modified to allow challenges to exist even while missing most of the information that’s normally been required for the challenge to be a challenge. Then once you’ve got the data modeled correctly you have to update the functions throughout the system that interact with those models.

These 300+ challenge touch points throughout the system are then quite unstable and have to be examined thoroughly before they can even be trusted on beta servers where beta testers are still working through actions and balance changes. Once that’s taken care of there’s still the matter of building out the Tournament and Ladder features that required those architecture changes.

And that’s what I’m doing now, once again at 3am. I feel like Santa… err… Senter Klas putting the finishing touches on the toys before Christmas. For now I’ll leave you with a simple screenshot from one of the Ladder pages.

EDIT: I’ve also added a screenshot of our Tournament viewer in a 64 player Tournament that we simulated.

Ladder Preview

Tournament Preview

Adventures in php, ide, mac and omg

Tuesday, December 11th, 2007

So I’ve been working with this php language for almost a year now in what I will call hardcore fashion. I came fresh from the wonderful world of C# and my fancy Visual Studio IDE. It was sort of like being cast out of the garden of eden in a lot of ways but I’ve programmed on unix before, I’m comfortable with vi and used to do a smidgen of perl back in the day.

Last Friday I decided I would (once again) try to get a debugger to step through php code. I tried almost a year ago but admittedly got frustrated with it and just went with tried and true logging. I probably should have tried harder but you’re trying to be productive, get stuff done, show some progress….you know how it goes. We had a couple new developers start recently and one was successful with debugging using Komodo from Activestate and the other was up with Eclipse. That gave me the impetus to try again.

First, I tried Eclipse. After about 8 hrs of frustration and the clunkiest interface I’ve used in a while, I decided to give Komodo a shot. Granted, I did get debugging working but couldn’t seem to get it to step into the cake code (the application framework). Less than an hour later, I hit my first breakpoint in cake and that was my omg moment. Thank you Activestate. I now have a real IDE that I can debug with. Should have done that a long time ago. Lesson learned (again). That lesson where you’re doing something, you know you could be doing it a better way (like coding with a debugger) but you can basically make things work well enough for now and for now just keeps getting longer. Props to the new guys at any rate.

What does Mac have to do with all this? I’ve been doing development on a Dell D600 for the last year but had a brand new MacBook Pro all set up and waiting for me to use it. I’m pleased to announce that I’ve transitioned to the Mac during the process of setting up the new software and gotta say that aside from the interface learning curve, it’s great. Ahoy, productivity increases ahead!