Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
Matrix Games Data Model

10 Matrix Games – Data Model

Posted on January 19, 2021October 4, 2024 by Toma Velev

This article will be about Matrix Games Data Model – a little bit slide away from business like apps, architectures, platforms and code. Game Developers also derive knowledge and wisdom from best practices – applied in all other areas. One aspect you could embrace – even in games is focus on the state. Several apps have very common base – the mathematical matrix or in programming terms – two dimensional array (2D).

Tic Tac Toe

Color Balloons

  1. The Tic tac toe is 3×3 2D array.
  2. Each cell has state – empty, player 1 mark or player 2 mark.
  3. The behavior is – players can only mark new – empty cells, with the goal of archiving a full line – horizontal, vertical or diagonal.

Snake

Snake Nokia

The snake game is famous from the Nokia 3210 feature phones. (The image is from this source: https://community.phones.nokia.com/discussion/44549/snake-through-the-ages. The current use of the image is non-commercial. If paid version is made, the image will be replaced)

  1. The number of cells in width & height is not fixed, especially in modern versions with bigger screens.
  2. Every cell is either – empty, apple or part of the snake. In some variations there could be walls – cells that the snake cannot go through (end dies if it hits them).
  3. There are several variations in terms of behavior.
    1. In some implementation the snake moves only in one direction while in other, the direction may switch between the head and the tail.
    2. In some versions the snake cannot go through the wall, while in others – it may.
    3. The snake may be capable to go over itself, but in other versions – it bytes itself and the game ends
    4. The goal is to fill the screen and have full snake (with most apples)

Snake with ladder

There are some extensions of the snake game where – between two cells the snake could go over the matrix. In terms of software state – it is a map of matrix cells (or two points from the coordinating system), that are linked to each other.

Tetris

Tetris

  1. The number of cells in width & height is not fixed, especially in modern versions with bigger screens.
  2. Every cell is either empty or occupied. In some versions of Tetris the cells may be colored, but in most cases it does not matter.
  3. New filled cells come from the top-center. They are in all variations of group of four and you could rotate them or speed them down. The movement of the new items are from top to bottom and the goal is to fill up a roll that disappears when completed. If the new group cannot appear – the game ends. The game speed usually increases when you archive more points.

Color Balloons

Color Balloons

It is a variation, a little bit opposite  of Tetris. The game starts board full of cells and new bubbles appear wherever there are missing, or if the rules of the game are such – until there are no more.

  1. The number of cells in width & height is not fixed, especially in modern versions with bigger screens.
  2. Every cell is usually occupied with balloon of some color and maybe at the end of a level – empty at the end. The player could mark a non-empty cell as selected for future movement.
  3. A cell could be moved only to the nearest – direct neighbors. The goal is to group together three or more balloons with the same color so they could pop (disappear).

Minefield/Minesweeper

Minesweeper

  1. The number of cells in horizontal and vertical direction depends on the level of difficulty selected.
  2. Every cell is either not-opened, empty, empty with a number and a marked as mined. The possible number are from 1 to 8 – the quantity of mines closer.
  3. The player could click only on non-opened fields and the goal is to mark all mines as mine. If a mined cell is opened – the game ends.

Pacman

Pacman is a retro game with the goal to collect all “apples” or dots, and escape being eaten by the monsters.

Packman

  1. The number of cells is depending on the difficulty level and probably also on the screen size.
  2. Every cell is empty, an apple, a wall that the player cannot go through, the player unit and the enemies.
  3. The player may go in the directions up, down, left, right and he may not go through walls. He must eat all apples before getting caught by the monsters.

Go (Game)

https://en.wikipedia.org/wiki/Go_(game)

  1. The number of cells in Go is usually 19×19 – 361, but for beginner players it could be less – 9×9 or 13×13.
  2. The cells are empty, a stone from player A or player B
  3. “Once placed on the board, stones may not be moved, but stones are removed from the board if the stone (or group of stones) is surrounded by opposing stones on all orthogonally-adjacent points, in which case the stone is captured.[4] The game proceeds until neither player wishes to make another move. When a game concludes, the winner is determined by counting each player’s surrounded territory along with captured stones and komi (points added to the score of the player with the white stones as compensation for playing second).[5] Games may also be terminated by resignation.”

Go Game

Chess

blank

  1. The cells of the classical chess game is fixed 0 8×8 matrix. They are black and white in consequential order.
  2. Every cell is empty or occupied by a pieces from some of the players. The pieces variations – besides player are 6 – king, queen, bishop, pawn, rook, knight.
  3. Every piece has its own rules of movement. Each player could “kill” the other player’s pieces except the king. He must be forced in cell that he is under attack and also not having where to move without being in attacking position.

Кирпич

blank

  1. The number of cells in the matrix in Kirpich also could be variable.
  2. There is a plate on the bottom that the user moves horizontally, empty cells, there are destroyable cells and walls. Some variations may come – like cells needing multiple hits or exploding – destroying the neighbor.
  3. Usually there is (at least) one ball that bounces between the cells, the edges (walls), the user-controlled plate. The goal is to direct the ball to the soft cells and clean the levels.

Rubik Cube

blank

  1. The Rubik Cube is not 2D, but 3D. But, if you expand the cube cells, it could be represented in 2D – with a little bit complicated rules of transitions between squares of 3x3x3 cells. There are cubes that are more difficult with 4x4x4, 5x5x5 and more squares.
  2. The state is some of the 6 colors.
  3. The player could move a layer from the cube only in parallel direction – in any of the 3 perspectives – width, height, depth. The goal is to make all sides with the same cell colors.

Source images of this article: https://pixabay.com/

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (87)
    • Flutter Apps (26)
    • GPT (4)
    • Java (39)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (36)
    • Utils (15)
    • Vaadin 24+ (28)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Post Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)