Skip to content

Commit 8f2ed7a

Browse files
committed
Total rework of doc files to ease maintenance
1 parent fb34d74 commit 8f2ed7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+8799
-4321
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
branches: master
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Install dependencies
15+
run: >
16+
sudo apt-get update && sudo apt-get install -y doxygen
17+
18+
- name: Configure CMake
19+
run: >
20+
cmake -B . -D BUILD_DOCS=ON -D BUILD_DEMOS=OFF -S ${{ github.workspace
21+
}}
22+
23+
- name: Build docs
24+
run: cmake --build docs
25+
26+
- name: Upload static files as artifact
27+
id: deployment
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: build/html/
31+
32+
deploy:
33+
needs: build
34+
permissions:
35+
pages: write # to deploy to Pages
36+
id-token: write # to verify the deployment originates from an appropriate source
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Deploy docs to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

CHANGELOG.md

Lines changed: 521 additions & 0 deletions
Large diffs are not rendered by default.

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ add_subdirectory(src)
6666
if(BUILD_DEMOS)
6767
add_subdirectory(demo)
6868
endif()
69+
70+
option(BUILD_DOCS "Build documentation" OFF)
71+
72+
if(BUILD_DOCS)
73+
add_subdirectory(docs)
74+
endif()

LICENSE.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2007-2015 Scott Lembcke and Howling Moon Software
1+
Copyright (c) 2025 Victor Blomqvist
2+
Copyright (c) 2007-2024 Scott Lembcke and Howling Moon Software
23

