Skip to content
Gravity simulator in SDL
C Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
Makefile
README.md

README.md

gravity-simulator

This program is designed to simulate planets/particles in two dimensional space. It's written in C using OpenGL and SDL.

The goal of this project was to recreate my original Gravity Simulator in C. With C being much closer to the hardware, better performance will be achieved.

Requirements

Make sure you have sdl2, make, and gcc installed on your computer.

Installation

git clone https://github.com/logiclogue/gravity-simulator
cd gravity-simulator
make

The program will begin compiling. Once compilation has finished, the binary will be in the build/ folder. In order to run the program, type ./build/main. Assuming you're on a Unix machine. It's only been tested on Arch Linux. Modification of the SDL and OpenGL header paths may be required to execute on other systems.

The program currently doesn't have much functionality. To change the initial locations of the planets, you'll have to edit src/main.c and recompile.

Author

Jordan Lord

License

MIT License

Copyright (c) 2016 Jordan Lord

You can’t perform that action at this time.