Skip to content

WillSams/Alien-Attack-Linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alien Attack

This is an example project from 'SDL Game Development' by Shaun Mitchell, a book originally published back in 2013. The original source code for the book can now be found on Github here. If you are interested in learning more about SDL (Simple DirectMedia Layer) and making games, I highly recommend you buy this book.

I originally created this repo back in 2014 as I worked my way through the book. In December 2022, I decided I wanted to pick up C/C++ games development again, unfortunately breaking any forked version of this repo. I decided to revisit this project and see improve upon it as I write my own game engine throughout 2023. I plan to make a number of changes, including:

  • Adding support for Nintendo Switch. This is possible because of the libnx port of SDL.
  • Switching to libtinyxml2 instead of libtinyxml. Very much linked to the previous bullet point.

I've done the above already in another unlinked repo. I plan to merge those changes into this repo over the next few days.

In addition to the above:

  • Put all behaviors under test to expose change points for any future changes. A very important step and will be done before the above changes.
  • Eliminate memory leaks. The usage of smart pointers will be introduced but I'll also explain the reasoning behind the changes here.

Pre-requisites

I've included a Makefile that should work on most Linux systems, including Windows Subsystem for Linux and possibly for MacOS. You'll need to install SDL2 and the SDL2 image, ttf, and mixer extensions. To install these extensions on a Debian based system, you can follow these instructions. If you're on a different system, you'll need to install the SDL2 and extensions per the instructions for your system. If you already have SDL2 and extensions installed, only steps you need is to install Tiled, Valgrind, and Google Test if you don't have those already. On Debian-based systems, you can do the following:

sudo update && sudo apt install cmake llibtinyxml-dev tiled valgrind

BUILD_DIR=~/build-sdl2
mkdir -p $BUILDDIR && cd $_
git clone https://github.com/google/googletest cd $BUILDDIR/googletest
cd googletest && cmake .
make && sudo make install
rm -rf $BUILDDIR

I'll update these instructions for WSL and MacOS, eventually. However, if anyone wants to submit a PR for these, I'd be happy to accept it.

Running

Just simply type make && make run to build and run the game.

About

Example project from 'SDL Game Development' by Shaun Mitchell

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published