Design - rocketbootkid/Random-Hackcess GitHub Wiki

Grid Design

  • Each "journey" takes place within a 50X50 grid, with origin at the bottom left (South West).
  • Player starts at 25,1 (square at the South edge, in the middle)
  • When Player navigates to a new square, the square is generated, and its details written to the database.
  • Each new square will have a minimum of one available direction; the direction from which the player arrived.
  • If a new square is in an edge location, the direction corresponding to the edge will not be available.
  • The available directions are randomly assigned, although must match up with any existing adjacent tiles.
  • This map will be displayable, with tile images showing the available directions.
  • Available directions will be stored using a binary naming scheme. Each tile will have a 4 digit code, with each digit determining if a cardinal direction is available. The cardinal direction order in the number will be North-East-South-West. e.g. 1111 indicates all cardinal directions are available, 1010 indicates that only North and South are available. The grid tile images will be so named.
  • The main page will consist of the map grid at the top, and the controls at the bottom. The map will show the tiles in a 5 tile radius around the player.
  • It will be possible to view the entire map in a separate page.

Database Constructs

  • Table to store player details (name, role, XP, Gold, current location)
  • Table to store details of journey (journey id, player id) [A player may embark on multiple journeys]
  • Table to store details of each grid location (grid id, grid coordinates, available directions, link to journey id) [a journey will have multiple grid locations]
  • Table to store the features available at that location (feature id, link to grid id, feature details) [a grid location may have multiple features]
  • Table to store journal; details of path taken on journey (journal id, link to player id, link to journey id, link to grid id)