Homebrew [Release] Pica - 3D physics engine

  • Thread starter Thread starter delete12345
  • Start date Start date
  • Views Views 2,602
  • Replies Replies 9
  • Likes Likes 8

delete12345

Well-Known Member
Member
Joined
Feb 27, 2010
Messages
695
Reaction score
335
Trophies
1
Age
34
Location
Taipei, Taiwan
XP
1,320
Country
United States
.
Introduction:

Pica is a 3D physics engine written in C. It is a port of the qu3e C++ lightweight 3D physics engine, written by Randy Gual.

The goal of this project is to enable developers to write and implement 3D physics into their projects, whether it is a simulation-model computation, space simulation, racing, fighting, or sandbox games. Not only this, but also to streamline the process of adding physics without worrying to learn a new syntax or API in order to fully understand how to implement in code.

The project's syntax and APIs are all based on the popular 3D wrapper, citro3D. There shouldn't be any significant learning curve to learn about this.

Each function is prefaced with documentations and notes, all gathered from DIY research and help from Randy Gual himself. If you are unaware of how to use the function, you can read the comments just above the functions, or use IntelliSense / Content Assist to highlight the comments for you.

*********************

Github link:

https://github.com/tommai78101/Pica

*********************

Directions:

To use the Pica library after doing make install:
  • In your application project's Makefile, add the flag -lpica just before -lcitro3d. That way, the Pica physics engine will rely on citro3d after citro3d has finished compiling.
  • In your application project's header file(s), to use the physics engine, add #include <physics.h>.

*********************

Others:

If you see any bugs/issues, please let me know.

I'm requesting volunteers to help me with code reviews, and to test/see if there are any bugs. I expect a lot of problems with the rendering portion, because those are the only places where I tried my best to configure with Citro3D.

*********************

Changelogs:

v1.10
- Initialization fixes.
  • Fixed C3D_Scene bodyList counter by incrementing instead of decrementing.
  • Added missing important C3D_Scene initialization functions, which fixes issues with initializing the heap, stack, and page memory allocation. Fixes a ton of issues related with the physics engine overall.
  • Primitive demo code on how to use Pica engine is now available.
v1.01 - Subtle changes.
  • Removed submodule dependency.
  • Converted the whole project to its independent library, thanks to fincs. This fixes compile issues for some older citro3d projects and applications.
v1.00 - Initial Release
  • Pica has just gone gold, and therefore I feel it is ready for primetime.
  • Project's not over. It's just a v1.0 release. (I meant bugbashing, and ongoing support.)


.
 
Last edited by delete12345,
If it is a work in progress perhaps you should replace [Release] with [WIP]. So, could you give screenshots and more info on what it is and what it can do?

What I meant here is, the project isn't over because I'm in the bugbashing phase and working on other minor things, but I'm not planning on adding new features for a while. I figured the [Release] tag is suited for this occasion.

I'll clarify it a bit more, so thanks for the feedback.
 
  • Like
Reactions: Jacklack3
Nice, I can do some testing on my N3DS. Is this a 3D GUI engine like Godot and Unity? I tried looking at screenshots but can't find anything with tool bars and stuff. Great to have choices for simpler to make 3D games.
 
Nice, I can do some testing on my N3DS. Is this a 3D GUI engine like Godot and Unity? I tried looking at screenshots but can't find anything with tool bars and stuff. Great to have choices for simpler to make 3D games.
No, it is not a 3D GUI engine like Unity. This engine is a pure 3D physics backend engine, like Bullet and PhysX. There aren't any screenshots because there is nothing to show at the moment. I'm just starting the bugbashing phase, but I can't guarantee when it will be over.
 
v1.01 - Removed submodule dependency, and converted the whole project to its independent library, thanks to fincs. This fixes compile issues for some older citro3d projects and applications.

To use the new library after doing make install:
  • In your application project's Makefile, add the flag -lpica just before -lcitro3d. That way, the Pica physics engine will rely on citro3d after citro3d has finished compiling.
  • In your application project's header file(s), to use the physics engine, add #include <physics.h>.
 
Last edited by delete12345,
v1.10 - Initialization fixes.
  • Fixed C3D_Scene bodyList counter by incrementing instead of decrementing.
  • Added missing important C3D_Scene initialization functions, which fixes issues with initializing the heap, stack, and page memory allocation. Fixes a ton of issues related with the physics engine overall.
  • Primitive demo code on how to use Pica engine is now available.
 

Site & Scene News

Popular threads in this forum