Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (590)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JBox2D  (Read 5563 times)
0 Members and 1 Guest are viewing this topic.
Offline quixote_arg

Junior Devvie


Projects: 1


Jengibre


« Posted 2007-10-20 16:20:26 »

Hi!

We've released the first beta of JBox2D, a Java port of Erin Catto's Box2D

Check out some demos at http://jbox2d.sourceforge.net/, source code is hosted at http://www.sf.net/projects/jbox2d

Soon (technical problems!) we'll host the first jar release, in the meantime play with the demos and check out the source code

As usual, comments, suggestions et al are most welcomed
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2007-10-20 18:40:45 »

how does it compare to phys2d ?

Online kevglass

« JGO Spiffy Duke »


Medals: 195
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2007-10-20 20:59:51 »

Awesome stuff guys, just tried it out locally on my current game - very promising.

Box2D (not Lite) has a few new joints and compound shapes that I'm interested in. The really great feature thats been promised by Erin is continuous collision detection. If that goes in, gets ported to Java and proves to be performant enough I'm loving it! Smiley

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #3 - Posted 2007-10-21 05:29:38 »

nice job. However I am a bit concerned about the structure of the code. Looks very un-java (package names for instance). Good do with a refactor.
Of course the structure might be as it is to ease porting ?

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #4 - Posted 2007-10-21 11:16:30 »

Looks good but runs very slowly here (1-2fps). Is that because of unoptimised JBox2D code or because of Processing?

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline quixote_arg

Junior Devvie


Projects: 1


Jengibre


« Reply #5 - Posted 2007-10-21 14:34:03 »

it's an alpha/beta release, where the demos are working and that's it

we still need a lot of work in making it java-friendly, optimizations, etc

stay tuned!
Offline ewjordan

Junior Devvie





« Reply #6 - Posted 2008-03-30 08:31:50 »

Just wanted to bump this thread and take the opportunity to post a link to the latest JBox2d demos applet: http://www.jbox2d.org/v2demos/

I just finished up porting version 2.0 of Box2d, which now has continuous collision detection (turned on on a per-body basis, though everything is swept against static objects).  We're not quite at the release stage yet (mainly just working on documentation/cleanup/optimization now, as well as porting the rest of the examples), but anyone that's interested is encouraged to grab a recent build from our SVN repo at https://jbox2d.svn.sourceforge.net/svnroot/jbox2d.  A not-quite-as-recent .zip file is also available at http://jbox2d.svn.sourceforge.net/svnroot/jbox2d/trunk/JBox2d%2003-27-2008.zip, but that's not updated as often.

There's a Box2d Java thread at the Box2d forums (http://www.box2d.org/forum/viewforum.php?f=5), feel free to drop a line if you have problems or anything like that.  I'll post here as well when we officially release.

BTW, if you're getting low frame rates, it's a bit of both Processing and JBox2d at fault, Processing because I put it into full software rendering mode for best compatibility (Java2d mode was really causing problems on some computers, dropping frames and all that), which doesn't work very quickly with a 640x480 canvas and thousands of lines to draw, JBox2d because I haven't optimized this version at all yet (I know where most of the time is spent, though, so that will come - probably a factor of 2 improvement, if I had to guess).  The stress test examples aren't meant to run at 60 fps, I use those for optimization purposes, but most of the others should run at least usably on a recent computer (I get roughly 60 on all of them except the stress tests on my Macbook Pro 2.4 ghz).  Soon I'll get some OpenGL accelerated tests up so we can see what it's like with the hardware in control of the graphics.
Offline EgonOlsen
« Reply #7 - Posted 2008-03-30 09:43:30 »

The demo applet doesn't work:  Cry

