Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Markcosay authored Jul 26, 2024
2 parents 420d449 + 5bb8016 commit 1bd0570
Show file tree
Hide file tree
Showing 104 changed files with 4,036 additions and 91 deletions.
88 changes: 77 additions & 11 deletions .github/CONTRIBUTING_GUIDELINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,43 @@ in case you are stuck:

<br>

### Alternatively contribute using GitHub Desktop

1. **Open GitHub Desktop:**
Launch GitHub Desktop and log in to your GitHub account if you haven't already.

2. **Clone the Repository:**
- If you haven't cloned the GameZone repository yet, you can do so by clicking on the "File" menu and selecting "Clone Repository."
- Choose the GameZone repository from the list of repositories on GitHub and clone it to your local machine.

3. **Switch to the Correct Branch:**
- Ensure you are on the branch that you want to submit a pull request for.
- If you need to switch branches, you can do so by clicking on the "Current Branch" dropdown menu and selecting the desired branch.

4. **Make Changes:**
Make your changes to the code or files in the repository using your preferred code editor.

5. **Commit Changes:**
- In GitHub Desktop, you'll see a list of the files you've changed. Check the box next to each file you want to include in the commit.
- Enter a summary and description for your changes in the "Summary" and "Description" fields, respectively. Click the "Commit to <branch-name>" button to commit your changes to the local branch.

6. **Push Changes to GitHub:**
After committing your changes, click the "Push origin" button in the top right corner of GitHub Desktop to push your changes to your forked repository on GitHub.

7. **Create a Pull Request:**
- Go to the GitHub website and navigate to your fork of the GameZone repository.
- You should see a button to "Compare & pull request" between your fork and the original repository. Click on it.

8. **Review and Submit:**
- On the pull request page, review your changes and add any additional information, such as a title and description, that you want to include with your pull request.
- Once you're satisfied, click the "Create pull request" button to submit your pull request.

9. **Wait for Review:**
Your pull request will now be available for review by the project maintainers. They may provide feedback or ask for changes before merging your pull request into the main branch of the GameZone repository.

⭐️ Support the Project
If you find this project helpful, please consider giving it a star on GitHub! Your support helps to grow the project and reach more contributors.

## **Issue Report Process 📌**

1. Go to the project's issues.
Expand All @@ -40,29 +77,58 @@ in case you are stuck:
* Folder naming convention
- ```Game_Name``` ex. ```Tilting_Maze```,```Rock_Paper_Scissors``` (first letter should be capital and if you need space use underscore **_** )
* files in the folder
- Main html file should be named as **index.html** , not something else like ```Tilting_Maze.html```
- Main html file should be named as **index.html** , not something else like ```Tilting_Maze.html```(Preferred)
- Game files - ```index.html``` , ```script.js``` , ```style.css```(not stictly to follow this but you should have separate file for each kind)
- It is preferred if the main html file is directly added to the main folder of you game like ```Tilting_Maze/index.html``` along with other files like *style.css*, *script.js*
- It is preferred if the main html file is directly added to the main folder of you game like ```Tilting_Maze/index.html``` along with other files like **style.css**, **script.js**
- you can have other folders if you are having assets for your game
- Create```README.md``` for your Game using this [TEMPLATE](../Games/FOLDER_README_TEMPLATE.md).Although, it is not compulsory to follow this README template ,you can use your own *README* template whichever you prefer, to explain your Game
- Create```README.md``` for your Game using this [TEMPLATE](../Games/FOLDER_README_TEMPLATE.md).Although, it is not compulsory to follow this README template ,you can use your own *README* template whichever you prefer, to explain functionality and code of your Game
* naming convention for the screenshot you will add in ```assets/images```
- Remember preview image should be in ```assets/images``` and not in main folder of Game itself.
- name of image should be same as your game name
- ex. ```Tilting_Maze.jpeg``` or .jpg or .png any of the image format, but don't add image format in the name itself , it is self-assigned to a image,you don't need to add it manually, otherwise it becomes ```Tilting_Maze.jpeg.jpeg```
- There should be only one ScreenShot of the game in ```assets/images``` and that too with same name as the Game(Exactly Same).
- Name of image should be same as your Game name
- ex. ```Tilting_Maze.jpeg``` or .jpg or .png any of the image format, but don't add image format in the name itself , it is self-assigned to a image, you don't need to add it manually, otherwise it becomes ```Tilting_Maze.jpeg.jpeg```
- There should be only one ScreenShot of the game in ```assets/images``` and that too with same name as the Game (Exactly Same).
* Note:-All Other data except the ScreenShot of your Game, should be in it's main folder , don't add it to other folders of the project.

