Wed Nov 16 2005 at 09:22PM
All right. I think we're setup here. Lets run through what we've got so far.
- You can create an account.
- Your account has a login/password combo which uniquely identifies you on the site.
- Your account has a score, this is an indication of how much of a badass you are, higher score = more 'sweet' prizes.
- Your account has a nickname so you can have a different name on the high score board if you get sick of your login.
- Secret web voodoo magic keeps you logged in (hopefully) because logging in to a site all the time is boring.
- Your can view that account and change your nickname.
- You can view a list of all the accounts. (this is doubling as the high score board right now.)
- Your can view this blog, which you've apparently divined how to do.
- Your can leave feedback about this site, either while looking at the feedback, or clicking the link at the bottom of any blog post.
- Your can also check out the Linky Thing but that has nothing to do with DanceLiquid Games.
Sweet! That's sounding pretty good. What's missing? Oh yeah, there are no games to play. (crickets chirping...) I'm working on that right now. The first game is in development. It's a block stacking game. Right now the plan is to do a lot of block stacking games, but 52 weeks is a long time. We can definitely do different types of games when we get bored. Having never seriously tried to implement a block stacking game before I'm naturally learning a lot. First I tried consulting the all mighty Google, may the well of his (her?) knowledge never run dry. I did not find what I was looking for. I was basically looking for some kind of tome of the ages originally written in the blood sweat and tears of Alexey Pajitnov passed down from one generation of block stacking game architect to the next discussing all the things I'm figuring out the hard way right now. Nope, not to be found. Note: if you're privy to this secret tome I'd love to see it. Maybe this website will someday become that tome. *daydream*
Okay, down to business.
A purely object oriented design would be good right? I mean, a simple system like this begs to be represented as objects. A single 1x1 square unit, we'll call that a block. A collection of such units with which the player interacts as a whole, we'll call that a piece. The walls and other (static?) parts of the game we can call the board. A piece is made up of blocks, and the board has several pieces on it. Ok. Another concept is the Active Piece. The Active Piece is the piece that the player is in direct control of. To begin with she can move it left or right (providing there is no wall or other piece in the way) and she can spin it. Oh yeah, the Active Piece is also falling. (slowly hopefully, I don't even know how to play this damn game!)
Wow, that sounds pretty fun.
"Who's responsibility is it to make the Active Piece fall?"
.."Move yourself you lazy bastard."
"Fine then, who's responsibility is it to figure out if I can't fall, you know, in an unlikely event where there are some blocks stacked up below me"
.."Do that too, what do I look like? Your Mother? don't answer that."
"Dude, I don't know, I'm feeling overworked :("
Under this fascist regime the Active Piece all of a sudden has to know something about the whole board, or at least how to ask the board about it's state, and to know how to manage things accordingly. Now, I'm an object oriented design neophyte but this just sounds like a bad idea. Thus sadly ended the first day of coding the game.
Day two; Sun rises, birds chirp, another chance to achieve our goals. For a brief second the spirit of Alexey is channeled, or at least it seems that way as you well know these sorts of things are fuzzy.
The board makes the Active Piece fall. Refactoring the whole of the game logic (a whopping 200 lines of code at this point) in terms of the board pulling the Active Piece down cleans things up. Like when a baby is first born, it is not so clean, and then a little later when they have wiped the, um, whatever the brand new born baby is covered in, off, is cleaned up. Bad sentence, you get the point. Taking this epiphany (the first of many, I hope) in to account makes the game work... more... than it did before. Which it goes without saying was not a lot or well.
Yeah, now that's progress, and oh yeah, tell your friends.