8000 GitHub - CodeWithAhmedd/FIGHT-CLUB · GitHub
[go: up one dir, main page]

Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚔️ Fight Club Pro

A fully-featured browser fighting game with local multiplayer, AI opponent, sound effects, and mobile controls.


📁 Project Structure

fight-club-pro/
├── index.html          ← Main entry point
├── css/
│   ├── reset.css       ← Base styles & variables
│   ├── screens.css     ← All screen layouts (intro, char-select, vs, etc.)
│   ├── hud.css         ← HUD, HP bars, timer, KO overlay
│   ├── fighters.css    ← Fighter sprites & shadow
│   ├── controls.css    ← Mobile on-screen buttons
│   └── effects.css     ← Hit flash, screen shake, damage numbers, sparks
├── js/
│   ├── config.js       ← Characters, AI settings, physics & combat constants
│   ├── audio.js        ← Procedural sound engine (Web Audio API, no files needed)
│   ├── state.js        ← Central game state & fighter factory
│   ├── physics.js      ← Gravity, movement, collision
│   ├── combat.js       ← Attack, block, special, combo logic
│   ├── ai.js           ← AI decision loop (Easy / Medium / Hard)
│   ├── renderer.js     ← All DOM updates & visual effects
│   ├── input.js        ← Keyboard + touch controls
│   ├── ui.js           ← Screen navigation & character grid
│   └── game.js         ← Main game loop & round lifecycle
├── assets/
│   ├── bg.gif          ← Intro background
│   ├── arena.webp      ← Fight arena background
│   ├── sp_idle.gif     ← Spider-Man idle animation
│   ├── sp_atk.gif      ← Spider-Man attack animation
│   ├── sp_win.gif      ← Spider-Man win animation
│   ├── sp_victory.gif  ← Spider-Man victory animation
│   ├── vn_idle.gif     ← Venom idle animation
│   ├── vn_atk.gif      ← Venom attack animation
│   ├── vn_win.gif      ← Venom win animation
│   ├── vn_hang.gif     ← Venom hang animation
│   ├── vn_beat.gif     ← Venom beat animation
│   ├── ko.png          ← K.O. image
│   ├── vs.jpg          ← VS screen image
│   ├── shield.png      ← Shield icon
│   └── icon.png        ← Favicon
└── README.md

🎮 Controls

Action Player 1 Player 2 (2P mode)
Move Left A ←
Move Right D →
Jump W ↑
Shield S (hold) ↓ (hold)
Attack Space Enter
Special Q /

Mobile: On-screen buttons appear automatically.


🚀 How to Run Locally

Just open index.html in any modern browser — no server needed for basic play.

# Or use a simple local server (recommended):
npx serve .
# or
python3 -m http.server 8080

Then open http://localhost:8080


🌐 Deploy Live (Free Options)

Option 1 — GitHub Pages (Recommended)

  1. Create a GitHub repo
  2. Upload all files (keep folder structure)
  3. Go to Settings → Pages → Branch: main → Save
  4. Your game is live at: https://yourusername.github.io/fight-club-pro/

Option 2 — Netlify (Drag & Drop)

  1. Go to netlify.com → Login
  2. Drag the entire fight-club-pro/ folder onto the Netlify dashboard
  3. Done! You get a *.netlify.app URL instantly

Option 3 — Vercel

npm i -g vercel
vercel

⚙️ Customization

Add a new character — js/config.js

{
  id: 'mychar', name: 'My Hero', power: 'Super Power',
  hp: 120, spd: 5, dmg: 14, color: '#ff00ff',
  idle:    'assets/mychar_idle.gif',
  atk:     'assets/mychar_atk.gif',
  win:     'assets/mychar_win.gif',
}

Tweak AI — js/config.js

const AI_CONFIGS = {
  hard: { name: 'Master AI', hp: 150, spd: 6, dmg: 16, tick: 320, aggr: 0.82, shieldChance: 0.42 }
}

Change round time — js/config.js

const ROUND_TIME = 99; // seconds

🎵 Sound

All sounds are generated in real-time using the Web Audio API — no audio files needed. Sounds include: punch, block, jump, special attack, KO, victory, combo, and UI clicks.


📱 Mobile

  • Touch controls appear automatically on screens < 900px or touch-enabled devices
  • Fully responsive layout using clamp() for all sizes
  • Tap anywhere to unlock audio on mobile browsers

🏆 Game Features

  • ✅ 6 playable characters with unique stats
  • ✅ VS AI mode (Easy / Medium / Hard)
  • ✅ Local 2-Player mode (same keyboard)
  • ✅ Combo system (3x, 5x multiplier)
  • ✅ Special meter that builds up with hits
  • ✅ Shield blocking (90% damage reduction)
  • ✅ Round timer with time-out judgment
  • ✅ KO overlay + victory screen
  • ✅ Procedural sound effects
  • ✅ Mobile-friendly with touch controls
  • ✅ Screen shake & spark particle effects
  • ✅ Damage floating numbers
  • ✅ HP color warning (yellow < 55%, red < 30%)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0