Tuesday, April 5, 2011

Wumpus planning 3

Ok, so I have a map structure.

The program would flow like this (very high level):

1) Initialize map data
2) Draw map
3) Give player feedback (unless 100% done graphically)
4) Wait for input (up/down/left/right/fire arrow/quit/restart)
5) Update map data structures (set player location flags, etc)
6) Re-run the Draw Map function

So, the data in the array drives what's drawn. It's easy for my naiveté to get in the way and want to drive it with the graphics itself (check for pixel colors or something) because that's what I used to do as a kid. Live in data-space so that the drawing method can be as agnostic as possible.

I would love to do this with GTK to handle the keyboard events and some kind of graphics element. Imagine a square grid of tiles and then below that a text box that updates the player on what's happening or gives instructions on what to do. If I wanted to get some widget practice I could even add in arrow buttons to drive the movement.

No comments:

Post a Comment