Gravity simulator
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
.gitignore
CMakeLists.txt
COPYING
README
engine.cpp
engine.h
gravsim.cpp
objects.cpp
objects.h
states.cpp
states.h

README

Gravsim is a little gravity simulator made with SDL and C++.
I made it to learn SDL and C++ and at the same time refresh
some physics ;).

Gravsim is licenced under GPL.

Source is aviable on github:
http://github.com/sindreij/Gravsim

It should compile on Linux and Windows

You need:
 - cmake
 - SDL (http://libsdl.org)
 - SDL_image (http://www.libsdl.org/projects/SDL_image/)
 - SDL_ttf (http://www.libsdl.org/projects/SDL_ttf/)
 - SDL_gfx (http://www.ferzkopp.net/joomla/content/view/19/14/)

To compile, run:
$ cmake .
$ make

Controls:
- Left click and drag to make a new earth (the planet start
  where you left click and get velocity from the length of
  the line)
- Right click on a object to delete it. (try to right click on
  the Sun and observe what happens.
- Press f to go to fullscreen
- Press c to clear the screen and delete all the objects.

You can contact me at sindreij@gmail.com