SPWA Week 2: Funding and Forms «
»


Games: , , ,
6 comments

So Play We All is partly a motivation hack, with teammates/competitors and penalties to make sure we each put in time towards our games. Luke’s job sent him to a conference for almost all of the week, so he didn’t get to do any of his hours. He’s paying us both $20. To keep anyone from falling behind, we’ve tweaked the rules to say that anyone who pays the penalty for missed hours can make them up when they have the time.

Meanwhile, Jim’s done great, getting code live for the first time. I took a screenshot:

Allabrilyn Exclusive First Screenshot!

The first page has a simple login form. There’s no way to register an account, and any login/password you enter gives you the above message. In his blog post, Jim wrote about the code

At that point, it was a fairly easy task to take the user object and add its data to the display for rendering. I chose to go with something like:
Hello %user%! Your account was created at %time% on %date% and you last logged in at %time% on %date%. Enjoy your stay!

STOP IT. You are writing a template language in a template language! Templates are the one thing PHP actually does pretty decently (well, it’s not Haml, but it’s way better than TAL)! Wrap PHP’s output buffering around include() and get on with your life before you find yourself implementing conditionals and loops.

This is part of a larger topic I have to respond to:

This is mostly because I had to rush myself just to even get this far and put in lots of sloppy code. So, I’ve decided that I don’t care how far ahead the others get, I am not going to worry about matching their pace.

Really, it was an unrealistic goal that I’m glad to be letting go of. They’re using a pre-built framework which means they have options to solve a lot of their issues right out of the box. I, on the other hand, have to implement even my low-level functionality. This means that I’m going to be slower to execute no matter what happens. That’s the price that I pay for wanting to use my own implementation. The positive upside is that once I manage to solve these issues, they’ll be solved for me in all of my future games and I’ll be able to skip this tedium the next time around. …

Sure, it slows me down in terms of this competition, however, I will have 100% control over every aspect of the process which is not something that I would have if I were to leverage Drupal to build the game.

I know you write good code, Jim, but satisfice, man. You’ve got the worst time demands of all of us. Luke and I aren’t barfing into our editors and making sure it passes a syntax check, we’re taking acceptable components from other people so we spend our time on the important bits.

Last week I bought and added a theme to Oaqn. I was hugely tempted to tear it apart and make sure everything was perfect, with semantic class names and no unused code and efficient selectors and and and… Instead I added achievements, a feature that will help inspire and retain players for the lifetime of my game. That code’s not perfect, either, I already know I’ll want to tweak it to add some kind of bronze/silver/gold upgrading medals — but now I’ve got something decent in place and I can get closer to a running game.

Finish a game. So Play We All.


Comments

  1. Actually, the “template” was just a printf(). lol I tried to write it in such a way that lay-persons who may happen to be reading would have a better chance of understanding. Small chance they’d know what %s means. ;)

    My goal for this competition is just to make progress. At first, I wanted to keep up and try and win… but then I started looking at the horrible, unmaintainable code it was requiring of me just to do so. I decided that I don’t care how long it takes me as I have little-to-no overhead. I’d rather produce solid, maintainable code that I have intimate knowledge / control over than slam out something quick.

    The reason I’ve decided to go slowly is because we didn’t take time to plan our games. So, rather than be unpleasantly surprised each week with things, I’m going to start treating this like a real project. Which means a portion of my time each week will be spent planning the overall element I’m working on that week and then implementing it. I’m only going to count the “implementing” portion against my time for the week as we specified the limit was for coding not for planning. :)

    And, yeah, I don’t really have any resources to draw upon since I’m using my own framework. That was my choice and I knew there’d be more work because of it. But, again, it matches my goal for this better than Drupal would: Make progress on my project(s).

    And it’s awesome you chose MK for your image… I love MK. lol :P

  2. Oh, and that error message is my generic error-catching mechanism. That code was written and in-place before the competition began. Basically, it makes sure that only under conditions which prevent code from running at all does a white screen display (syntax errors, basically). At least with a message, the user is informed that something is wrong.

    In the future, I’ll probably create some way of altering that display to something a little more friendly… but for now at least it serves the purpose of “Something broke.” :)

Leave a Reply

Your email address will not be published.