34
Permission is hereby granted, free of charge, to any person obtaining a copy
45
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Munk2D
2+
3+
## FORK INFO
4+
5+
The main purpose of this fork is to be a companion for the Python 2D physics
6+
library [Pymunk](https://www.pymunk.org) which is built on Chipmunk2D. Given the
7+
slow pace of development of Chipmunk2D, and some unique requirements and
8+
opportunities of Pymunk this is something that have grown over a long time. What
9+
really made me consider making this fork more formal was the discussion
10+
[here](https://github.com/slembcke/Chipmunk2D/issues/237) with Slembcke, the
11+
creator of Chipmunk2D.
12+
13+
I do not foresee that I have the time, motivation or skills to really revive
14+
Chipmunk2D. However, I hope to incorporate minor new features, and a bunch of
15+
fixes. Any changes are driven by what make sense from the Pymunk use case.
16+
However, I do think many of these changes are useful also to users outside
17+
Pymunk, and you are of course free to use the fork for other projects /
18+
languages as well.
19+
20+
At the moment I don't have any formal release of this fork, but I plan to make
21+
some kind of rename and a release if/when enough changes are accumulated.
22+
23+
/Victor 2025-01-25
24+
25+
## ABOUT
26+
27+
This is a fork of the 2D physics library
28+
[Chipmunk2D](https://github.com/slembcke/Chipmunk2D). Munk2D is a simple,
29+
lightweight, fast and portable 2D rigid body physics library written in C. It's
30+
licensed under the permissive MIT license. I hope you enjoy using Munk2D!
31+
32+
### Expectations from Munk2D
33+
34+
- Munk2D will add fixes for various issues, especially issues affecting Pymunk.
35+
- Munk2D will add or improve features useful for Pymunk.
36+
- Munk2D does not aim for ABI stability between versions.
37+
- Munk2D will try to avoid API breaking changes, but ultimately be less strict
38+
than Chipmunk2D.
39+
- While Munk2D will not try to actively break features or targets, breakage is
40+
more likely than with Chipmunk2D. Testing of Munk2D will mainly happen through
41+
Pymunk, parts not useful from Pymunk (e.g ObjectiveC support), will be
42+
untested and therefor likely to break over time.
43+
- While Munk2D is focused on Pymunk, I will happily accept PRs to fix or improve
44+
other parts of the code, or improvements to tests, documentation and so on.
45+
46+
## FEATURES
47+
48+
- Designed specifically for 2D video games.
49+
- Circle, convex polygon, and beveled line segment collision primitives.
50+
- Multiple collision primitives can be attached to a single rigid body.
51+
- Fast broad phase collision detection by using a bounding box tree with great
52+
temporal coherence or a spatial hash.
53+
- Extremely fast impulse solving by utilizing Erin Catto's contact persistence
54+
algorithm.
55+
- Supports sleeping objects that have come to rest to reduce the CPU load.
56+
- Support for collision event callbacks based on user definable object types.
57+
- Flexible collision filtering system with layers, exclusion groups and
58+
callbacks. \*\* Can be used to create all sorts of effects like one way
59+
platforms or buoyancy areas. (Examples included)
60+
- Supports nearest point, segment (raycasting), shape and bounding box queries
61+
to the collision detection system.
62+
- Collision impulses amounts can be retrieved for gameplay effects, sound
63+
effects, etc.
64+
- Large variety of joints - easily make vehicles, ragdolls, and more.
65+
- Joint callbacks. \*\* Can be used to easily implement breakable or animated
66+
joints. (Examples included)
67+
- Maintains a contact graph of all colliding objects.
68+
- Lightweight C99 implementation with no external dependencies outside the Std.
69+
C library.
70+
- "Many language bindings available":http://chipmunk2d.net/bindingsAndPorts.php.
71+
- Simple, read the "documentation":https://viblo.github.io/Munk2D/ and see!
72+
- Unrestrictive MIT license
73+
74+
## BUILDING
75+
76+
Mac OS X: There is an included Xcode project file for building the static
77+
library and demo application. Alternatively you could use the CMake files or the
78+
macstatic.command script inside the xcode/ directory to build a static lib and
79+
package up the headers for you.
80+
81+
iPhone: A native Objective-C API is included. The Xcode project can build a
82+
static library with all the proper compiler settings. Alternatively, you can
83+
just run iphonestatic.command in the xcode/ directory. It will build you a fat
84+
library compiled as release for the device and debug for the simulator. After
85+
running it, you can simply drop the Chipmunk-iOS directory into your iPhone
86+
project!
87+
88+
UNIXes: A forum user was kind enough to make a set of CMake files for Chipmunk.
89+
This will require you to have CMake installed. To build run 'cmake .' then
90+
'make'. This should build a dynamic library, a static library, and the demo
91+
application. A number of people have had build errors on Ubuntu due to not
92+
having GLUT or libxmu installed.
93+
94+
Windows: Visual Studio projects are included in the msvc/ directory. While I try
95+
to make sure the MSVC 10 project is up to date, I don't have MSVC 9 to keep that
96+
project updated regularly. It may not work. I'd appreciate a hand fixing it if
97+
that's the case.
98+
99+
## GET UP TO DATE
100+
101+
If you got the source from a point release download, you might want to consider
102+
getting the latest source from GitHub. Bugs are fixed, and new features are
103+
added regularly. Big changes are done in branches and tested before merging them
104+
in it's rare for the point release downloads to be better or more bug free than
105+
the latest code.
106+
107+
Head on over to "GitHub":https://github.com/viblo/Munk2D and experience the
108+
future TODAY! (Okay, so maybe it's not that exciting.)
109+
110+
## GETTING STARTED
111+
112+
The C API documentation is in the docs/ directory.
113+
114+
A good starting point is to take a look at the included Demo application. The
115+
demos all just set up a Munk2D simulation space and the demo app draws the
116+
graphics directly out of that. This makes it easy to see how the Munk2D API
117+
works without worrying about the graphics code. You are free to use the demo
118+
drawing routines in your own projects, though it is certainly not the
119+
recommended way of drawing Munk2D objects as it pokes around at the
120+
undocumented/private APIs of Munk2D.
121+
122+
## SUPPORT
123+
124+
There is a forum for Chipmunk2D at http://chipmunk2d.net/forum/ Unfortunately
125+
its very inactive nowadays, but much of the discussions are still relevant.
126+
127+
The best way to get support is to visit the "Chipmunk
128+
Forums":http://chipmunk2d.net/forum/. There are plenty of people around using
129+
Chipmunk on the just about every platform I've ever heard of. If you are working
130+
on a commercial project and want some more direct help, Howling Moon Software is
131+
also available for "contracting":http://howlingmoonsoftware.com/.
132+
133+
## CONTRACTING
134+
135+
Howling Moon Software (company of Chipmunk2D) is available for contracting if
136+
you want to make the physics in your game really stand out. Given their unique
137+
experience with Chipmunk2D, they can help you use Chipmunk (and likely Munk2D)
138+
to its fullest potential. Feel free to contact them through their webpage:
139+
http://howlingmoonsoftware.com/

README.textile

Lines changed: 0 additions & 85 deletions
This file was deleted.

TODO.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
INFO: This TODO is not up to date
2+
13
Priorities:
24
Basics tutorial.
35
Simple top down player controls.

0 commit comments

Comments
 (0)