Wednesday, February 02, 2005

Time Machine

The contained area scanning is now in 100% c++, and it's fast. Fast enough to not notice it happen, anyway. The display of the contained areas is still slow, since it must create a new object for each gridspace that's contained, but that will be eventually solved by using openGL to draw such things directly on the client. I might even use tri-strips or something.

Anyway, I also got started on moving things to the client. All of the script code to handle multiple clients is there, on the server scripts at least. I still need to create the proper stuff in the clientside scripts for two people to actually play. Before I started on this, I realized I need to send some stuff across the wire. This will make two people on the same keyboard rather simple to implement, but even more importantly it will allow network play. The reason this needs to be so is each client needs to keep track of the walls, contained areas, and other things to reduce network traffic. Just sending updates will be more efficient than storing everything on the server and having the clients access it each time they need it.

So I've been struggling to think of the best way to approach this, since my network coding experience is slim. Just today I spent about 2 hours trying to wrap my head around the whole concept. I think I've finally got it, and that means that fairly soon network play will be possible. So I can sit at work and play... er... I mean... test... yeah, test my game with my wife at home and see how it works. It's exciting just thinking about it.

When I published my one and only game Booym, I was 18, and the whole development cycle was only 3 months. It was a fairly simple game, but I look back and wonder how on earth I got so much done in such time. Yes, it was summer, but we traveled around part of the time, and other things were always distracting (I still like to play other games, too). So it was really more like 2 months. Anyway, my point is that I've tried to reach back 6 years and figure out what was so cool back then. The answer? A clipboard. Yeah, I had a clipboard for my game. I've never done well with full design documents. My design documents consist of a couple short paragraphs describing the essence of the game. Sometimes I explained a particular feature in a little more detail, but there was very little design on that clipboard. Mostly I just dove into the game, got a prototype working, then starting adding stuff I thought would be cool. The main thing on that clipboard was a checklist. While working on the game I would think of other things I need to do. When such things came, I wrote them down. My prioritization method invovled putting a box next to things that need doing soon. I doubled that box if it was urgent, and tripled the box if it needed done today. That's it. In subsequent game attempts, I've tried to be more formal, and I end up spending too much time designing until I get bored and think the game is going to be dumb. So I'm reaching back in time to get that same adrenaline from making a game impromptu. I'm hoping it will work better.

The next steps are to get the necessary data on the client and synchronize with the server. After that, it's getting the build command and fire command to work from the client (simple). Then I've got to code in all the piece templates to make the game more interesting, and randomize the selection of the next piece.

No comments: