Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kunjgit authored Aug 8, 2024
2 parents 9ad3286 + 654ae3c commit 14a1567
Show file tree
Hide file tree
Showing 574 changed files with 50,894 additions and 3,483 deletions.
56 changes: 33 additions & 23 deletions .github/CONTRIBUTING_GUIDELINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,41 @@ If you find this project helpful, please consider giving it a star on GitHub! Yo
* 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)
## Add Game to `assets/js/gamesData.json`

*This guide will help you add your game to the main website.*

1. **Locate `gamesData.json`:** Go to the end of the `gamesData.json` file.

2. **Add Your Game Data:** Append the following JSON entry at the end of the file:
```json
,
"No.": {
"gameTitle": "Title",
"gameUrl": "Main Folder",
"thumbnailUrl": "Preview Image"
}
```

- **No.:** Replace `No.` with the next number in sequence. For example, if the last number in the file is `625`, use `626` for your game.

- **Title:** Replace `"Title"` with the title of your game as it should appear on the website. For example, if your game is named `Super_Mario_Game`, use `"Super Mario Game"`.

- **Main Folder:** Replace `"Main Folder"` with the path to your game's main HTML file. If `index.html` is directly in the game's folder, use the folder name (e.g., `"Super_Mario_Game"`). If `index.html` is in a subfolder, specify the path (e.g., `"Super_Mario_Game/public"`). If your main HTML file is not named `index.html`, include the file name (e.g., `"Super_Mario_Game/mario.html"` or `"Super_Mario_Game/public/mario.html"`).

- **Preview Image:** Replace `"Preview Image"` with the name of the image you added to the `assets/images` folder, including the file format. For example, `"Super_Mario_Game.png"` or `"Super_Mario_Game.jpg"`.

3. **Important Notes:**
- **Comma Placement:** Ensure you add a comma before your new entry. This is crucial to maintain valid JSON format. The provided sample includes the comma, but make sure you don’t forget it.
- **Trailing Comma:** JSON does not allow trailing commas. Do not add a comma after the last entry. Ensure your new game entry is added before the final closing curly brace of the file.
- **File Integrity:** Do not modify any other part of the file. Only add your game entry at the end.

4. **Check if Game Load**
- **Open index.html:** After you have added your game to the gamesData.json open index.html of GameZone
- **Go To last Page:** Go to the Last page and check if your game is loading along with preview image and when opened ,works properly.
---

<br>

Expand Down
57 changes: 34 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,42 @@ If you find this project helpful, please consider giving it a star on GitHub! Yo
* 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 guide will help you add your game to the main website.*

1. **Locate `gamesData.json`:** Go to the end of the `gamesData.json` file.

2. **Add Your Game Data:** Append the following JSON entry at the end of the file:
```json
,
"No.": {
"gameTitle": "Title",
"gameUrl": "Main Folder",
"thumbnailUrl": "Preview Image"
}
```

- **No.:** Replace `No.` with the next number in sequence. For example, if the last number in the file is `625`, use `626` for your game.

- **Title:** Replace `"Title"` with the title of your game as it should appear on the website. For example, if your game is named `Super_Mario_Game`, use `"Super Mario Game"`.

- **Main Folder:** Replace `"Main Folder"` with the path to your game's main HTML file. If `index.html` is directly in the game's folder, use the folder name (e.g., `"Super_Mario_Game"`). If `index.html` is in a subfolder, specify the path (e.g., `"Super_Mario_Game/public"`). If your main HTML file is not named `index.html`, include the file name (e.g., `"Super_Mario_Game/mario.html"` or `"Super_Mario_Game/public/mario.html"`).

- **Preview Image:** Replace `"Preview Image"` with the name of the image you added to the `assets/images` folder, including the file format. For example, `"Super_Mario_Game.png"` or `"Super_Mario_Game.jpg"`.

3. **Important Notes:**
- **Comma Placement:** Ensure you add a comma before your new entry. This is crucial to maintain valid JSON format. The provided sample includes the comma, but make sure you don’t forget it.
- **Trailing Comma:** JSON does not allow trailing commas. Do not add a comma after the last entry. Ensure your new game entry is added before the final closing curly brace of the file.
- **File Integrity:** Do not modify any other part of the file. Only add your game entry at the end.

4. **Check if Game Load**
- **Open index.html:** After you have added your game to the gamesData.json open index.html of GameZone
- **Go To last Page:** Go to the Last page and check if your game is loading along with preview image and when opened ,works properly.
---

## 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 🚀**

Expand Down
1 change: 1 addition & 0 deletions Games/2D_Fighting_game/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 2D Fighting Game
Binary file added Games/2D_Fighting_game/img/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Attack1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Attack2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Death.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Fall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Idle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Jump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/kenji/Take hit.png
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.
Binary file added Games/2D_Fighting_game/img/samuraiMack/Death.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/samuraiMack/Fall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/samuraiMack/Idle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/samuraiMack/Jump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/2D_Fighting_game/img/samuraiMack/Run.png
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.
Binary file added Games/2D_Fighting_game/img/shop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 124 additions & 0 deletions Games/2D_Fighting_game/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<style>
* {
box-sizing: border-box;
font-family: 'Press Start 2P', cursive;
}
</style>
</head>
<body>
<!-- red container div -->
<div style="position: relative; display: inline-block">
<!-- smaller red container div -->
<div
style="
position: absolute;
display: flex;
width: 100%;
align-items: center;
padding: 20px;
"
>
<!-- player health -->
<div
style="
position: relative;
width: 100%;
display: flex;
justify-content: flex-end;
border-top: 4px solid white;
border-left: 4px solid white;
border-bottom: 4px solid white;
"
>
<div style="background-color: red; height: 30px; width: 100%"></div>
<div
id="playerHealth"
style="
position: absolute;
background: #818cf8;
top: 0;
right: 0;
bottom: 0;
width: 100%;
"
></div>
</div>

<!-- timer -->
<div
id="timer"
style="
background-color: black;
width: 100px;
height: 50px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
border: 4px solid white;
"
>
10
</div>
<!-- enemy health -->
<div
style="
position: relative;
width: 100%;
border-top: 4px solid white;
border-bottom: 4px solid white;
border-right: 4px solid white;
"
>
<div style="background-color: red; height: 30px"></div>
<div
id="enemyHealth"
style="
position: absolute;
background: #818cf8;
top: 0;
right: 0;
bottom: 0;
left: 0;
"
></div>
</div>
<div></div>
</div>
<div
id="displayText"
style="
position: absolute;
color: white;
align-items: center;
justify-content: center;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
"
>
Tie
</div>
<canvas></canvas>
</div>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.9.1/gsap.min.js"
integrity="sha512-H6cPm97FAsgIKmlBA4s774vqoN24V5gSQL4yBTDOY2su2DeXZVhQPxFK4P6GPdnZqM9fg1G3cMv5wD7e6cFLZQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script src="js/utils.js"></script>
<script src="js/classes.js"></script>
<script src="index.js"></script>
</body>
Loading

0 comments on commit 14a1567

Please sign in to comment.