Skip to content

Musab-Farooq/Centipede

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

🎮 Centipede Game (C++ & SFML)

A classic arcade-style shooter game built using C++ and the SFML (Simple and Fast Multimedia Library). In this fast-paced action game, you must destroy a slithering centipede and a rogue spider before they reach your player — all while avoiding mushrooms and earning high scores!


🕹️ Gameplay Overview

Take control of the player at the bottom of the screen. Your mission: survive waves of centipede segments and a roaming spider. Use quick reflexes, precise aim, and smart movement to survive and score as high as possible!

🎯 Features

  • Classic Arcade Mechanics

    • Centipede moves in a zigzag pattern, splits when hit.
    • Mushrooms act as obstacles and can be shot.
    • Spider roams the screen unpredictably for added challenge.
  • Pixel-style Graphics
    Clean, sprite-based visuals rendered using SFML.

  • Immersive Audio
    Background music and effects (shooting, collisions, game-over) create a retro vibe.

  • Game Loop
    Smooth frame updates, input handling, and real-time enemy behavior using SFML.


🎮 Controls

Key Action
⬅️ ➡️ 🔼 🔽 Move player
Spacebar Fire bullet
Esc Quit the game

📈 Score System

Earn points by:

  • Shooting centipede segments
  • Hitting the spider
  • Destroying mushrooms

Each action increases your score. The game ends when an enemy touches the player.


🛠️ Requirements

  • C++ compiler (g++, clang++, MSVC)
  • Install SFML and configure your compiler to link it properly.
  • Texture and audio files (included)

📦 One-Click Run

Want to try Centipede without compiling?


📦 Assets Included

Sprites: Player, centipede, spider, mushrooms, bullet

Sounds: Background music, shooting, death

Fonts or UI assets (if any)

No external downloads needed — all files are bundled in the repo.

🧠 What You’ll Learn

This project is great for beginners and hobbyists to explore:

Real-time game loop and frame updates

Collision detection and response

Using SFML for 2D graphics, sound, and input

Handling sprites, textures, and events in C++

About

This is a simple game where you have to dodge the centipede and hit them before they reach you and kill, you also have to be aware of the moving spider.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages