Sunday, August 5, 2007

Sports-Golf 2 - Grid or Not?

Getting back into action after a weeklong getaway. A couple quick posts planned.

Here's the fundamental difficulty I'm having in designing this golf game; whether to go with the discreet or continuous model, as I've started thinking of them. In the continuous model, a given hole of golf is depicted as a simple image, with each pixel representing a given location on the course, and the color of that pixel determening if it is fairway, green, rough, in the hole, etc. The player's ball is at a given coordinate. When they decide to take a shot, they pick a game, a winner and an angle, to the nearest whole degree. Then, math is used to get to the new location, with distance determined by the scores, and angle deviation caused by the wrong team winning.

The problem with this approach is that figuring out where the ball's new location is, and visualising locations, are difficult. I'd really like this game to be really painless, since you are ideally supposed to be playing it every day. Ideally, you would just make your picks, and the rest would happen. But now, we've introduced a math equation of mild complexity. Furthermore, just knowing the coordinates of your opponent's ball doesn't provide a really satisfying depcition of its location, its sort of something you have to hash out. I could write some kind of web app to handle all this, but it seems against the spirit of the exercise somehow.

I suppose this approach could just be a slightly more complex exercise, your daily experience with it would involve calculating the result of your last shot, possibly locally drawing the results of your shot and your opponent's, and making your next guess for your next shot. It wouldn't be all that much more involved than taking a turn of play-by-mail chess. Actually, that could be the model, a jpeg that is emailed back and forth, where each player charts their progress via a line drawn on top of the course map, so that there is a shared artifact, however electronic, that is passed between. Heck, I could make up an excell spreadsheet that could do all the requisite maths for you without all that much trouble.

- - - -

I actually think I've talked myself into this approach, and might be seeing a way to do it that would be doable, which is the sort of outcome I suppose these posts should strive for. Just for reference, here's the short version of the discreet model. In short, I wanted to make something with easier maths, and easier visualization. Basically, I wanted to up the granularity, so that you were working on a grid of spaces, much larger than the pixel levels. There would be no angle caluculation maths, you would somehow just end up at a space. This grid would be course enough that you could say "I'm at space 5-H" and your opponent could look at the grid and reasonably visualize that.

Instead of angle selection, you would choose a target space, your options limited by the sport you chose, and would deviate from it based on score difference and winner picking. For example, if you want to target a space really far away, you need to pick a basketball game, where your chances of deviation are greater due to the higher scores. If you want a baseball game's consistency, you aren't allowed to select a space more than X spaces away. You might even be limited to choosing certain sports when trying to hit over trees or other obstacles, or when hitting out of the sand or rough. Its a little more coarse, as an approach, but it might be a lot easier.

I suppose now I'm not quite sure which of these directions I like better. Comments appreciated.

No comments: