A simple and fun fish-catching game!
This project is a basic 2D game developed using the Java programming language, where players try to catch as many fish as possible. "Catch The Fish" demands quick reflexes and strategy, offering an enjoyable experience with its user-friendly interface and core gameplay mechanics.
-Simple Gameplay: Basic mechanics controlled by mouse or keyboard.
-Diverse Objects: Catchable fish and harmful objects to avoid (e.g., old shoe, leaf).
-Sound Effects: Simple in-game sounds that enhance interaction.
Setting up and running this project on your local machine is quite straightforward.
Java Development Kit (JDK) 8 or newer: Required to compile and run the project.
Clone the Repository: First, download the project's source code to your computer. Open your terminal (Mac/Linux) or Command Prompt/PowerShell (Windows) and run the following command:
git clone https://github.com/ItsMerad/Catch_The_Fish.gitNavigate to the Project Folder: Change your current directory to the main project folder you just cloned:
cd Catch_The_FishRun the Game: The project is packaged as a .jar file and can be run directly.
java -jar CatchTheFish.jar
If CatchTheFish.jar is not found, you might need to check inside the out/Catch_The_Fish/ directory or follow the build steps through NetBeans IDE.
This project was primarily developed using the following tools:
- Java
- VS Code
- Git
The main directory structure of the project is as follows:
Catch_The_Fish/
├── .DS_Store # macOS-specific hidden files (recommended not to include in Git)
├── CatchTheFish.jar # Executable game file
├── Catch_The_Fish.bat # Windows batch script for running the game
├── build.xml # Ant build file (generated by NetBeans)
├── manifest.txt # Manifest information for the JAR file
├── nbproject/ # NetBeans project settings and metadata
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── project.properties
│ └── project.xml
├── out/ # Compiled Java .class files and potentially the JAR
│ └── Catch_The_Fish/
│ ├── CatchableItem.class
│ ├── Game.class
│ └── ... (other compiled .class files)
└── src/ # Main source code and assets of the project
└── Catch_The_Fish/
└── Catch_The_Fish/ # The main source folder for your game
├── Bar.png
├── CatchableItem.java
├── Game.java
├── GameGUI.java
├── HugeFish.png
├── JavaApplication1.java
├── Leaf.png
├── Logo.jpg
├── Music.wav
├── MusicPlayer.java
├── OldShoe.png
├── Player.java
├── SmallFish.png
├── soundoff.png
└── soundon.pngI welcome any contributions aimed at improving or enhancing this project! If you find a bug, want to add a new feature, or have any suggestions for improvement, please feel free to open an issue or submit a pull request.
Developing the 'Catch The Fish' game was a rewarding experience, providing valuable insights into various aspects of Java development, game mechanics, and version control. Here are some key lessons I learned throughout this project:
Developing a simple game from scratch offered practical understanding of core game development concepts:
-
Event Handling: Implementing user input (mouse/keyboard) and game events (catching a fish, collision detection) was a key learning curve.
-
Game Loop & Timing: Understanding how to manage the game's state updates and rendering cycles to ensure smooth gameplay.
-
Resource Management: Handling image and audio assets, ensuring they are loaded and used efficiently.
-
Simple UI Design: Creating a functional and user-friendly graphical interface with Java Swing/AWT components.
GitHub: ItsMerad