Monday, May 28, 2007

GUI, sound, procedural content

The state machine is just far enough along to test the GUI, which is now functional. I have a form control and a button control that are working wonderfully. I also learned to use the sprite font functionality added in the latest XNA update, and it is working wonderfully as well. I created a quick main menu form with "Play" and "Exit" buttons. It's amazing how easy it is now that I've made this helper class. I'm planning on using the class for the in-game heads-up display as well.

The only problem so far with the class is that it isn't totally independent. I'll need to put some work into it before I can reuse it in future projects. And I don't think I'll be releasing the source code. Besides, you can probably find better implementations elsewhere. I refuse to use them myself because I want to learn it the hard way. The hard way is the best way. I'd thank you to remember that.

One thing I haven't figured out yet with the gui is clipping. The only way I can imagine is to create a new texture for each control, but that would eat the resources. Maybe I'll leave it as it is and refrain from having any graphics on my controls that might run over the edge.

I'll finish up the gui quickly and maybe go on to a sound helper class. Maybe I'll test it with my gui. A "click" sound will play when you press a button. I don't know how much help the book will be. He'll want me to use his helper class again. I have a hard time reading code that isn't mine. Maybe I need to brush up on those skills, but I don't have the patience for it now. Besides, I want to figure out how to make the helper class myself. I don't want to copy his code. All I want are the base sound classes.

By the way, I've been looking into procedural content lately and I found this little post on Introversion Software's dev blog for their new game Subversion. They've created an engine that generates a city from scratch in a couple minutes. They even has a video demonstration. If you're interested, you can check it out here.

clevceo

No comments: