|
1 |
| -# unity-junior-prototype-5 |
| 1 | +# unity-junior-user-interfaces-prototype-5 |
| 2 | + |
| 3 | +## Screenshots |
| 4 | + |
| 5 | +https://github.com/user-attachments/assets/8d31cd72-c651-43f0-bde8-66cc16106b22 |
| 6 | + |
| 7 | +## Table of Contents |
| 8 | +1. [Description](#description) |
| 9 | +2. [Installation](#installation) |
| 10 | +3. [Run](#run) |
| 11 | +4. [Credits](#credits) |
| 12 | +5. [Contributing](#contributing) |
| 13 | +6. [License](#license) |
| 14 | + |
| 15 | +## Description |
| 16 | + |
| 17 | +This prototype is part of the Junior Programmer Pathway from Unity Learn. Its purpose is to teach the fundamentals of gameplay mechanics through scripting in C#. |
| 18 | +Each prototype includes: |
| 19 | +- A Learning section that guides you through building core features step by step. |
| 20 | +- A Challenge section where you're given a broken or incomplete project to fix and extend, testing your understanding and problem-solving skills. |
| 21 | + |
| 22 | +### Purpose |
| 23 | + |
| 24 | +The objective of this prototype is to create two simple games: |
| 25 | + |
| 26 | +- **Crates Ninja** : Slash crates with your mouse as they fly across the screen—but watch out for the skulls! Hitting one will cost you. |
| 27 | +- **Whack-a-Food** : Click on the food items as quickly as possible as they pop up! The faster you are, the higher your score. |
| 28 | + |
| 29 | +#### Bonus Features (Crates Ninja) : |
| 30 | + |
| 31 | +- Create a "Lives" UI element that counts down by 1 when an object leaves the bottom of the screen and triggers Game Over when Lives reaches 0. |
| 32 | +- Add background music and a UI Slider element to adjust the volume. |
| 33 | +- During gameplay, allow the user to press a key to toggle between pausing and resuming the game, where a pause screen comes up while the game is paused. |
| 34 | +- Program click-and-swipe functionality instead of clicking, generating a trail where the mouse has been dragged. This does make the game easier, so you might also want to increase the gameplay difficulty on all levels if you implement this. |
| 35 | + |
| 36 | +#### Fixing problems (Whack-a-Food) : |
| 37 | + |
| 38 | +- The difficulty buttons look messy -> Center the text on the buttons horizontally and vertically. |
| 39 | +- The food is being destroyed too soon -> The food should only be destroyed when the player clicks on it, not when the mouse touches it. |
| 40 | +- The Score is being replaced by the word “score” -> It should always say, “Score: __“ with the value displayed after “Score:”. |
| 41 | +- When you lose, there’s no way to Restart -> Make the Restart button appear on the game over screen. |
| 42 | +- The difficulty buttons don’t change the difficulty -> The spawnRate is always way too fast. When you click Easy, the spawnRate should be slower - if you click Hard, the spawnRate should be faster. |
| 43 | +- The game can go on forever -> Add a “Time: __” display that counts down from 60 in whole numbers (i.e. 59, 58, 57, etc) and triggers the game over sequence when it reaches 0. |
| 44 | + |
| 45 | +## Controls |
| 46 | + |
| 47 | +**Crates Ninja** |
| 48 | +| **Key** | **Action** | |
| 49 | +|:-------:|---------------| |
| 50 | +| `Escape`| Pause the Game| |
| 51 | +| `Q` |Quit the game | |
| 52 | + |
| 53 | +Click and drag your mouse to slash through the crates. |
| 54 | + |
| 55 | +**Whack-a-Food** |
| 56 | +| **Key** | **Action** | |
| 57 | +|:-------:|---------------| |
| 58 | +| `Q` |Quit the game | |
| 59 | + |
| 60 | +Simply click on the food items as they appear. |
| 61 | + |
| 62 | +### Technologies used |
| 63 | + |
| 64 | +- **Unity** – Version 6000.0.47f1 |
| 65 | +- **C#** – Used for gameplay scripting |
| 66 | + |
| 67 | +### Challenges and Future Features |
| 68 | + |
| 69 | +One of the biggest challenges in this project was implementing the slashing trail effect in Crates Ninja. I discovered Unity's Trail Renderer, which was a great help. The next step was figuring out how to accurately track the mouse's start and end positions in order to draw the trail effectively. |
| 70 | + |
| 71 | +Another key step was converting the screen position of the mouse to world coordinates. |
| 72 | + |
| 73 | +## Installation |
| 74 | + |
| 75 | +You can download pre-built releases for your supported operating system from the GitHub Releases page. Available builds include: |
| 76 | +- macOS |
| 77 | +- Windows |
| 78 | +- Linux |
| 79 | + |
| 80 | +## Run |
| 81 | + |
| 82 | +To run the program, simply double-click the executable file for your operating system. |
| 83 | + |
| 84 | +### MacOS |
| 85 | + |
| 86 | +Unzip and open the .app file. |
| 87 | + |
| 88 | +### Windows |
| 89 | + |
| 90 | +Unzip and double-click the .exe file. |
| 91 | + |
| 92 | +### Linux |
| 93 | + |
| 94 | +```bash |
| 95 | +chmod +x Prototype_5_Linux.x86_64 |
| 96 | +./Prototype_5_Linux.x86_64 |
| 97 | +``` |
| 98 | + |
| 99 | +### Web |
| 100 | + |
| 101 | +Play on [browser](https://vpekdas.github.io/unity-junior-user-interfaces-prototype-5) |
| 102 | + |
| 103 | +## Credits |
| 104 | + |
| 105 | +This project is based on the Unity **Junior Programmer Pathway** by Unity Learn. |
| 106 | +Many thanks to the instructors for their excellent step-by-step video tutorials and guidance. |
| 107 | + |
| 108 | +## Contributing |
| 109 | + |
| 110 | +To report issues, please create an issue here: [issue tracker](https://github.com/Vpekdas/unity-junior-user-interfaces-prototype-5/issues). |
| 111 | + |
| 112 | +If you'd like to contribute, please follow the steps outlined in [CONTRIBUTING.md](CONTRIBUTING.md). |
| 113 | + |
| 114 | +## License |
| 115 | + |
| 116 | +This project is licensed under the [MIT License](LICENSE). |
0 commit comments