PewPew


image

PewPew

2019

Tools

DevC++

Languages

C++

Created a basic windows terminal game using DevC++

Blog


The story

One of the first languages taught in CIIT was C++ using DevC++. It kind if introduced (or reintroduced) a lot of basic programming ideas and terminologies like the if-else, switches, variable types, etc.

I think C++ was the most fitting for that, but I might be biased because of my personal experience. But I respect our professor for using this stack. It's very simple and aligned with their teaching pattern.

Anyways, I had fun exploring and expanding the lessons taught to us, so much that I decided to create a game heavily inspired by space invaders.

The game is basically a 2d array where players can move on the last row, while random entities (enemies/health packs) generated from the top row moves down per delay. Reversely, firing the spaceship's weapon generates a bullet that moves up per delay, destroying whatever entities it hit.

The Game

pewpew image sample

How to run

Simply download the exe release and run. Windows may block the file. If so, press 'More Info' and then 'Run anyway'.

The whole game code can be checked within this repo if you wish.

How to play

Controls

You move a spaceship left and right using W and D. Space mines (large asterisks) will occasionally spawn from the top of the screen. Destroy each spacemine by firing using spacebar.

Rules

Your ship has a specific amount of health, decreased everytime a spacemine goes past your ship.

Health packs may occasionally spawn. Grab them to restore 1 health. Be careful when firing since you might also destroy health packs.

Every specified amount of score makes the game faster.

The game ends when your ship has no more health or if a spacemine directly hits your ship.