Skip to content
/ Snaps Public

Snaps is a physics engine where every object ultimately "snaps" to a grid.

License

KyrietS/Snaps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snaps Physics

Snaps is a 2D physics engine where every object ultimately "snaps" to a grid.
Its purpose is to enable 2D tile-based games to have smooth and reasonably realistic physics.

build-windows build-linux tests


Demo

🚧 This project is currently a work in progress 🚧

Features

  • Collision detection and resolution
  • Velocity, Acceleration and Forces
  • Friction and Drag

Planned but not ready

  • Fluid simulation
  • Gas simulation
  • Constraints

Building

This project uses CMake to generate project files.

git clone https://github.com/KyrietS/Snaps.git
cmake -S Snaps -B Snaps-build
cmake --build Snaps-build

Tests

Tests are written using Google Test. The library is fetched automatically by CMake during the configuration step.

Scene tests

There are special type of tests called Scene Tests. They simulate a physical world for a number of steps and make assertions on the way. Such tests have a graphical preview with debugging interface.

image

The preview opens up automatically when a scene test fails. This behavior can be overridden by a user.

License

Copyright © 2025 Sebastian Fojcik
Use of this software is granted under the terms of the MIT License.

See the LICENCE for the full license text.

About

Snaps is a physics engine where every object ultimately "snaps" to a grid.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published