Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
# Physics Engine written in `C`
# phy

will be public asap.
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Language](https://img.shields.io/badge/Language-C-00599C.svg)](https://en.wikipedia.org/wiki/C_(programming_language))

**A Physics Engine written in C**

`phy` is a lightweight physics engine developed in pure C. Built with performance and simplicity in mind, it provides the fundamental building blocks for simulating physical systems, collision detection, and rigid body dynamics.

*Note: The engine is currently in development and the full source code will be made public soon.*

## Features

* **Pure C Implementation**: Lightweight, fast, and easy to integrate into existing C/C++ projects or game engines.
* **Optimized Math Backend**: Powered by [`cglm`](https://github.com/recp/cglm) for highly optimized 3D math operations (vectors, matrices, quaternions).
* **Rigid Body Dynamics** *(In Progress)*: Core structures for handling mass, velocity, acceleration, and forces.
* **Collision Detection** *(Planned)*: Primitives for AABB, spheres, and complex mesh intersections.

## Dependencies

* [`cglm`](https://github.com/recp/cglm) - Required for mathematical operations.

## Installation

### Using Git Submodules

The easiest way to integrate `phy` into your project is by adding it as a git submodule. This will also fetch necessary dependencies like `cglm`.

```bash
git submodule add https://github.com/recp/phy.git
git submodule update --init --recursive
```

### Linking to Your Project

Add the `include/` directory to your project's include path and compile the source files along with your project.

## Usage

```c
#include <phy/phy.h>

int main(void) {
// API is under active development.
// Example conceptual usage:
//
// phy_world_t* world = phy_world_create();
//
// // Simulation loop
// while (running) {
// phy_world_step(world, delta_time);
// }
//
// phy_world_destroy(world);

return 0;
}

```

## Contributing

Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://www.google.com/search?q=https://github.com/recp/phy/issues) if you want to contribute once the full codebase is public.

## License

`phy` is distributed under the [Apache License 2.0](https://www.google.com/search?q=https://github.com/recp/phy/blob/master/LICENSE). See `LICENSE` for more information.