Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 988 Bytes

README.md

File metadata and controls

46 lines (35 loc) · 988 Bytes

A simple sandbox game using C and SDL2, includes two paddles and bouncing ball, endlessly bouncing.

Controls

The left paddle moves up (A Key) and down (D Key) as well as the right paddle, up (Left Key) and down (Right Key).

Setup

  1. Create a CMakeLists.txt file in the root directory

  2. Copy the contents of /cmake_example/CMakeLists.example.txt into the CMakeLists.txt file

  3. update the CMakeLists.txt to include the path to your sdl2 installation

Building the project

setup on mac or linux

  1. Create a build folder
mkdir build
  1. change your directory into the build folder
cd build
  1. This project uses cmake to build the game
cmake ..

add the -DCMAKE_EXPORT_COMPILE_COMMANDS=1 option to generate compile_commands.json file

cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
  1. Use the make command
make
  1. Run the executable
./basic_arcade