https://github.com/linguini1/diffgames
C implementation for simulating and rendering differential games using SDL2.
https://github.com/linguini1/diffgames
control-theory diff-games differential-games hamilton-jacobi-bellman optimal-control renderer sdl2 simulator visualization
Last synced: 2 months ago
JSON representation
C implementation for simulating and rendering differential games using SDL2.
- Host: GitHub
- URL: https://github.com/linguini1/diffgames
- Owner: linguini1
- License: mit
- Created: 2026-01-18T04:57:54.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-30T23:22:46.000Z (2 months ago)
- Last Synced: 2026-03-31T01:35:06.722Z (2 months ago)
- Topics: control-theory, diff-games, differential-games, hamilton-jacobi-bellman, optimal-control, renderer, sdl2, simulator, visualization
- Language: C
- Homepage:
- Size: 4.43 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Differential Game Simulator
A simple C simulator and renderer for working with differential games. Based on
SDL2.
## Building
### Linux
To build the entire project, just run `make` in the project directory. This will
compile the entire library and all the example binaries.
## Windows
You will need to install an SDL2 installation on your machine somewhere, and you
should be using the MinGW toolchain.
In order to build the examples, you should use the following command:
```console
$ make SDL_PATH=path/to/your/SDL2
```
In order to run any of the examples, ensure the `SDL2.dll` file that came in
your SDL2 installation's `bin/` directory is present in the directory where you
are running the example. Ex:
```console
$ cp path/to/your/SDL2/bin/SDL2.dll .
$ ./bin/particle.exe
```
## Examples
Included examples can be found in the `examples/` directory. To make a specific
example, you can use `make ` where `` is the name of the
example's directory.
Ex: to build and run the `particle` example, you can use:
```console
$ make particle
$ ./bin/particle
```
**In all games, you can press 'q' or 'Esc' to quit the simulation.** For
specific information about the example you're using, run the example with the
`-h` flag:
```console
./bin/particle -h
```
### Particle
A particle which follows your mouse forever.

### 2 Pursuers 2 Evaders
An example of a 2 pursuer, 2 evader differential game.

### N Pursuers N Evaders
An example of a N pursuer, N evader differential game.