<br>

## Add Game to assets/js/gamesData.json

* This is to Show your game on the main Website
- Go to the end of gamesData.json and add :
- **,**
" **No.** ":{
"gameTitle" : " **Title** ",
"gameUrl": " **Main Folder** ",
"thumbnailUrl":" **Preview Image** "
}
- **No.**: Number for your Game , it should be the next number with respect to the file. eg: if the last no. in file at present is *625* you should put *626* at the place of **No.**
- **Title:** this is the title for your game that will be shown on the website, if your game name is ```Super_Mario_Game``` ,put Title as ```Super Mario Game```
- **Main Folder :** This is the reference to *index.html*
- if your index.html is directly in main game folder ,put the main folder name eg: ```Super_Mario_Game```
- if your index.html is in subfolder , give path to it
eg: ```Super_Mario_Game/public``` (assuming index.html is in public folder of Super_Mario_Game folder)
- if your main html file's name is not index.html , you need to specify the main html file also. eg:```Super_Mario_Game/mario.html``` or if in sub folder ```Super_Mario_Game/public/mario.html```
- **Preview Image:** This is the image that will be shown as preview for your game , here you provide the name of the image that you added to **assets/images** folder, along with format type. Eg. ```Super_Mario_Game.png``` or ```Super_Mario_Game.jpg``` or with any other format.

**Note:-**

- Do not modify anything else in the rest of the file, you only need to add your game in the end of the file.
- Don't forget to add the comma for new entry (already give in above sample but this is a reminder as one might miss it to see in the sample)


<br>

## **Pull Request Process 🚀**

1. Ensure that you have self reviewed your code 😀
2. Make sure you have added the proper description for the functionality of the code
3. You have added README file in your repository .
4. You have added the thumbnail of the project into ```assets/images``` for website preview
5. Add your game screenshot in the assets folder by following the proper conversion specified over here
6. You have added your game name and link in main README.md
7. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon 🚀
3. You have added README file in your Game folder.
4. You have added the thumbnail of the project/Game into ```assets/images``` for website preview
5. Added your game screenshot in the assets folder by following the proper conversion specified over here
6. You have added your game name and link in GameZone's README.md
7. You have Added your game to ```assets\js\gamesData.json```.
8. you have reviewed that your Game loads on the website with preview image and works when opened.
9. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon 🚀

<br>

