All Projects → kurtjd → galaxy-raiders

kurtjd / galaxy-raiders

Licence: MIT license
Just another Space Invaders clone implemented using SFML.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to galaxy-raiders

Fury3d
A simple but modern graphic engine
Stars: ✭ 84 (+366.67%)
Mutual labels:  sfml
Sfml Vscode Boilerplate
A cross-platform SFML 2.5.1 & C++17 build environment for Visual Studio Code
Stars: ✭ 156 (+766.67%)
Mutual labels:  sfml
Csfml
Official binding of SFML for C
Stars: ✭ 211 (+1072.22%)
Mutual labels:  sfml
Engge
Open source remake of Thimbleweed Park's engine
Stars: ✭ 94 (+422.22%)
Mutual labels:  sfml
Gbemu
A Gameboy emulator in modern C++
Stars: ✭ 149 (+727.78%)
Mutual labels:  sfml
Xygine
2D engine / framework built around SFML
Stars: ✭ 174 (+866.67%)
Mutual labels:  sfml
Crsfml Examples
Simple games made with CrSFML
Stars: ✭ 47 (+161.11%)
Mutual labels:  sfml
ParticleEditor
Particle editor for SFML/Thor based applications
Stars: ✭ 14 (-22.22%)
Mutual labels:  sfml
Proceduralmapgenerator
A procedural map generator for roguelike games
Stars: ✭ 156 (+766.67%)
Mutual labels:  sfml
Simplenes
An NES emulator in C++
Stars: ✭ 2,915 (+16094.44%)
Mutual labels:  sfml
Sfml Tmxloader
SFML 2.x based tmx tilemap parser for files created with Tiled tile map editor
Stars: ✭ 100 (+455.56%)
Mutual labels:  sfml
Python Sfml
Official binding of SFML for Python
Stars: ✭ 145 (+705.56%)
Mutual labels:  sfml
Gwork
Skinnable GUI with useful widget collection. Fork of GWEN.
Stars: ✭ 179 (+894.44%)
Mutual labels:  sfml
Is Engine
SFML C++ game engine that allows to create games on Web (HTML 5 - CSS 3), Android and PC
Stars: ✭ 94 (+422.22%)
Mutual labels:  sfml
Pubg mobile memory hacking examples
Pubg Mobile Emulator Gameloop Memory Hacking C++ code examples. Ex: Name, Coord, Bones, Weapons, Items, Box, Drop etc.
Stars: ✭ 224 (+1144.44%)
Mutual labels:  sfml
Cpp3ds
Basic C++ gaming framework and library for Nintendo 3DS
Stars: ✭ 80 (+344.44%)
Mutual labels:  sfml
Mapgen Viewer
Map generator based on Voronoi Diagram and Perlin noise
Stars: ✭ 169 (+838.89%)
Mutual labels:  sfml
SFML-utils
Some adds to SFML to build games
Stars: ✭ 21 (+16.67%)
Mutual labels:  sfml
Tmxlite
lightweight C++14 parser for Tiled tmx files
Stars: ✭ 248 (+1277.78%)
Mutual labels:  sfml
Managed Doom
A Doom port written in C Sharp
Stars: ✭ 185 (+927.78%)
Mutual labels:  sfml

Galaxy Raiders

Galaxy Raiders

Unfortunately, this will no longer build because the project originally used copyrighted sprites and sounds which I have now removed.

This is a Space Invaders clone written in C++ and SFML. I wanted to make it a pretty faithful copy, so there are no "enhancements" on my part. However, it does have some of the gameplay tricks of the original such as the 300 point UFO trick, the "lasers don't hurt you when shot by Invaders right above the invasion line" trick, etc.

I learned a lot about C++ and OOP as I wrote this, so unfortunately code started to get spaghettified as I realized my original class setup didn't work well on a large scale, and I eventually got tired of trying to refactor everything. Specifically, the game.cpp file got really out of hand as I started implementing states. Still, I consider the structure of the code an improvement on my previous graphical game, Pong, which was written in Python.

Watch Video Demo

Requirements

  • SFML

Build Procedures

This project uses the CMake build tool and depends on SFML 2.x and a modern C++ compiler. Building on Linux, for example:

mkdir build && cd build
cmake ../cmake/
make

What I Learned and What I Plan to do Differently

  • Decouple graphics from gameplay logic. Although it isn't absolutely terrible in my code, it can still be much better.
  • Make objects not so tightly coupled. This was increasing compile times. Forward declare classes instead of including their header file when able.
  • Look into game programming patterns, specifically entity-component pattern. I really don't like how I'm passing all the game objects separately into each function. There needs to be an easier way to handle all this.
  • Implement sprite batching. Although it isn't a big deal here because of the few number of sprites, making individual draw calls for every sprite every frame is very inefficient.
  • Make game speed independent of FPS. At first I didn't really understand "delta time", but now that I do, all movements, update ticks, etc should take into account delta time. Having said that, don't use sleep()... really only did this out of laziness.
  • Figure out a better way to load and manage resources (IE: textures, sounds, etc). I know my method will fall apart once you have a larger amount of resources.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].