Skip to content

Labid-svg/GameProject150

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Combat Game (SFML + C++)

A 2D Space Shooting Game built with C++ and SFML

Space Combat is a real-time 2D arcade-style space shooter where the player controls a spaceship, shoots incoming enemies, dodges enemy fire, and progresses through increasingly challenging levels. This project demonstrates core game development fundamentals using C++ and SFML, including game loops, collision detection, state management, and rendering.

◼️ Gameplay Features

• Player-controlled spaceship with smooth movement

• Bullet shooting system (player & enemies)

• Enemy spawning with increasing difficulty

• Enemy health bars

• Score, lives, and level system

• Temporary invincibility after taking damage

• Menu, gameplay, and game-over states

• Simple HUD (score, lives, level)

• Cross-platform font loading (Linux / Windows)

◼️ Controls

• Key Action

• Arrow Keys - Move player

• Space - Shoot/Start game

• R - Restart after Game Over

• Esc - Exit game

◼️ Project Structure (Key Components)

• Bullet and Enemy structs

• Game state management (MENU, PLAYING, GAME_OVER)

Separate logic for:

• Input handling

• Enemy spawning

• Shooting mechanics

• Collision detection

• Rendering & HUD updates

◼️ Technical Highlights

• C++17

• SFML (Graphics, Window, System)

• Object-oriented design using structs

• Delta-time based movement

Collision detection:

•Bounding box checks

• Distance-based collision

• Efficient game loop with frame limiting

◼️ Built With

• Language: C++

• Library: SFML (Simple and Fast Multimedia Library)

• Platform: Linux / Windows

◼️ Installation & Run

• Linux

sudo apt install libsfml-dev

g++ main.cpp -o space_combat -lsfml-graphics -lsfml-window -lsfml-system ./space_combat

• Windows

  • Install SFML

  • Configure include & lib paths

  • Compile using MinGW or Visual Studio

  • Run the executable

◼️ Game Preview Screenshot from 2026-01-18 08-51-00 Screenshot from 2026-01-18 08-51-11 Screenshot from 2026-01-18 08-51-24

Screencast.from.2026-01-18.08-52-24.webm

About

Space Combat Game (SFML + C++)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors