Skip to content

sindreij/Gravsim

Repository files navigation

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

About

Gravity simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published