[Release] Pica - 3D physics engine

Discussion in '3DS - Homebrew Development and Emulators' started by delete12345, Oct 30, 2016.

  1. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    .
    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, Nov 6, 2016
    cynosura, Voxel, SLiV3R and 5 others like this.
  2. ThisIsDaAccount

    ThisIsDaAccount GBAtemp Advanced Fan

    Member
    847
    403
    Apr 8, 2016
    United States
    Pretty interesting, I can't wait to see all the wonderful projects that can be made with this!
     
  3. Posghetti

    Posghetti Greninja Master

    Member
    GBAtemp Patron
    Posghetti is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    1,085
    367
    Mar 15, 2016
    United States
    Michigan
  4. Jacklack3

    Jacklack3 ( ゚ヮ゚) buddie was here

    Member
    1,554
    2,049
    Oct 6, 2015
    Canada
    In your basement Dick Size: 5 meters.
    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?
     
  5. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    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.
     
    Jacklack3 likes this.
  6. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,212
    1,044
    Jan 9, 2006
    Cool stuff man
     
  7. haazet

    haazet Advanced Member

    Newcomer
    62
    23
    Dec 15, 2015
    United States
    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.
     
  8. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    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.
     
  9. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    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, Oct 31, 2016
  10. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    435
    188
    Feb 27, 2010
    United States
    Taipei, Taiwan
    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.