Ferby's Blog
These are just some random ramblings, because I have nothing better to do with my time.

Monday, February 18, 2008

Design Patterns

By John, Annie, Lucy and the Woof-Woofs at 11:58 AM

I've been reading some design pattern posts on gd.net lately and I have come to the conclusion that some of my design choices aren't the greatest. I want to refactor my code to fix these design flaws, but I'm worried that I'll just end up burning myself out and I won't want to finish the game. There are a few smaller things I can fix, but I think I'll have to leave the major ones in for now. Once I have fixed these smaller ones I'll then see if fixing the larger issues is a reasonable choice.

I think the first thing I'm going to work on is removing the FocusComponents. Instead I'll create an interface with the methods that are supposed to be called and then have each menu implement that interface. This is really what I should have done in the first place instead of create a new object to handle the input for each menu. This is mainly be a matter of copy/paste the code in the focus component object into the menu object. It will also make it easier to deal with writing the menus. This way I won't have to jump back and forth between two different classes in order to create or debug a menu.

 
Category:

1 comment so far.

  1. John, Annie, Lucy and the Woof-Woofs February 18, 2008 at 3:51 PM
    I may have spoken too soon about the FocusComponents. I'll have to see if I can create the work around that I want. I know I can make it work the way I want, but its going to be more work than I originally thought.

Something to say?