Skip to content

Block Generator Algorithm #107

Description

@E-A-N
  • Make a layout of the game stage (sort of like map)
    • Use a matrix (arrays nested in an array) for this layouts base data structures
      • Matrix should be 2 separately generated 4 X 14 in sequential fashion
    • Decide the values the represent the different elements in the matrix
  • Make rules for the spacing of the obstacles
    • Obstacles can only be generated above offscreen markers
    • If the Element is a block, it cannot overlap with other elements
      • If the obstacle is a Full Block the next 3 FULL columns cannot generate other elements
      • If the obstacle is a Half Block the next 2 half columns cannot generate other elements
        • If there's a Half Block, the next half block should not be generated for atleast the next 2 columns
      • If the obstacle is a Quarter Block only that tile cannot generate other elements
      • If the obstacle is a pickup then it does not align to the grid.
        • Pickups still cannot appear in block spaces
      • Wipe Matrix Cells when they go below the screen boundry
  • Make rules for the coloring of the block
    • The Next Block (full block) is based on the color pickups that are already on screen (below the next marker)
    • Color Pickups are randomly generated
      • Color Pickups should spawn every 2 to 4 tiles
    • Spawned Colors should be added to an active colors list
    • When a full block is spawned, it can only spawn an attainable color combo
      • An attainable color combo is the potential color of spawned pickups and player colors

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions