From 21996aff63afb338c07477aae0b7f93042b88f06 Mon Sep 17 00:00:00 2001 From: Breezy <114720008+breezy-codes@users.noreply.github.com> Date: Sun, 3 Nov 2024 15:07:42 +1100 Subject: [PATCH 1/4] update README --- README.md | 170 ++++++++++++++++++++++++---------------- documentation/README.md | 132 +++++++++++++++++-------------- 2 files changed, 176 insertions(+), 126 deletions(-) diff --git a/README.md b/README.md index f0b988d..288015c 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,106 @@ +

+ +

+ # Below The Surface +**Below The Surface** is an action-adventure game developed using the SplashKit SDK. Dive deep into a thrilling, underwater world filled with challenges, enemies, and interactive elements. Designed for compatibility with the **Arcade Machine**, this game provides an engaging experience for one or two players. + +## Overview + +In **Below The Surface**, players navigate through underwater terrain, overcome obstacles, and engage in combat with various creatures. The game is designed to challenge both solo players and teams, with optimized controls for the Arcade Machine to ensure smooth gameplay. ## How to Install -- Install [Splashkit](https://www.splashkit.io) to your computer -- Enter command `git clone https://github.com/thoth-tech/arcade-games` to your terminal -- Enter command `cd arcade-games/games/BelowTheSurface` -- Enter command `skm g++ program.cpp -o game` -- Enter command `./game` to play - - - -> controls for arcade machine -### **Player 1** - -| Input | Description | -| --- | ----------- | -| Up Key or Left Alt| Jump | -| Left Key | Move Left | -| Right Key | Move Right | -| Down Key | Crouch | -| Left Crtl Key | Attack/Interact | - -### **Player 2** - -| Input | Description | -| --- | ----------- | -| R Key or S Key| Jump | -| D Key | Move Left | -| G Key | Move Right | -| F Key | Crouch | -| A Key | Attack/Interact | - -### **Other Buttons** - -| Input | Description | -| --- | ----------- | -| Enter / P Key | Pause | -| Enter / Left Ctrl Key | Selection | - - -#### Edited: - -- Enter command `skm g++ -O3 program.cpp -o game` for optimisations -- Reduced resolution on game and assets. -- Changed button placement and asset placement to better fit new resolution \ No newline at end of file +Follow these steps to download, build, and run **Below The Surface** on your computer: + +### Step 1: Install SplashKit + +Ensure you have the SplashKit SDK installed on your computer. You can download it from the [SplashKit website](https://www.splashkit.io/installation). + +### Step 2: Clone the Repository + +Open your terminal and clone the arcade-games repository, which includes **Below The Surface**: + +```bash +git clone https://github.com/thoth-tech/arcade-games +``` + +### Step 3: Navigate to the Game Directory + +Move into the game’s directory within the repository: + +```bash +cd arcade-games/games/BelowTheSurface +``` + +### Step 4: Build the Game + +Compile the game using SKM (SplashKit Manager) with the following command: + +```bash +skm g++ program.cpp -o game +``` + +For optimized performance, you can use the `-O3` flag for an optimized build: + +```bash +skm g++ -O3 program.cpp -o game +``` + +### Step 5: Play the Game + +Run the game by entering the following command: + +```bash +./game +``` + +## Controls + +The controls for **Below The Surface** have been adapted to work seamlessly with the Arcade Machine setup. Here are the mappings for each player: + +### Player 1 + +| Input | Action | +|----------------------|--------------------| +| Up Arrow / Left Alt | Jump | +| Left Arrow | Move Left | +| Right Arrow | Move Right | +| Down Arrow | Crouch | +| Left Ctrl | Attack/Interact | + +### Player 2 + +| Input | Action | +|----------------------|--------------------| +| R Key / S Key | Jump | +| D Key | Move Left | +| G Key | Move Right | +| F Key | Crouch | +| A Key | Attack/Interact | + +### Other Controls + +| Input | Action | +|---------------------|--------------------| +| Enter / P Key | Pause | +| Enter / Left Ctrl | Selection | + +## Game Features + +- **Multiplayer Support**: Play solo or team up with a friend in a two-player mode, with distinct control setups for each player. +- **Interactive Environment**: Explore underwater environments with obstacles, hidden treasures, and interactive objects. +- **Combat and Interactions**: Engage with various underwater creatures and interact with the environment to uncover new areas and items. + +## Optimizations & Modifications + +To ensure the game runs smoothly on the Arcade Machine, several adjustments and optimizations have been made: + +- **Optimized Build**: Use `skm g++ -O3 program.cpp -o game` for an optimized version, which improves performance by reducing execution time and memory usage. +- **Resolution Adjustments**: The game resolution and asset quality have been adjusted for compatibility with the Arcade Machine, ensuring smoother gameplay and faster load times. +- **Control Customization**: Controls have been reconfigured to align with the Arcade Machine’s setup, making gameplay intuitive for both single and dual-player modes. + +## Contributing + +We welcome contributions from the community to enhance and expand **Below The Surface**. If you have ideas for new features, improvements, or optimizations, feel free to submit a pull request or open an issue on the repository. diff --git a/documentation/README.md b/documentation/README.md index ba75d80..a45ad86 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -1,92 +1,110 @@ +# Below the Surface Documentation +Welcome to the development documentation for **Below the Surface**! This project is a collaborative effort to create an exceptional game for the **Arcade Machine**. This guide provides an overview of the core files, level management, and setup instructions to help you contribute effectively to the game. -# Below the Surface Documentation +--- -This is a collaborative effort to create an **exceptional game** to be implemented within the **Arcade Machine**. +## Project Structure +### Header Files -## Header Files +Below are the key header files you’ll encounter while developing **Below the Surface**: -Here are the following header files that you should be aware of while developing this game. +- **`player.h`**: Defines the `Player` class, along with its attributes, functions, and states. +- **`map.h`**: Manages game content display, including backgrounds and map elements. +- **`level.h`**: Responsible for scene management, such as level transitions and collision checks. +- **`enemy.h`**: Contains the enemy classes with their attributes and behaviors. +- **`behaviour.h`**: Manages AI behavior for different enemy types. +- **`block.h`**: Defines the behavior of individual blocks in the game. +- **`camera.h`**: Tracks the player’s movements across the level. +- **`cellsheet.h`**: Defines the cell structure used for game elements. +- **`collision.h`**: Handles collision detection and responses throughout the game. +- **`get_level.h`**: Loads and renders a level on the screen. +- **`hud.h`**: Manages the player’s HUD (Heads-Up Display) for displaying health, score, etc. +- **`screen.h`**: Handles rendering of the game on the screen. +- **`testing.h`**: Provides functions for testing various components during development. -**player.h** -Header file containing the player class, its attributes, functions, and states. +--- -**map.h** -Header file containing the necessary contents for the game to display when playing. +## Level Management -**level.h** -Header file responsible for scene management. Such as switching levels or checking collisions. +### Level Text Files -**enemy.h** -Header file containing enemy classes, its attributes and functions. +The **`levels`** folder contains text files that represent different game levels. Each file uses block IDs to define the layout of the levels, which can be created or edited in the **Level Editor**. -**behaviour.h** -Header file responsible for determining the AI behaviour of different enemy class. +**Important**: **Do not manually change the values inside these text files** to avoid unintended modifications. Use the Level Editor to create or edit levels instead. -**block.h** -Header file responsible for each of the block's behaviour. +### Testing a Level -**camera.h** -Header file responible for tracking the player around the level. +To test a custom level, run the following command in the terminal: -**cellsheet.h** -Header file responsible for the definition of cells. +#### Format -**collision.h** -Header file responsible for handling collisions throughout the level. +```bash +./test -l {number of layers} levels/{layer0.txt} levels/{layer1.txt} {level name} +``` -**get_level.h** -Header file responsible for grabbing a level from header files level to screen. +#### Example -**hud.h** -Header file responsible for the display of the player HUD. +```bash +./test -l 2 levels/layer0.txt levels/layer1.txt test +``` -**screen.h** -Header file responsible for displaying the game onto the screen. +### Loading a Level in the Level Editor -**testing.h** -Header file responsible for testing functions. - -## Level Text Files -Within folder **levels** there are text files filled with block id. These ids are the what represents the levels that you see within the game. And you can create one by using the level editor. Just make sure to add them in the folder once you've created it. **DO NOT CHANGE THE VALUES INSIDE THE TEXT FILES**. Otherwise, the levels will be modified. If you want to test out the level you have created, write the following code. +To edit an existing level, load it in the Level Editor with this command: -### Format -``` -./test -l {amount of layers} levels/{layer0.txt} levels/{layer1.txt} {name of the level} -``` +#### Format -### Example -``` -./test -l 2 file0.txt file1.txt test +```bash +./test -load {number of layers} levels/{layer0.txt} levels/{layer1.txt} ``` -## Loading Levels in Level Editor -If you want to edit an existing level. Drag the files of that level onto the level editor, compile, and write the following. +#### Example -### Format -``` -./test -load {amount of layers} {layer0.txt} {layer1.txt} +```bash +./test -load 1 levels/layer0.txt ``` -### Example -``` -./test -load 1 file0.txt -``` +Ensure you have the latest versions of both the game and the Level Editor for compatibility. -Keep in mind, to have both the latest versions of the game and the level editor. +--- -## Create files and folders -The file explorer is accessible using the button in left corner of the navigation bar. You can create a new file by clicking the **New file** button in the file explorer. You can also create folders by clicking the **New folder** button. +## Using the File Explorer -## Compiling the game and opening the .exe file -To compile the game, write the following prompt onto the terminal. Keep in mind to also have and set the directory of where you have the repo located in your system onto the terminal -``` +To manage files and folders, use the file explorer accessible from the left corner of the navigation bar in the development environment: + +- **Create New File**: Click **New File** to add a new file within the current directory. +- **Create New Folder**: Click **New Folder** to organize files within folders. + +--- + +## Compiling and Running the Game + +### Compiling the Game + +To compile the game, use the following command in your terminal. Ensure your terminal is in the correct directory where the repository is located. + +```bash skm clang++ -o test program.cpp ``` -Once compiled, run the .exe file by writing the following prompt onto the same terminal -``` + +### Running the Game + +Once compiled, you can run the game with the command: + +```bash ./test ``` +### Optimized Compilation + +For an optimized build, use the `-O3` flag to improve performance: + +```bash +skm clang++ -O3 -o test program.cpp +``` + +--- +This documentation should provide all the information you need to work on **Below the Surface**, from managing files and levels to compiling and running the game. If you have further questions or encounter issues, please refer to the README in the main repository or reach out to the project maintainers. From 38032b8ce0be474cf77b8ef939c3d3b66c561f23 Mon Sep 17 00:00:00 2001 From: Breezy <114720008+breezy-codes@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:17:02 +1100 Subject: [PATCH 2/4] update README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 288015c..2d9db09 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@

