ONSLAUGHT is a modular, GUI-based Java application that blends real-time face recognition using OpenCV with an interactive 2D top-down shooter game. Built entirely with JavaFX, it supports face registration, login with image-based comparison, and a classic shooter gameplay experience. Designed for portability, the system uses relative pathsโmaking it fully GitHub-compatible.
- ๐ฅ Real-time face detection with OpenCV
- ๐ง Image-based login system (custom logic, no LBPH)
- ๐ค Multiple image capture per user during registration
- ๐ธ Integrated webcam feed and bounding box
- ๐จ Clean, responsive GUI built using JavaFX
- ๐พ Organized folder system (
registered_faces/) - ๐ Multiple login attempts and retry mechanism
- ๐๏ธ Optional integration with file/database for user info
- โ GitHub-ready: zero hardcoded paths
- ๐ซ Classic top-down shooter mechanics
- ๐ฑ๏ธ Mouse-driven aiming and shooting
- ๐พ Enemy spawning and bullet collisions
- ๐ Basic animation and real-time scoring
| Name | Role | GitHub |
|---|---|---|
| Aman Patel | Project Lead & Developer | OG-SCARCE |
| Smith Shukla | Documentation & Reviewer | Smith63063 |
| Kaustubh Kumar | JavaFX Developer | kaushtubhk |
| ๐ Section | โ Marks |
|---|---|
| ๐ช Development Setup | 2 |
| โจ Project Structure | 1 |
| ๐ Recognition Mechanism | 1 |
| ๐ Folder Organization | 1 |
| ๐งช Face Recognition Logic | 3 |
| ๐ฎ Game Module | 3 |
| ๐จ UI/UX Enhancements | 4 |
| ๐ Component Placement | 2 |
| โ Responsiveness & Accessibility | 2 |
-
Java SE Development Kit 23
Download JDK 23 -
IntelliJ IDEA Community Edition 2023+ (recommended)
Alternatives: Eclipse or VS Code with JavaFX plugins
ONSLAUGHT (FACE RECOGNITION)/src/Main.javaโ Main launcherFaceRegistration.javaโ Handles face image captureFaceLogin.javaโ Authenticates usersonslaught/shooterGame/GameMain.javaโ Entry point for shooter gameregistered_faces/โ Stores user face imagesresources/โ FXML, CSS, and assetsopencv/โ Native OpenCV librariesgame/โ Game logic and resources
- No LBPH used โ Implements custom OpenCV image comparison
- Registration captures multiple facial images (for robustness)
- Login matches real-time camera frames to registered images
- Modular and readable class design (
FaceDetection,FaceLogin, etc.)
- Built with JavaFX FXML and CSS
- Screens: Login, Register, Admin Panel, Game Screen
- Game logic uses AWT/Swing for simplicity and responsiveness
- Styled with modern layouts: GridPane, VBox, etc.
- Includes feedback dialogs, tooltips, and responsive resizing
- Visit the GitHub Repository:
๐ ONSLAUGHT GitHub Repo - Click on Code > Download ZIP ๐ฆ
- Save the ZIP file to your Desktop ๐ฅ๏ธ
- Extract the ZIP file on the Desktop itself.
- Youโll get a folder named: ONSLAUGHT-main
- Open it โ inside youโll find another folder also named: ONSLAUGHT-main
- โ Rename this inner folder to: ONSLAUGHT
- Open the ONSLAUGHT folder
- Right-click inside and Copy the full path ๐
- Go to File > New > Project from Existing Sources
- Paste the copied path and open the folder.
- Click Next โก๏ธ then again Next
- When prompted with "Yes", click Yes โ
- Wait for files to load completely โณ
- Click Unmark All, then only select the first two files ๐๏ธ
- Click Next โก๏ธ โ wait for searching to complete
- Keep clicking Next โก๏ธ
- Choose Reuse, then click Create
- Let the project open in a new window
-
Go to:
ONSLAUGHT (FACE RECOGNITION) โก๏ธ src โก๏ธ Main.java
Double-click to open it. -
Go to Edit Configurations ๐ ๏ธ
- Click + Add New Configuration โ Select Application
- Name: ONSLAUGHT
- โ Enable: Store as project file
-
Configure:
- Module: Select JDK 23 โ
- -cp: Set to "ONSLAUGHT (FACE RECOGNITION)"
- Main class: Select Main from the same folder
-
Click Modify Options:
-
Enable Add VM Options under Java section
-
Paste the following path in VM Options:
--module-path "../ONSLAUGHT (REQUIRED FILES)/OPEN_CV/JAVA SDK/lib" --add-modules javafx.controls,javafx.fxml
-
-
Set Working Directory to ONSLAUGHT (FACE RECOGNITION) ๐
-
Click Apply, then OK
- Hit the green Play button to run the ONSLAUGHT application ๐
- Click Register with Face ๐ธ
- Enter your username in IntelliJ Terminal
- Allow Camera Access ๐ฅ
- Wait while the application captures 10 facial images
- Click Login with Face
- If successfully registered, youโll be allowed to play the game ๐ฎ
โ Note: If not registered, login wonโt proceed.
- For administrator access:
- ๐ค Username: admin
- ๐ Password: 1234
- Click Login
- Click Start Game
- If the game window doesnโt appear instantly:
- Click Minimize ๐, then reopen from the Taskbar ๐
- Youโre now ready to play and enjoy ONSLAUGHT
- Donโt forget to check your High Score after each session ๐ฅ
- Fork the repo
- Make your changes
- Submit a pull request ๐
๐ Developed with ๐ป and โ by OG-SCARCE
โFrom face recognition to fast-paced fun โ welcome to ONSLAUGHT.โ
/OPEN_CV/PROJECT SCREENSHOTS/ (12).jpg)
/OPEN_CV/PROJECT SCREENSHOTS/ (23).jpg)
/OPEN_CV/PROJECT SCREENSHOTS/ (22).jpg)
/OPEN_CV/PROJECT SCREENSHOTS/ (16).jpg)