Sunday, February 21, 2010

Implementation Breakdown...

Pardon the rambling nature I expect this post will assume...  I just want to try to really break this grand plan in my head down into rather small, manageable chunks so that I can actually get them done.  Some brainstorming ideas will also be here.  Post is subject to later editing. :)

Note: items listed within brackets, [ ], are things I am considering but not sure whether I will ultimately implement.

Database
What it needs to include:
  • all currently logged-in users (so you can see who's available to start a game with)
  • [all users ever? - only if I want to include saved information on a user's past activity]
  •  [location pointers to stored screenshots of past games]
  • location pointers to stored game board (track) files - both the default/provided ones and the user-created ones
  • games currently in progress: the group of users who are playing together; whose turn it is; locations on the board of each player.  note: include some kind of tag for games not yet started, players invited vs. accepted, and user who started game (becomes 'organizer')
Steps:
  • draw out the schema
  • create db, add tables and relationships
  • add some test data
  • write out the queries for the above functionality
  • code queries in PHP, test
Interface
Elements/pages:
  • navigation...
  • introduction, maybe combined with help/about page
  • list of users currently online (split to show your friends and non-friends)
  • list of games not yet started and open to players joining (as opposed to closed/invite-only games)
  • sequence of pages or steps on a page to set up a new game: selecting a premade track or [a saved track of yours] or design a new track, decide whether to open your game to any users or invite certain users, choose symbol markers
  • main gameplay page - the Flash gameboard, list of the players, their symbols, whose turn it is
  • post-game display... [stats? save this game screenshot?]
 Steps:
  • diagram of navigational flow through pages / solidify pages
  • and similarly, decide what to put in main navigation
  • sketches of interfaces
  • mockups of interfaces (html etc.)
Flash game board area
Functionality:
  • display pre-made static image (blank grid on which to draw a new track; pre-made tracks on grid)
  • user drawing a new track [check for invalid tracks - e.g. unclosed loops or lack of inside and outside boundary...?]
  • detect user clicks and localize them onto gridpoints (for players to take their turns)
  • display new overlaid graphics (player symbols on gridpoints, showing possible locations for next move)
  • determine whether a move would be out of bounds - for each potential new position, I'm thinking of drawing a line (possibly invisibly within the code?) from current player position to new position, and seeing if that line intersects with the track boundary; perhaps store some key information regarding the track boundaries when it's created, and use start and endpoints of these lines to compare...
  • output/save entire game board as a static image (for saving new tracks and/or completed games)
Facebook integration
Steps:
  • Set up a new Facebook application
  • Connect outside hosting/database
  • Run some tests to make sure FB API hooks up
  • After or as mockups are being built, convert into FBML, FBJS, etc.

    No comments:

    Post a Comment