Wednesday, June 27, 2012

What I've Been Up To

It's been too long since my last post, and its only fair that I share what's going on. This past weekend was jammed pack and I had no time to code. However, I've been baking my plans and strategies in my head these past few days and got some time today to finally pour some out. Wasn't too much work, but it feels good to get some progress while the past few days have been frustrating due to my limited availability.

For those code minded, I found a better example code for the Model/View/Controller stuff I talked about before which can be found here. I'm using a slightly modified version of this code that provides a solid base for the various screens that I use in the game. The idea is for every screen to have its own MVC setup which will greatly aide in the organization of the code. Before it was just a cluster fuck on a single location with global calls left and right. Now, everything can be encapsulated correctly and pull only the necessary information each screen requires.

I'm going to be sitting on my button re-designs for a bit longer until I create some better plans. That way when I make time to code I can just blast it in. This seems to be working well, hopefully things will keep rolling.


4 comments:

  1. Keeping working hard, I'm not code minded but I hope to be in the future. These updates are great.

    ReplyDelete
  2. I'd suggest having a single model for the whole game state (composed of multiple parts) and possibly a single controller for all the things the player can do, shared by all the screens (they are after all just views of a particular subset of the model).

    Don't force your code to fit a pure MVC if it doesn't work; there's a lot of debate about how best to use MVC. The debate goes on still in the portland pattern repository

    http://c2.com/cgi/wiki?ModelViewController

    You'll probably also need to look at the Mediator pattern for those things that inevitably work globally or need precise ordering that you aren't guaranteed with observer/observable or when you need to replace the model (new game, load, save, quit).

    ReplyDelete
    Replies
    1. Terrific! I'm always after good information and it seems like a great resource to go through. I had my own reservations about how I was going to use mvc, but I'm not going to pretend that was the best/better solution. I'll go over this stuff on my down time and check out that pattern you mentioned. Thanks.

      Delete
  3. Keep on keeping on, this project has great potential

    ReplyDelete