GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - devnix/chipmunkphp: A PHP FFI binding for the Chipmunk 2D physics engine

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
include
include
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.scrutinizer.yml
.scrutinizer.yml
 
 
.styleci.yml
.styleci.yml
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
ISSUE_TEMPLATE.md
ISSUE_TEMPLATE.md
 
 
LICENSE.md
LICENSE.md
 
 
PULL_REQUEST_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
phpcs.xml.dist
phpcs.xml.dist
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 
phpunit.xml.dist.bak
phpunit.xml.dist.bak
 
 

Repository files navigation

devnix/chipmunkphp

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This project aims to provide a full FFI wrapper around Chipmunk 2D physics engine for PHP. What a time to be alive!

Install

Via Composer

$ composer require devnix/chipmunkphp

Dependencies

Linux

You will need to compile and install Chipmunk 7

cd /tmp
git clone [email protected]:slembcke/Chipmunk2D.git
cd Chipmunk2D

Find the latest 7.x tag and checkout it

git tag
Chipmunk-6.0.0
Chipmunk-6.0.1
Chipmunk-6.0.2
Chipmunk-6.0.3
Chipmunk-6.1
Chipmunk-6.1.1
Chipmunk-6.1.2
Chipmunk-6.1.3
Chipmunk-6.1.4
Chipmunk-6.1.5
Chipmunk-6.2.0
Chipmunk-6.2.1
Chipmunk-6.2.2
Chipmunk-7.0.0
Chipmunk-7.0.1
Chipmunk-7.0.2
Chipmunk-7.0.3
Cocos2D-3.0
git checkout Chipmunk-7.0.3

Then compile, install and clear shared libraries cache.

cmake .
make
sudo make install
sudo ldconfig

And should be done. Please, give us feedback if you have problems opening an issue.

Change log

Please see CHANGELOG for more information on what has changed recently.

Hacking

The header file for the FFI API must be already processed. You can do it with GCC (I'm just messing with the parameters...):

cpp -P -E -D "__attribute__(ARGS)=" ~/tmp/Chipmunk2D/include/chipmunk/chipmunk.h -o include/chipmunk.h  -save-temps

Don't forget to hange the /tmp/Chipmunk2D path to your needs.

After that, manually remove code of inline functions and let there only the signature. You will also have to manually delete the stdio.h and math.h (I guess) signatures.

I've been messing with ircmaxell/FFIMe but it seems like there is some kind of problem when parsing with ircmaxell/php-c-parser. I would love to find a way to automatically get the working header file automatically to ease the work.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

  • Pablo Largo Mohedano, author of this package.
  • Victor Blomqvist, I have stolen documentation and ideas from Pymunk.
  • Scott Lembcke and Howling Moon Software, makers of Chipmnunk, parts of C header files are in this project.
  • All Contributors

License

The MIT License (MIT). Please see License File for more information.

About

A PHP FFI binding for the Chipmunk 2D physics engine

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.