3D physics/collision libraries that work on DC?
- bbmario
- DCEmu Freak
- Posts: 88
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Wed Feb 05, 2014 5:58 am
- Has thanked: 9 times
- Been thanked: 3 times
3D physics/collision libraries that work on DC?
Does anyone know any physics/collision libraries that can work or easily be ported to DC? I tried Tokamak, but seemed like a huge effort.
Re: 3D physics/collision libraries that work on DC?
CubicVR is a game engine that runs on the Dreamcast, they seem to have used Bullet..
https://github.com/cjcliffe/CubicVR/tre ... /dreamcast
https://github.com/cjcliffe/CubicVR/tre ... /dreamcast
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
-
- Team Screamcast
- Posts: 144
- Joined: Tue Dec 23, 2003 6:04 pm
- Location: Umeå, Sweden
- Has thanked: 0
- Been thanked: 0
- Contact:
Re: 3D physics/collision libraries that work on DC?
ODE has been ported over. It's from 2003 though.
http://www.boob.co.uk/devtools.html
http://www.boob.co.uk/devtools.html
https://github.com/tvspelsfreak/texconv - Converts images into any texture format supported on the DC.
Re: 3D physics/collision libraries that work on DC?
I'm afraid I have not, but it's a sign that bullet should be usable.bbmario wrote:CubicVR seems abandoned... has anyone used it?
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
-
- DC Developer
- Posts: 414
- Joined: Thu Aug 20, 2009 11:00 am
- Has thanked: 0
- Been thanked: 2 times
Re: 3D physics/collision libraries that work on DC?
Funny, I was going to mention a port of Bullet I helped with on the PSP. The biggest problem that port ran into was the HUGE amount of stack you can wind up using. The issue I helped track down was the demo the guy was using was using almost 1MByte of stack space (the default PSP stack was 64K).
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: 3D physics/collision libraries that work on DC?
Wow... That's more than a bit ridiculous stack space wise.Chilly Willy wrote:Funny, I was going to mention a port of Bullet I helped with on the PSP. The biggest problem that port ran into was the HUGE amount of stack you can wind up using. The issue I helped track down was the demo the guy was using was using almost 1MByte of stack space (the default PSP stack was 64K).
Also on that note, the default stack size in KOS is 32KiB (set at compile-time in <arch/arch.h>). I've been pondering the idea of making that configurable at run-time on a per-thread basis, as POSIX allows.
Re: 3D physics/collision libraries that work on DC?
Seems like they have an object pool on the stack, but the size can be configured.
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
- bbmario
- DCEmu Freak
- Posts: 88
- Joined: Wed Feb 05, 2014 5:58 am
- Has thanked: 9 times
- Been thanked: 3 times
Re: 3D physics/collision libraries that work on DC?
Tokamak seems lighter than Bullet, so, i'll start trying to port that. Are there any common caveats when porting libraries to DC?
- Bouz
- DCEmu Junior
- Posts: 46
- Joined: Mon May 10, 2010 3:42 pm
- Location: St. Bauzille de Putois (France)
- Has thanked: 0
- Been thanked: 0
Re: 3D physics/collision libraries that work on DC?
DC-ODE is used in DC-Stunt-Racer:Tvspelsfreak wrote:ODE has been ported over. It's from 2003 though.
http://www.boob.co.uk/devtools.html
http://dcstuntracer.sourceforge.net/
Here is a video of this little game:
https://www.youtube.com/watch?v=q9EPQCd5ZY8
Re: 3D physics/collision libraries that work on DC?
I did some time ago (2011) a newer ODE quick port to Dreamcast (ODE 0.11.1 with OPCODE).
http://www.dreamcast.es/downloads.php?c ... oad_id=276
It is used in a little homebrew game (Skunks) that I used to test it
http://www.dreamcast.es/news.php?readmore=429
http://www.dreamcast.es/downloads.php?c ... oad_id=276
It is used in a little homebrew game (Skunks) that I used to test it
http://www.dreamcast.es/news.php?readmore=429
- PH3NOM
- DC Developer
- Posts: 576
- Joined: Fri Jun 18, 2010 9:29 pm
- Has thanked: 0
- Been thanked: 5 times
Re: 3D physics/collision libraries that work on DC?
Tonight, I decided to compile Chipmunk (2D Physics) Engine for DC.bbmario wrote:Tokamak seems lighter than Bullet, so, i'll start trying to port that. Are there any common caveats when porting libraries to DC?
http://en.wikipedia.org/wiki/Physics_engine
I wrote a makefile for dc-kos:
Code: Select all
OBJS = cpVect.o cpSweep1D.o cpSpatialIndex.o cpSpaceStep.o cpSpaceQuery.o
OBJS += cpSpaceHash.o cpSpaceComponent.o cpSpace.o cpShape.o
OBJS += cpPolyShape.o cpHashSet.o cpCollision.o cpBody.o
OBJS += cpBBTree.o cpBB.o cpArray.o cpArbiter.o chipmunk.o
OBJS += constraints/cpConstraint.o
OBJS += constraints/cpDampedRotarySpring.o
OBJS += constraints/cpDampedSpring.o
OBJS += constraints/cpGearJoint.o
OBJS += constraints/cpGrooveJoint.o
OBJS += constraints/cpPinJoint.o
OBJS += constraints/cpPivotJoint.o
OBJS += constraints/cpRatchetJoint.o
OBJS += constraints/cpRotaryLimitJoint.o
OBJS += constraints/cpSimpleMotor.o
OBJS += constraints/cpSlideJoint.o
KOS_CFLAGS += -I. -I../include/chipmunk
CFLAGS += -O3 -std=c99
all: libchipmunk.a
libchipmunk.a: $(OBJS)
$(KOS_AR) rcs libchipmunk.a $(OBJS)
include $(KOS_BASE)/Makefile.rules
I only had to make a modification to cpCollision.c, because the code did not compile as-is.
I simply added the code
Code: Select all
/* DC-KOS Begin (C) PH3NOM 2014 */
#include <malloc.h>
#define alloca(n) memalign(32, n)
/* End (C) PH3NOM 2014 */
However, just because the code compiles for DC, does not necessarily mean the code has been "ported" to the DC.
I see a lot of places in the code that the DC's fast vector math instructions should be implemented instead of the plain C code, for a true "port".
-
- DC Developer
- Posts: 142
- Joined: Thu Apr 03, 2008 7:01 am
- Has thanked: 0
- Been thanked: 4 times
- Contact:
Re: 3D physics/collision libraries that work on DC?
Why is that hack necesary? Including <alloca.h> does not work?
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: 3D physics/collision libraries that work on DC?
Also, replacing alloca() with malloc(), memalign(), or anything else of the like will leak all kinds of memory.
That said, as far as I know, <alloca.h> should work fine.
That said, as far as I know, <alloca.h> should work fine.
- PH3NOM
- DC Developer
- Posts: 576
- Joined: Fri Jun 18, 2010 9:29 pm
- Has thanked: 0
- Been thanked: 5 times
Re: 3D physics/collision libraries that work on DC?
Right, thanks for that correction.
The only change needed was to #include <alloca.h> on cpCollision.c.
Not sure if it will be that easy with other libs, but I guess that's a start
But my main point is that for optimized performance of a physics library, some of the code should be re-written to take advantage of the SH4's fast vector math instructions...
The only change needed was to #include <alloca.h> on cpCollision.c.
Not sure if it will be that easy with other libs, but I guess that's a start
But my main point is that for optimized performance of a physics library, some of the code should be re-written to take advantage of the SH4's fast vector math instructions...
- bbmario
- DCEmu Freak
- Posts: 88
- Joined: Wed Feb 05, 2014 5:58 am
- Has thanked: 9 times
- Been thanked: 3 times
Re: 3D physics/collision libraries that work on DC?
Does anyone know a port of Box2D? Also, regarding DC's math functions, is there an API doc on them?
Re: 3D physics/collision libraries that work on DC?
What kind of physics are you trying to do anyway, just collision or more? How many objects are we talking here?
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
- bbmario
- DCEmu Freak
- Posts: 88
- Joined: Wed Feb 05, 2014 5:58 am
- Has thanked: 9 times
- Been thanked: 3 times
Re: 3D physics/collision libraries that work on DC?
As of Box2D, i was just curious about it's port. Regarding Bullet and Tokamak, i'm looking for simple ball physics since i'm planning to work on a Marble Blast clone.