Expand Down
5 changes: 3 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ Fixes # <your_issue_number>
- [ ] My changes generates no new warnings.
- [ ] I have followed proper naming convention showed in [CONTRIBUTING GUIDELINE](https://github.com/kunjgit/GameZone/blob/main/.github/CONTRIBUTING_GUIDELINE.md)
- [ ] I have added screenshot for website preview in assets/images
- [ ] I have added entries for my game in main README.md
- [ ] I have added README.md in my folder
- [ ] I have added entries for my game in GameZone's README.md
- [ ] I have added README.md in my Game folder
- [ ] I have added working video of the game in README.md (optional)
- [ ] I have specified the respective issue number for which I have requested the new game.
- [ ] I have added my Game to gamesData.json file and it is loading properly on main website as intended.


<hr>
Expand Down
33 changes: 20 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,21 @@ If you find this project helpful, please consider giving it a star on GitHub! Yo
<br>

## **File naming conventions 📁**
- Give unique name for your game that is not already existed
- Give unique name for your game that don't exist already.
* Folder naming convention
- ```Game_Name``` ex. ```Tilting_Maze``` (first letter should be capital and if you need space use _ )
- ```Game_Name``` ex. ```Tilting_Maze```,```Rock_Paper_Scissors``` (first letter should be capital and if you need space use underscore **_** )
* files in the folder
- ```index.html``` , ```script.js``` , ```style.css```(not stictly to follow this but you should have separate )
- Main html file should be named as **index.html** , not something else like ```Tilting_Maze.html```(Preferred)
- Game files - ```index.html``` , ```script.js``` , ```style.css```(not stictly to follow this but you should have separate file for each kind)
- It is preferred if the main html file is directly added to the main folder of you game like ```Tilting_Maze/index.html``` along with other files like **style.css**, **script.js**
- you can have other folders if you are having assets for your game
- ```README.md``` for your folder using template [TEMPLATE](../Games/FOLDER_README_TEMPLATE.md)
- It is not compulsory to follow this README template only you can have your own
- Create```README.md``` for your Game using this [TEMPLATE](../Games/FOLDER_README_TEMPLATE.md).Although, it is not compulsory to follow this README template ,you can use your own *README* template whichever you prefer, to explain functionality and code of your Game
* naming convention for the screenshot you will add in ```assets/images```
- name of image should be same as your game name
- ex. ```Tilting_Maze.jpeg``` or .jpg or .png any of the image formate
- Remember preview image should be in ```assets/images``` and not in main folder of Game itself.
- Name of image should be same as your Game name
- ex. ```Tilting_Maze.jpeg``` or .jpg or .png any of the image format, but don't add image format in the name itself , it is self-assigned to a image, you don't need to add it manually, otherwise it becomes ```Tilting_Maze.jpeg.jpeg```
- There should be only one ScreenShot of the game in ```assets/images``` and that too with same name as the Game (Exactly Same).
* Note:-All Other data except the ScreenShot of your Game, should be in it's main folder , don't add it to other folders of the project.

<br>

Expand All @@ -98,7 +102,7 @@ If you find this project helpful, please consider giving it a star on GitHub! Yo
"gameUrl": " **Main Folder** ",
"thumbnailUrl":" **Preview Image** "
}
- **No.**: Number for your Game , it should be the next number with respect to the file. eg: it the last no. in file at present is *625* you should put *626* at the place of **No.**
- **No.**: Number for your Game , it should be the next number with respect to the file. eg: if the last no. in file at present is *625* you should put *626* at the place of **No.**
- **Title:** this is the title for your game that will be shown on the website, if your game name is ```Super_Mario_Game``` ,put Title as ```Super Mario Game```
- **Main Folder :** This is the reference to *index.html*
- if your index.html is directly in main game folder ,put the main folder name eg: ```Super_Mario_Game```
Expand All @@ -111,15 +115,18 @@ If you find this project helpful, please consider giving it a star on GitHub! Yo

- Do not modify anything else in the rest of the file, you only need to add your game in the end of the file.
- Don't forget to add the comma for new entry (already give in above sample but this is a reminder as one might miss it to see in the sample)
<br>
## **Pull Request Process 🚀**

1. Ensure that you have self reviewed your code 😀
2. Make sure you have added the proper description for the functionality of the code
3. You have added README file in your repository .
4. You have added the thumbnail of the project into ```assets/images``` for website preview
5. Add your game screenshot in the assets folder by following the proper conversion specified over here
6. You have added your game name and link in main README.md
7. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon 🚀
3. You have added README file in your Game folder.
4. You have added the thumbnail of the project/Game into ```assets/images``` for website preview
5. Added your game screenshot in the assets folder by following the proper conversion specified over here
6. You have added your game name and link in GameZone's README.md
7. You have Added your game to ```assets\js\gamesData.json```.
8. you have reviewed that your Game loads on the website with preview image and works when opened.
9. Submit your PR by giving the necesarry information in PR template and hang tight we will review it really soon 🚀

<br>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions Games/Boom_Blast/asset/images/desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[LocalizedFileNames]
Screenshot 2024-07-23 101337.png=@Screenshot 2024-07-23 101337,0
Screenshot 2024-07-23 101316.png=@Screenshot 2024-07-23 101316,0
Screenshot 2024-07-23 101249.png=@Screenshot 2024-07-23 101249,0
Screenshot 2024-07-23 101237.png=@Screenshot 2024-07-23 101237,0
27 changes: 27 additions & 0 deletions Games/Boom_Blast/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BOOM BLAST</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="game-title">BOOM BLAST</div>
<div id="score">Score: 0</div>
<div id="timer">Time: 30s</div>
<div id="game-area">
<div id="game-over"></div>
</div>
<div id="controls">
<button id="start-button">Start Game</button>
<select id="time-select">
<option value="30">30 seconds</option>
<option value="60">60 seconds</option>
<option value="90">90 seconds</option>
<option value="120">120 seconds</option>
</select>
</div>
<script src="script.js"></script>
</body>
</html>
62 changes: 62 additions & 0 deletions Games/Boom_Blast/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# BOOM BLAST

