Skip to content

Game programming intake for Breda University of Applied Sciences

Notifications You must be signed in to change notification settings

PacVan1/Aysteroids

Repository files navigation

Aysteroids

Description

An asteroids-like game made in C++ and SFML for the BUas CMGT intake procedure (numerus-fixus).
Result: Accepted!

Opening Gameplay

What I Learned

This is my first videogame written in C++. I learned many things in a short time:

  • Manually handling dependencies (static and dynamic) through project configurations
  • A simple game loop (when to update input, update objects, render objects, etc)
  • A design pattern called "object pool" to reuse already allocated objects
  • Collision detection and resolution
  • Pointers and references
  • What the difference is between a list and vector and when to use them

In order to do this, I used a few resources:

Features

  • 2D elastic collisions based on this article
  • Fixed 2560x1600px resolution, because I did not have time for dynamic scaling

Installation and Setup

The project uses vcpkg manifests to install dependencies and include source code. Therefore to build the project, vcpkg is required.

In the root folder of the project (next to vcpkg.json):

vcpkg install --triplet x86-windows
vcpkg integrate install

Controls

Action Key Description
Fly Right D Ship flies right
Fly Up W Ship flies up
Fly Left A Ship flies left
Fly Down S Ship flies down
Fire Left MB Ship fires projectile at the facing direction
Aim Cursor Ship faces the cursor

Dependencies

The project depends on SFML, a Simple and Fast Multimedia Library. This includes:

  • Audio and sound effects
  • Inputs
  • Windows
  • Graphics

Patches

I wanted to keep the repository as vanilla as possible, but there were some major bugs/disturbances that had to be fixed:

  • Added vcpkg manifests to not bloat the repository with dependencies
  • Added an asset folder (for the fonts) to remove the build folders
  • Fixed the game on 2560x1600px resolution
  • Fixed the game starting in game over state
  • Fixed the player speed-up at the first run
  • Changed folder names and moved source files

About

Game programming intake for Breda University of Applied Sciences

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages