Skip to content

OG-SCARCE/ONSLAUGHT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ’ฅ ONSLAUGHT

A JavaFX + OpenCV Powered Face Recognition Login System with a 2D Shooter Game


๐Ÿ“˜ Overview

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.


๐Ÿงฉ Features

๐Ÿ” Face Recognition Login

  • ๐ŸŽฅ 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

๐ŸŽฎ 2D Java Shooter Game

  • ๐Ÿ”ซ Classic top-down shooter mechanics
  • ๐Ÿ–ฑ๏ธ Mouse-driven aiming and shooting
  • ๐Ÿ‘พ Enemy spawning and bullet collisions
  • ๐ŸŒŸ Basic animation and real-time scoring

๐Ÿ“ธ Screenshots



๐Ÿ‘จโ€๐Ÿ’ป Contributors

Name Role GitHub
Aman Patel Project Lead & Developer OG-SCARCE
Smith Shukla Documentation & Reviewer Smith63063
Kaustubh Kumar JavaFX Developer kaushtubhk

๐ŸŽฏ Course Criteria Breakdown

๐Ÿ“‚ 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

โš™๏ธ Development Setup

๐Ÿ“Œ Prerequisites

  • Java SE Development Kit 23
    Download JDK 23

  • IntelliJ IDEA Community Edition 2023+ (recommended)
    Alternatives: Eclipse or VS Code with JavaFX plugins


๐Ÿ—‚ Project Structure

  • ONSLAUGHT (FACE RECOGNITION)/src/Main.java โ†’ Main launcher
  • FaceRegistration.java โ†’ Handles face image capture
  • FaceLogin.java โ†’ Authenticates users
  • onslaught/shooterGame/GameMain.java โ†’ Entry point for shooter game
  • registered_faces/ โ†’ Stores user face images
  • resources/ โ†’ FXML, CSS, and assets
  • opencv/ โ†’ Native OpenCV libraries
  • game/ โ†’ Game logic and resources

๐Ÿ” Face Recognition Logic

  • 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.)

๐ŸŽจ UI & Game Design

  • 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

๐Ÿ”ง Installation & Running Guide

๐Ÿ“ฅ 1. Download the Code

  • Visit the GitHub Repository:
    ๐Ÿ”— ONSLAUGHT GitHub Repo
  • Click on Code > Download ZIP ๐Ÿ“ฆ
  • Save the ZIP file to your Desktop ๐Ÿ–ฅ๏ธ

๐Ÿ“‚ 2. Extract the Code

  • 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

๐Ÿ› ๏ธ 3. Prepare the Project

  • Open the ONSLAUGHT folder
  • Right-click inside and Copy the full path ๐Ÿ“‹

๐Ÿ’ป 4. Open IntelliJ IDEA

  1. Go to File > New > Project from Existing Sources
  2. Paste the copied path and open the folder.
  3. Click Next โžก๏ธ then again Next
  4. When prompted with "Yes", click Yes โœ…
  5. Wait for files to load completely โณ
  6. Click Unmark All, then only select the first two files ๐Ÿ—‚๏ธ
  7. Click Next โžก๏ธ โ†’ wait for searching to complete
  8. Keep clicking Next โžก๏ธ
  9. Choose Reuse, then click Create
  10. Let the project open in a new window

โš™๏ธ 5. Setup the Run Configuration

  1. Go to:
    ONSLAUGHT (FACE RECOGNITION) โžก๏ธ src โžก๏ธ Main.java
    Double-click to open it.

  2. Go to Edit Configurations ๐Ÿ› ๏ธ

    • Click + Add New Configuration โ†’ Select Application
    • Name: ONSLAUGHT
    • โœ… Enable: Store as project file
  3. Configure:

    • Module: Select JDK 23 โ˜•
    • -cp: Set to "ONSLAUGHT (FACE RECOGNITION)"
    • Main class: Select Main from the same folder
  4. 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
      
  5. Set Working Directory to ONSLAUGHT (FACE RECOGNITION) ๐Ÿ“

  6. Click Apply, then OK


โ–ถ๏ธ 6. Run the Application

  • Hit the green Play button to run the ONSLAUGHT application ๐ŸŽ‰

๐Ÿ˜„ 7. Register with Face

  • Click Register with Face ๐Ÿ“ธ
  • Enter your username in IntelliJ Terminal
  • Allow Camera Access ๐ŸŽฅ
  • Wait while the application captures 10 facial images

๐Ÿ” 8. Login with Face

  • Click Login with Face
  • If successfully registered, youโ€™ll be allowed to play the game ๐ŸŽฎ
    โ— Note: If not registered, login wonโ€™t proceed.

๐Ÿ›ก๏ธ 9. Admin Login Option

  • For administrator access:
    • ๐Ÿ‘ค Username: admin
    • ๐Ÿ”‘ Password: 1234
    • Click Login

๐Ÿš€ 10. Start the Game

  • Click Start Game
  • If the game window doesnโ€™t appear instantly:
    • Click Minimize ๐Ÿ—•, then reopen from the Taskbar ๐Ÿ“Œ

๐Ÿ† 11. Enjoy!

  • Youโ€™re now ready to play and enjoy ONSLAUGHT
  • Donโ€™t forget to check your High Score after each session ๐Ÿฅ‡

๐Ÿ’ก Contribute

  • 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.โ€

About

A Java-based face recognition login system using JavaFX and OpenCV. Supports real-time face detection via webcam, face registration, and custom matching logic without LBPH. Modular, GUI-driven, and fully portable with relative paths for GitHub compatibility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors