A C++ console-based turn-based strategy game where players control an alien navigating a 2D grid to defeat zombies using strategic movement and game objects. Developed in 2023 as part of a Programming Fundamentals course assignment.
This repository showcases two development iterations demonstrating progressive feature enhancement and programming proficiency in C++. The game combines strategy, resource management, and tactical combat mechanics.
Development Team:
- Wong Ju Wei (Lead Developer)
- Yap Rui Ern (Developer)
- Lim Jia Hen (Developer)
w-Programming-Fundamentals/
├── Starter-Kit-master (Part 1)/
│ ├── pf/ # Programming fundamentals resources
│ ├── main.cpp # Main game implementation (Part 1)
│ ├── demo.cpp # Demo/test code
│ ├── README.md # Part 1 documentation
│ ├── PART1.md # Part 1 progress log
│ ├── PART2.md # Part 2 progress log
│ └── Program.png # Game screenshot
│
└── Starter-Kit-master (Part 2)/
├── pf/ # Programming fundamentals resources
├── main.cpp # Enhanced game implementation (Part 2)
├── README.md # Part 2 documentation
├── PART1.md # Part 1 progress log
├── PART2.md # Part 2 progress log
└── Program.png # Game screenshot
- Customizable game board (adjustable rows/columns)
- Random zombie placement
- Turn-based combat system
- Game Objects:
- 🏥 Health Packs - Restore health
- 🫘 Pods - Attack mechanisms
- 🪨 Rocks - Obstacles
- ⬆️ Arrows - Change movement direction
All Part 1 features plus:
- Difficulty levels for varied challenge
- Enhanced mechanics: Health packs (+20 HP), Arrows (+20 attack)
- Intelligent pod targeting (attacks nearest zombie)
- Advanced interactions: Rocks block movement and drop objects
- New obstacle: 🌟 Spikes (-10 HP to alien)
- Save/Load system for persistent gameplay
- Expanded command set
- C++ Compiler (GCC, MinGW, MSVC, or similar)
- C++11 or later
# Using IDE (VS Code)
Open main.cpp → Press F5 or click debug button
# Command Line
g++ main.cpp -o alien_zombie.exe
# With multiple source files
g++ main.cpp pf/code.cpp -o game.exe| Command | Action |
|---|---|
up, down, left, right |
Move alien |
arrow |
Change arrow direction |
save, load |
Save/load game (Part 2) |
help |
Display commands |
quit |
Exit game |
- Run the compiled executable
- Customize settings (board size, zombie count, difficulty)
- Navigate using directional commands
- Collect health packs and utilize game objects strategically
- Defeat all zombies to win!
This project was developed to demonstrate proficiency in core programming concepts:
- Object-Oriented Programming (OOP) in C++
- Algorithm Design for game mechanics and logic
- Data Structure Implementation for game board management
- User Input Handling and validation
- Random Generation Algorithms for dynamic gameplay
- File I/O Operations for save/load functionality (Part 2)
- Memory Management in C++
- Code Organization and modular programming
-
Game Board System
- 2D array/vector implementation
- Dynamic sizing based on user configuration
- Cell state management (empty, occupied, object type)
-
Entity Management
- Alien character with health and position tracking
- Zombie entities with individual states
- Object placement and interaction system
-
Command Processing
- Input parsing and validation
- Command execution engine
- Help system implementation
-
Random Generation
- Pseudo-random number generation for zombie placement
- Random object distribution across the board
-
Save/Load System (Part 2)
- Object-Oriented Programming (OOP) - Classes for entities and game objects
- Data Structures - 2D arrays/vectors for board representation
- Algorithm Design - Pathfinding, random generation, nearest neighbor search
- File I/O Operations - Save/load game state (Part 2)
- Input Validation - Robust error handling and user input processing
- Memory Management - Proper resource allocation in C++
- Game Board System - Dynamic 2D grid with cell state management
- Entity Management - Alien/zombie tracking with health and position
- Command Processing - Input parsing and execution engine
- Random Generation - Zombie placement and object distribution
- Combat Resolution - Damage calculation and victory conditions
- Save/Load System - Game state serialization (Part 2)
This project demonstrates:
- Software design and implementation
- Complex game logic and algorithms
- Version control and team collaboration
- Iterative development practices
- Code organization and documentation
- Testing and debugging methodologies
- Repository: github.com/juwei-w/w-Programming-Fundamentals
- Issues: Report a bug
Programming Fundamentals Course Assignment • Degree Year 1 Sem 1 • Nov 2022 - March 2023
/Program.png)