Tuesday, September 4, 2012

New Project Day 4 of 7 Recap

NOTE - I'm posting this one a day late, I worked very late into the night yesterday and didn't get a chance to do the recap before I hit the sack, sorry about that!

*Warning* Some programmer talk here, skip to the next paragraph if you're not interested*

Today I made a push to start implementing more game modes without gutting the existing game functionality.  The existing general game logic is working very nicely, which you've seen from my previous blog posts.  One thing I'm fighting against is the code isn't well organized given how fast I had to create it.  The majority of the game logic is in one class, however there are some snippets in other areas as well.  I don't want to start modifying that too much in order to implement new game specific logic.  In the past I would have used inheritance to extend the existing game logic class and add the new game specific stuff.  However since the logic is a bit scattered, and that fragmentation will likely get worse as I continue, I decided to try something different: a form of composition.  For each new game mode, I create a custom game logic class that registers delegate callbacks for certain events generated by the core game logic. This lets me modify certain areas of the game, and add entirely new things, without changing the underlying game.

Very simple code org. chart

I showed off a build of the current game to a friend today and got some great feedback from him.  We ended up talking for about an hour about some new ideas and game modes I should try to flesh out tomorrow.  In addition, he whipped up some new art assets for me, little cubes that animate!  Adding these instantly made the game look 100% cooler, hopefully we can get some more stuff in there to really spice things up.

I put up a web build of the game here for those feeling adventurous.  There are no directions on how to play, no scoring and no end goal, this is just to show off the mechanics I have in there right now.  Feel free to leave comments/suggestions if you have any.  Depending on how productive I am, tomorrow I'll try to add a build with one of the new game modes implemented.

UPDATE - I'm told by Bryce, who gave me the blocks, that the blocks aren't rotated correctly. Guess I'll add this to the blooper reel. Tomorrow's update with show a better view of them.

In case you missed it, link to the web build: Build1

No comments:

Post a Comment