+![GitHub contributors](https://img.shields.io/github/contributors/thoth-tech/below-the-surface?label=Contributors&color=F5A623) +![GitHub issues](https://img.shields.io/github/issues/thoth-tech/below-the-surface?label=Issues&color=F5A623) +![GitHub pull requests](https://img.shields.io/github/issues-pr/thoth-tech/below-the-surface?label=Pull%20Requests&color=F5A623) +![Forks](https://img.shields.io/github/forks/thoth-tech/below-the-surface?label=Forks&color=F5A623) +![Stars](https://img.shields.io/github/stars/thoth-tech/below-the-surface?label=Stars&color=F5A623) + # Below The Surface **Below The Surface** is an action-adventure game developed using the SplashKit SDK. Dive deep into a thrilling, underwater world filled with challenges, enemies, and interactive elements. Designed for compatibility with the **Arcade Machine**, this game provides an engaging experience for one or two players. From 5be899b77a18d274c344da4933db94608b9a9a3d Mon Sep 17 00:00:00 2001 From: Breezy <114720008+breezy-codes@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:45:46 +1100 Subject: [PATCH 3/4] update README --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2d9db09..47f57c6 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,12 @@

-![GitHub contributors](https://img.shields.io/github/contributors/thoth-tech/below-the-surface?label=Contributors&color=F5A623) -![GitHub issues](https://img.shields.io/github/issues/thoth-tech/below-the-surface?label=Issues&color=F5A623) -![GitHub pull requests](https://img.shields.io/github/issues-pr/thoth-tech/below-the-surface?label=Pull%20Requests&color=F5A623) -![Forks](https://img.shields.io/github/forks/thoth-tech/below-the-surface?label=Forks&color=F5A623) -![Stars](https://img.shields.io/github/stars/thoth-tech/below-the-surface?label=Stars&color=F5A623) +[![GitHub contributors](https://img.shields.io/github/contributors/thoth-tech/below-the-surface?label=Contributors&color=F5A623)](https://github.com/thoth-tech/below-the-surface/graphs/contributors) +[![GitHub issues](https://img.shields.io/github/issues/thoth-tech/below-the-surface?label=Issues&color=F5A623)](https://github.com/thoth-tech/below-the-surface/issues) +[![GitHub pull requests](https://img.shields.io/github/issues-pr/thoth-tech/below-the-surface?label=Pull%20Requests&color=F5A623)](https://github.com/thoth-tech/below-the-surface/pulls) +[![Forks](https://img.shields.io/github/forks/thoth-tech/below-the-surface?label=Forks&color=F5A623)](https://github.com/thoth-tech/below-the-surface/network/members) +[![Stars](https://img.shields.io/github/stars/thoth-tech/below-the-surface?label=Stars&color=F5A623)](https://github.com/thoth-tech/below-the-surface/stargazers) + # Below The Surface @@ -34,7 +35,7 @@ git clone https://github.com/thoth-tech/arcade-games ### Step 3: Navigate to the Game Directory -Move into the game’s directory within the repository: +Move into the game's directory within the repository: ```bash cd arcade-games/games/BelowTheSurface @@ -105,7 +106,7 @@ To ensure the game runs smoothly on the Arcade Machine, several adjustments and - **Optimized Build**: Use `skm g++ -O3 program.cpp -o game` for an optimized version, which improves performance by reducing execution time and memory usage. - **Resolution Adjustments**: The game resolution and asset quality have been adjusted for compatibility with the Arcade Machine, ensuring smoother gameplay and faster load times. -- **Control Customization**: Controls have been reconfigured to align with the Arcade Machine’s setup, making gameplay intuitive for both single and dual-player modes. +- **Control Customization**: Controls have been reconfigured to align with the Arcade Machine's setup, making gameplay intuitive for both single and dual-player modes. ## Contributing From 3263d5664ba1bd9a0951e629708528da9ff73bb7 Mon Sep 17 00:00:00 2001 From: Breezy <114720008+breezy-codes@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:32:43 +1100 Subject: [PATCH 4/4] update README --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 47f57c6..fc90b9b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Below The Surface +

@@ -8,9 +10,6 @@ [![Forks](https://img.shields.io/github/forks/thoth-tech/below-the-surface?label=Forks&color=F5A623)](https://github.com/thoth-tech/below-the-surface/network/members) [![Stars](https://img.shields.io/github/stars/thoth-tech/below-the-surface?label=Stars&color=F5A623)](https://github.com/thoth-tech/below-the-surface/stargazers) - -# Below The Surface - **Below The Surface** is an action-adventure game developed using the SplashKit SDK. Dive deep into a thrilling, underwater world filled with challenges, enemies, and interactive elements. Designed for compatibility with the **Arcade Machine**, this game provides an engaging experience for one or two players. ## Overview