1  
2  
3  
4  
5  
6  
7  
Exception in thread "Thread-15" java.lang.NoClassDefFoundError: javax/vecmath/Color3f
   at org.jbox2d.testbed.AbstractExample.<clinit>(Unknown Source)
   at org.jbox2d.testbed.TestbedMain.setup(Unknown Source)
   at processing.core.PApplet.handleDisplay(PApplet.java:1285)
   at processing.core.PGraphics.requestDisplay(PGraphics.java:680)
   at processing.core.PApplet.run(PApplet.java:1454)
   at java.lang.Thread.run(Thread.java:595)

Offline ewjordan

Junior Devvie





« Reply #8 - Posted 2008-03-30 10:21:46 »

Ah, crap.  I must have vecmath installed locally (I guess OS X does by default).  Well, I'll have to work this out tomorrow, this might take some debugging (my build script for whatever reason won't let me add vecmath.jar when it does its thing)...sorry about that!

Gotta get rid of that vecmath dependency anyways, since it's GPL and JBox2d is trying to be zlib-only - I guess this gives me a good excuse to make that a priority!


Nevermind, fixed it just now - took out the vecmath stuff (was just using Color3f as a holder anyways) and replaced it with my own code.  Sorry I missed that at first!

One thing I notice that still really disturbs me, the memory usage goes up and up if you keep reloading the applet...I suspect that means the previously loaded copies never unload (I also had to remove any static state variables or I discovered they never get reset when you reload - some searching shows that this is Not A Bug, but man, is that irritating and unexpected!).  Eventually I run out of heap space and the browser sometimes even crashes.  Does anyone know a way around that, or is it just another one of those things that make Java suck in the browser? (It also might be a Processing bug, I'm not sure - if Processing's internals hold on to a single static reference to my controller, that's going to leak the entire active heap right there)
Offline EgonOlsen
« Reply #9 - Posted 2008-03-30 13:54:22 »

Works fine now... Grin Great work, i like the demos.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ewjordan

Junior Devvie





« Reply #10 - Posted 2008-05-08 22:34:24 »

Just figured I'd post an update here - I just finished updating JBox2d to version 2.0.1 of Box2d.  Continuous collision detection is pretty stable now, and most things seem in line with the C++ engine.

JBox2d is released under the zlib license.

Bug reports/feature requests are best directed to this thread at the Box2d forums: http://www.box2d.org/forum/viewtopic.php?f=5&t=36

Some links:

- Demos (Note: this is still the 2.0.0 demo set, I'm still getting around to updating it to 2.0.1)
- Homepage (also not updated recently)
- SF page
- Snapshot .zip file of project
- SVN repo: http://jbox2d.svn.sourceforge.net/svnroot/jbox2d/trunk/
- Full .jar (1.2 MB, with Javadocs, source, examples) - note that this also depends on Processing's core.jar (LGPL license) in order to run the testbed
- Trimmed .jar (156 kb, library only), should have no external dependencies

Also, as a plug, my brothers (mostly) and I (a bit) are currently working on Pulpfizz, a Pulpcore/JBox2d integration under a BSD license that will hopefully turn into a full featured and easy way to make 2d physics based games, wrapping and simplifying the JBox2d API a bit and tuning it specifically for Pulpcore.  The project is still pretty young, it's only been in development for a few weeks, but amongst ourselves we're now doing a bi-weekly game making contest using the engine, so it's going to see a lot of development and use over the next months - if you're interested in using Pulpcore with JBox2d it's probably worth keeping an eye on, it will likely be the easiest way to do so once it's mature.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

trollwarrior1 (29 views)
2014-11-22 12:13:56

xFryIx (71 views)
2014-11-13 12:34:49

digdugdiggy (50 views)
2014-11-12 21:11:50

digdugdiggy (44 views)
2014-11-12 21:10:15

digdugdiggy (38 views)
2014-11-12 21:09:33

kovacsa (62 views)
2014-11-07 19:57:14

TehJavaDev (67 views)
2014-11-03 22:04:50

BurntPizza (64 views)
2014-11-03 18:54:52

moogie (80 views)
2014-11-03 06:22:04

CopyableCougar4 (80 views)
2014-11-01 23:36:41
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!