BOOM BLAST is a fun and colorful browser-based game where players click on balloons to score points before time runs out.

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [How to Play](#how-to-play)
- [Game Mechanics](#game-mechanics)
- [Customization](#customization)
- [Technologies Used](#technologies-used)

## Features

- Vibrant, dynamic background
- Colorful balloons with gradient effects
- Customizable game duration
- Real-time score and timer display
- Responsive design

## Installation

1. Clone this repository .
```bash
clone git https://github.com/kunjgit/GameZone/tree/main/Games/Boom_Blast
```
2. Open the `index.html` file in a web browser to start the game.

## How to Play

1. Open the game in a web browser.
2. Select the desired game duration from the dropdown menu.
3. Click the "Start Game" button to begin.
4. Click on the balloons as they appear to score points.
5. Try to click as many balloons as possible before time runs out.
6. When the game ends, your final score will be displayed.
7. Click "Start Game" again to play another round.

## Game Mechanics

- Balloons appear randomly within the game area every second.
- Each balloon has a random size and color gradient.
- Clicking a balloon adds 1 point to your score and removes the balloon.
- Balloons automatically disappear after 2 seconds if not clicked.
- The game ends when the timer reaches zero.

## Customization

You can customize the game by modifying the following:

- Game duration options in the HTML file
- Colors and animations in the CSS file
- Balloon spawn rate and game logic in the JavaScript file

## Technologies Used

- HTML5
- CSS3
- JavaScript (ES6+)

Feel free to fork this project and customize it to your liking. Enjoy playing BOOM BLAST!
98 changes: 98 additions & 0 deletions Games/Boom_Blast/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
const gameArea = document.getElementById('game-area');
const startButton = document.getElementById('start-button');
const scoreElement = document.getElementById('score');
const timerElement = document.getElementById('timer');
const gameOverElement = document.getElementById('game-over');
const timeSelect = document.getElementById('time-select');

let score = 0;
let timeLeft = 30;
let gameInterval;
let balloonInterval;

startButton.addEventListener('click', startGame);

function startGame() {
score = 0;
timeLeft = parseInt(timeSelect.value);
updateScore();
updateTimer();
startButton.disabled = true;
timeSelect.disabled = true;
gameOverElement.style.display = 'none';
clearInterval(gameInterval);
clearInterval(balloonInterval);

gameInterval = setInterval(() => {
timeLeft--;
updateTimer();
if (timeLeft <= 0) {
endGame();
}
}, 1000);

balloonInterval = setInterval(createBalloon, 1000);
}

function createBalloon() {
const balloon = document.createElement('div');
balloon.classList.add('balloon');
const size = Math.random() * 50 + 20;
const colors = getRandomGradient();

balloon.style.width = `${size}px`;
balloon.style.height = `${size}px`;
balloon.style.background = colors;
balloon.style.left = `${Math.random() * (gameArea.clientWidth - size)}px`;
balloon.style.top = `${Math.random() * (gameArea.clientHeight - size)}px`;

balloon.addEventListener('click', () => {
score++;
updateScore();
gameArea.removeChild(balloon);
});

gameArea.appendChild(balloon);

setTimeout(() => {
if (gameArea.contains(balloon)) {
gameArea.removeChild(balloon);
}
}, 2000);
}

function getRandomGradient() {
const color1 = getRandomColor();
const color2 = getRandomColor();
return `radial-gradient(circle, ${color1}, ${color2})`;
}

function getRandomColor() {
const letters = '0123456789ABCDEF';
let color = '#';
for (let i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}

function updateScore() {
scoreElement.textContent = `Score: ${score}`;
}

function updateTimer() {
timerElement.textContent = `Time: ${timeLeft}s`;
}

function endGame() {
clearInterval(gameInterval);
clearInterval(balloonInterval);
gameOverElement.textContent = `Game Over! Final Score: ${score}`;
gameOverElement.style.display = 'block';
startButton.disabled = false;
timeSelect.disabled = false;
while (gameArea.firstChild) {
gameArea.removeChild(gameArea.firstChild);
}
gameArea.appendChild(gameOverElement);
}
Loading

0 comments on commit 1bd0570

Please sign in to comment.