Skip to content

Architecture

David Keen edited this page Nov 28, 2022 · 15 revisions

Frameworks and Libraries

The code will written in Python mainly utilizing the PyGame Engine. In addition, work will be done utilizing JSON files for data managament between uses of the application. The following python libraries will be used in addition to Python 3.10 (Current Most Up to Date 10/13/20222). All code will be written using Pep8 Notation Link.

Python Libraries

  • PyGame (Main Game Engine and Graphics Support)
  • Time (Management\ of Time in Game for motion)
  • Random(Management of Randomness in game)
  • PyGame_Menu (Main Screen and Menu Functionality for the game)
  • datetime (Access to dates for data storage and logs)
  • json (Ability to write to multiple JSON files to help support maintainable gameplay)
  • os (Backened management with the device for game operation)

Graphics

  • Graphics will be made in Adobe Illustrator

Build Procedure:

Code will be built using the following command utilizing PyInstaller to make a single file executable app

python -m PyInstaller --onefile <<FileName>>.py

Model

UML

There will be a game menu class for use in all non-gameplay screens, a gameplay class, a player class, a class for each enemy type, and a level class. The gameplay class will have a main run loop that will handle all interactions, such as player input, collisions, and point handling. It will also be responsible for blitting the correct images and information onto the screen. The other classes will hold their own information to be easily accessed and tracked, and be able to perform calculations and functions on their own data.

Front End

FrontEndViews FrontEndSprites

Made UML for Front End Specific version of players, enemies, and gameplay screens that will be merged at a later date. Front End attributes/designations can be directly outlined from UML diagram.

Maintain State

The app will have a maintained state using 5 JSON files for reading and 4 for writing to (Default not written to)

Files

HighScore.json

Will hold the top 10 high scores and be written over if new scores are added. Will hold them in top to bottom order with name, score, date time.

UserSetting.json

Will hold all of the user settings including ones that are still the same as default

DefaultSetting.json

A read only file that holds the games default settings in it

GameStat.json

Will be updated after every game with new stats to be displayed on the game stat screen

CurrencyShop.json

Will hold all of the users purchases and currency balance for upgrades and things of that nature

Views and Description

When you load up the game the following menu will show up to allow for the control of where to go. This is the main menu screen and is the hub for the game. In the backend, data is loaded into the game to create a maintained state. 194784089-33de0ce1-dbe2-41ea-9a1c-f1fb3161ab4f

Starting in the top left you can navigate to the stastics page to see all of your statistics 194720637-0a77c4e9-6a92-4f5d-bfd5-7bd957a518a9

Back on the home menu, you can go to the store/customization menu. In the game play you can collect coins and those coins can be used to upgrade the style of your character through accessories like skins, hats, trails, and backgrounds which are all purchased and set in the shop. 194771086-c776d5b4-2e19-4e00-b976-4d4e931b3eb8

You can also go to the settings page and set the below settings, also allowing you to export and import settings between different game instances 194772149-d596c655-c76e-4b97-80b5-6f671212a76e

You can also access the high score board to see the local high score for the local device, with various sounds and effects when you get a new high score. 194720378-1fb5197d-1d1c-4306-8699-8e5608c12a32

Going into the game play, the main purpose of the game is to navigate a free gravity duck through space avoiding various walls, obstacles, and enemies. The duck has the ability to shoot at enemies as well which are all one hit to kill. There will be one to many different enemies that will get progressively harder as the game progresses. You can also collect coins as you move through the screens. You move towards the right and there is no backtracking, so once the frame shifts you can not go back. 194433081-1d8b89d2-04a5-487c-ac9a-e4ad723a627e

You can also pause the game by clicking space. 194720255-489f5551-1ef4-4c12-8cb9-8a6701dd68c6

Once the game is over, there is also a game over screen to allow for sharing or new games or replays. 194434685-5270a1b7-2daf-4b0a-b389-315ca429b6b6

Assigning Roles

All Issues Have Been assigned, below is an overview of tasks and who will do them (broadly)

  • Game Build to Executable (Bradley)
  • JSON/Backend Management (Bradley)
  • Menu and Nav Controls (Xzavian)
  • GamePlay Controls (Owen)
  • GamePlay Display Features/Coins (David)
  • ShopControls (Colin)
  • In Game Pause (Bradley)
  • Game Over Screen (Colin)
  • Settings (David)