www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Blaze 2.0

reply Mason Green <mason.green gmail.com> writes:
Blaze 2.0, a 2D game physics engine based on Box2D, is finally here.  The
testBed examples have been completely overhauled with Hybrid and Dog!

Project page:
http://www.dsource.org/projects/blaze/wiki/WikiStart

Testbed examples (win32 binary):
http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

I've taken a stab at writing a `getting started` section on the wiki, with
clear (hopefully) instructions on how to compile. Comments, suggestions,
contributions, and bug reports are appreciated in the dsource forum.
Mar 16 2009
next sibling parent reply Clay Smith <clayasaurus gmail.com> writes:
Mason Green wrote:
 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here.  The
testBed examples have been completely overhauled with Hybrid and Dog!
 
 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart
 
 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip
 
 I've taken a stab at writing a `getting started` section on the wiki, with
clear (hopefully) instructions on how to compile. Comments, suggestions,
contributions, and bug reports are appreciated in the dsource forum.

Congrats! Some very fine physics examples there in the demo. They are all working pretty well here. ~ Clay
Mar 16 2009
parent Clay Smith <clayasaurus gmail.com> writes:
Clay Smith wrote:
 Mason Green wrote:
 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here.  
 The testBed examples have been completely overhauled with Hybrid and Dog!

 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart

 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

 I've taken a stab at writing a `getting started` section on the wiki, 
 with clear (hopefully) instructions on how to compile. Comments, 
 suggestions, contributions, and bug reports are appreciated in the 
 dsource forum.

Congrats! Some very fine physics examples there in the demo. They are all working pretty well here. ~ Clay

The sandbox features found in the mode (Spawn new objects, create joints between objects) are great as well. :)
Mar 16 2009
prev sibling next sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
(I am sorry, the online forum has posted this email in the main D newsgroup).
Stewart Gordon, all the older Blaze demos have worked for me, but this time it
gives me:

...
Registering widget: Angle
Registering widget: SceneView
derelict.util.exception.SharedLibLoadException: Failed to load shared library
devil.dll

And stops.
The DevIL.dll is present beside the exe.

Bye,
bearophile
Mar 16 2009
next sibling parent reply Mason Green <mason.green gmail.com> writes:
bearophile Wrote:
 And stops.
 The DevIL.dll is present beside the exe.

Maybe you have an older devil.dll somewhere on your system? It works on both my work and home Windows machine... If you're really interested, you can always compile it!
Mar 16 2009
parent reply bearophile <bearophileHUGS lycos.com> writes:
Mason Green:
 Maybe you have an older devil.dll somewhere on your system?

Nope.
It works on both my work and home Windows machine...<

Good.
 If you're really interested, you can always compile it!<

I may try later. Bye, bearophile
Mar 17 2009
parent Kenny B <funisher gmail.com> writes:
I can reproduce this problem as well... I'm running wine-1.1.17 in gentoo.
Figuring it was a capital name issue, I tried renaming, and it gave the same
error. Then, I tried downloading the latest devil.dll, and got a different
error...

bearophile wrote:
 Mason Green:
 Maybe you have an older devil.dll somewhere on your system?

Nope.
 It works on both my work and home Windows machine...<

Good.
 If you're really interested, you can always compile it!<

I may try later. Bye, bearophile

Mar 17 2009
prev sibling parent reply Chad J <gamerchad __spam.is.bad__gmail.com> writes:
bearophile wrote:
 (I am sorry, the online forum has posted this email in the main D newsgroup).
 Stewart Gordon, all the older Blaze demos have worked for me, but this time it
gives me:
 
 ...
 Registering widget: Angle
 Registering widget: SceneView
 derelict.util.exception.SharedLibLoadException: Failed to load shared library
devil.dll
 
 And stops.
 The DevIL.dll is present beside the exe.
 
 Bye,
 bearophile

I had the same issue. I didn't have any older blaze demos laying around. This was on a fairly fresh install of Windows XP 64.
Mar 16 2009
parent Mason Green <mason.green gmail.com> writes:
Chad J wrote:
 I had the same issue.  I didn't have any older blaze demos laying
 around.  This was on a fairly fresh install of Windows XP 64.

I would recommend compiling it on your machine, with your own system's drivers.
Mar 17 2009
prev sibling next sibling parent reply Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 16, 2009 at 3:44 PM, Mason Green <mason.green gmail.com> wrote:
 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here. =A0T=

 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart

 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

 I've taken a stab at writing a `getting started` section on the wiki, wit=

contributions, and bug reports are appreciated in the dsource forum.

I get really strange performance. It runs.. choppy. Not slow framerate, just really choppy, in a nondeterministic manner. The Hybrid controls are also incredibly sensitive - one button press sets them to absurdly large/small values, usually freezing/crashing the app. My computer should be able to more than handle this. It's a dual-core Athlon X2 4600+.
Mar 16 2009
next sibling parent Mason Green <mason.green gmail.com> writes:
Jarrett Billingsley Wrote:
 I get really strange performance.  It runs.. choppy.  Not slow
 framerate, just really choppy, in a nondeterministic manner. 

Don't know what to tell you.... it even runs fast for me on a Linux virtual machine (vmware Fusion) running on my MacBook Pro. Please compile it yourself and let me know if you have the same behavior. Are you using wine?
Mar 16 2009
prev sibling parent reply Tom S <h3r3tic remove.mat.uni.torun.pl> writes:
Jarrett Billingsley wrote:
 On Mon, Mar 16, 2009 at 3:44 PM, Mason Green <mason.green gmail.com> wrote:
 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here.  The
testBed examples have been completely overhauled with Hybrid and Dog!

 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart

 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

 I've taken a stab at writing a `getting started` section on the wiki, with
clear (hopefully) instructions on how to compile. Comments, suggestions,
contributions, and bug reports are appreciated in the dsource forum.

I get really strange performance. It runs.. choppy. Not slow framerate, just really choppy, in a nondeterministic manner. The Hybrid controls are also incredibly sensitive - one button press sets them to absurdly large/small values, usually freezing/crashing the app. My computer should be able to more than handle this. It's a dual-core Athlon X2 4600+.

They seem to work just fine on my machine and it's a single-core 1.7GHz Centrino laptop with a Mobility Radeon 7500 GPU and 1.5GB of RAM... The heavier tests (Compound shapes, Domino tower) seem choppy, but I don't get any weird Widget behavior. The performance could be improved, cause my simple profiling attempts seem to indicate that Blaze is abusing the GC a bit. Overall, great job, Mason! :D The demo is really fun and I'm proud that my crazy GUI lib can be a part of it :) -- Tomasz Stachowiak http://h3.team0xf.com/ h3/h3r3tic on #D freenode
Mar 16 2009
parent reply Mason Green <mason.green gmail.com> writes:
Tom S wrote:
  The performance could be improved, cause
 my simple profiling attempts seem to indicate that Blaze is abusing the 
 GC a bit.

Yes, I still need to dig a bit more into profiling. Any suggestions, or contributions :-), for improving GC performance would be much appreciated!
Mar 16 2009
parent reply Mason Green <mason.green gmail.com> writes:
Brian wrote:
 I don't know how different Blaze 2.0 is from the version i had, but I'll 
 take a look when I get a chance and see if I can be of any help.  I'm 
 using Box2D for the time being because there were still GC issues, but 
 I'm very excited about "smoothed partial hydrodynamics" and non-convex 
 models/partitioning.

Blaze 2.0 is 90% Box2D, using all the same algorithms for the CPU intensive tasks. All I did was add smoothed particle dynamics, and force generators from the Motor2 engine. The new version is much, much different from Blaze 1.0. Motor2 has a few other features that I may eventually incorporate, but as I mentioned, for all practical purposes Blaze 2.0 is pretty much a straight port of Box2D. Performance should be on par with the Java and Action Script variants of Box2D, aside from their more efficient garbage collectors. If there are D specific tricks I can use to speed up the engine, I would definitely appreciate the help and/or contribution.
Mar 17 2009
parent Mason Green <mason.green gmail.com> writes:
Brian wrote:
 That sounds good. I'll see if I can do a nice 3 way comparison between 
 box2d and blaze 1.0/2.0 and also see if I can find any speedups. I don't 
 have much time to spare unfortunately.

Great, if you can find the spare time it would be greatly appreciated :-) I think a comparison with box2d would be very enlightening... Actually, a performance analysis of box2D vs. jBox2D vs. Blaze 2.0 would be quite useful. It may prove helpful for other folks who are considering porting c++ or Java applications to D. Would anyone consider a set of memory management best practices a good idea?
Mar 19 2009
prev sibling next sibling parent Bill Baxter <wbaxter gmail.com> writes:
On Tue, Mar 17, 2009 at 8:38 AM, Jarrett Billingsley
<jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 3:44 PM, Mason Green <mason.green gmail.com> wrot=

 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here. =


!
 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart

 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

 I've taken a stab at writing a `getting started` section on the wiki, w=


, contributions, and bug reports are appreciated in the dsource forum.

I get really strange performance. =A0It runs.. choppy. =A0Not slow framerate, just really choppy, in a nondeterministic manner. =A0The Hybrid controls are also incredibly sensitive - one button press sets them to absurdly large/small values, usually freezing/crashing the app. My computer should be able to more than handle this. =A0It's a dual-core Athlon X2 4600+.

The video card you have, and which drivers you are using for it, might be more relevant factors than the speed of your CPU. --bb
Mar 16 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 16, 2009 at 9:04 PM, Mason Green <mason.green gmail.com> wrote:
 Jarrett Billingsley Wrote:
 I get really strange performance. =A0It runs.. choppy. =A0Not slow
 framerate, just really choppy, in a nondeterministic manner.

Don't know what to tell you.... it even runs fast for me on a Linux virtu=

 Please compile it yourself and let me know if you have the same behavior.=

I'm running it in XP. I'll try compiling..
Mar 16 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 16, 2009 at 9:24 PM, Bill Baxter <wbaxter gmail.com> wrote:
 The video card you have, and which drivers you are using for it, might
 be more relevant factors than the speed of your CPU.

GeForce 8600 512MB, version 181.22 of the official drivers.
Mar 16 2009
prev sibling next sibling parent Bill Baxter <wbaxter gmail.com> writes:
On Tue, Mar 17, 2009 at 10:33 AM, Jarrett Billingsley
<jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 9:24 PM, Bill Baxter <wbaxter gmail.com> wrote:
 The video card you have, and which drivers you are using for it, might
 be more relevant factors than the speed of your CPU.

GeForce 8600 512MB, version 181.22 of the official drivers.

Sounds like that should be capable. If you're motivated enough you could try installing the 182.08 drivers to see if that fixes it. --bb
Mar 16 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 16, 2009 at 7:38 PM, Jarrett Billingsley
<jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 3:44 PM, Mason Green <mason.green gmail.com> wrot=

 Blaze 2.0, a 2D game physics engine based on Box2D, is finally here. =A0=


 Project page:
 http://www.dsource.org/projects/blaze/wiki/WikiStart

 Testbed examples (win32 binary):
 http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip

 I've taken a stab at writing a `getting started` section on the wiki, wi=


contributions, and bug reports are appreciated in the dsource forum.

I get really strange performance. =A0It runs.. choppy. =A0Not slow framerate, just really choppy, in a nondeterministic manner. =A0The Hybrid controls are also incredibly sensitive - one button press sets them to absurdly large/small values, usually freezing/crashing the app. My computer should be able to more than handle this. =A0It's a dual-core Athlon X2 4600+.

I've tried messing with all my driver's 3D settings to no effect. The framerate is like.. like it's running at 60fps, and then it'll just skip a bunch of frames. Like it suddenly processed way faster than the screen was able to update. It does this constantly - just switching between normal speed and super-fast a few times a second at seemingly random intervals.
Mar 16 2009
prev sibling next sibling parent reply Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Mon, Mar 16, 2009 at 9:56 PM, Bill Baxter <wbaxter gmail.com> wrote:
 On Tue, Mar 17, 2009 at 10:33 AM, Jarrett Billingsley
 <jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 9:24 PM, Bill Baxter <wbaxter gmail.com> wrote:
 The video card you have, and which drivers you are using for it, might
 be more relevant factors than the speed of your CPU.

GeForce 8600 512MB, version 181.22 of the official drivers.

Sounds like that should be capable. =A0If you're motivated enough you could try installing the 182.08 drivers to see if that fixes it.

Ah, that fixed it! Good idea, I didn't consider it since I only just updated my drivers a couple weeks ago. Figures.
Mar 16 2009
parent Mason Green <mason.green gmail.com> writes:
Jarrett Billingsley wrote:
 Ah, that fixed it!  Good idea, I didn't consider it since I only just
 updated my drivers a couple weeks ago.  Figures.

Good to hear it wasn't a graphics card conflict with Hybrid!
Mar 17 2009
prev sibling next sibling parent Bill Baxter <wbaxter gmail.com> writes:
On Tue, Mar 17, 2009 at 12:18 PM, Jarrett Billingsley
<jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 9:56 PM, Bill Baxter <wbaxter gmail.com> wrote:
 On Tue, Mar 17, 2009 at 10:33 AM, Jarrett Billingsley
 <jarrett.billingsley gmail.com> wrote:
 On Mon, Mar 16, 2009 at 9:24 PM, Bill Baxter <wbaxter gmail.com> wrote:
 The video card you have, and which drivers you are using for it, might
 be more relevant factors than the speed of your CPU.

GeForce 8600 512MB, version 181.22 of the official drivers.

Sounds like that should be capable. =A0If you're motivated enough you could try installing the 182.08 drivers to see if that fixes it.

Ah, that fixed it! =A0Good idea, I didn't consider it since I only just updated my drivers a couple weeks ago. =A0Figures.

I wasted a few hours last week trying to debug a mysterious performance problem. Finally I installed some new drivers out of frustration, and suddenly the performance problem was gone. So the experience was fresh on my mind. --bb
Mar 16 2009
prev sibling next sibling parent Brian <digitalmars brianguertin.com> writes:
On Mon, 16 Mar 2009 22:56:50 -0400, Mason Green wrote:

 Tom S wrote:
   The performance could be improved, cause
 my simple profiling attempts seem to indicate that Blaze is abusing the
 GC a bit.

Yes, I still need to dig a bit more into profiling. Any suggestions, or contributions :-), for improving GC performance would be much appreciated!

I had GC issues with the old blaze as well, after some profiling i found some unnecessary allocations and .dups that I removed for a nice speedup. Before i fixed those spots, the GC would get so beat up that it would just crash after about 8 seconds of collisions. I don't know how different Blaze 2.0 is from the version i had, but I'll take a look when I get a chance and see if I can be of any help. I'm using Box2D for the time being because there were still GC issues, but I'm very excited about "smoothed partial hydrodynamics" and non-convex models/partitioning.
Mar 16 2009
prev sibling next sibling parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Tue, Mar 17, 2009 at 6:54 PM, Mason Green <mason.green gmail.com> wrote:
 Brian wrote:
 I don't know how different Blaze 2.0 is from the version i had, but I'll
 take a look when I get a chance and see if I can be of any help. =A0I'm =


 Box2D for the time being because there were still GC issues, but I'm ver=


 excited about "smoothed partial hydrodynamics" and non-convex
 models/partitioning.

Blaze 2.0 is 90% Box2D, using all the same algorithms for the CPU intensi=

 tasks. =A0All I did was add smoothed particle dynamics, and force generat=

 from the Motor2 engine. The new version is much, much different from Blaz=

 1.0.

 Motor2 has a few other features that I may eventually incorporate, but as=

 mentioned, for all practical purposes Blaze 2.0 is pretty much a straight
 port of Box2D.

 Performance should be on par with the Java and Action Script variants of
 Box2D, aside from their more efficient garbage collectors. If there are D
 specific tricks I can use to speed up the engine, I would definitely
 appreciate the help and/or contribution.

Using value types where possible would probably help. Porting the SOA from the C++ version of Box2D would probably also give a tremendous speedup (and fewer GC pauses), though I don't know what effects that would have on the API. The way it is now is really noticeably GC-bound. On some of the more complex testbed scenes (like the compound bodies test), there's a noticeable pause every two seconds or so.
Mar 17 2009
prev sibling parent Brian <digitalmars brianguertin.com> writes:
On Tue, 17 Mar 2009 18:54:23 -0400, Mason Green wrote:

 Brian wrote:
 I don't know how different Blaze 2.0 is from the version i had, but
 I'll take a look when I get a chance and see if I can be of any help. 
 I'm using Box2D for the time being because there were still GC issues,
 but I'm very excited about "smoothed partial hydrodynamics" and
 non-convex models/partitioning.

Blaze 2.0 is 90% Box2D, using all the same algorithms for the CPU intensive tasks. All I did was add smoothed particle dynamics, and force generators from the Motor2 engine. The new version is much, much different from Blaze 1.0. Motor2 has a few other features that I may eventually incorporate, but as I mentioned, for all practical purposes Blaze 2.0 is pretty much a straight port of Box2D. Performance should be on par with the Java and Action Script variants of Box2D, aside from their more efficient garbage collectors. If there are D specific tricks I can use to speed up the engine, I would definitely appreciate the help and/or contribution.

That sounds good. I'll see if I can do a nice 3 way comparison between box2d and blaze 1.0/2.0 and also see if I can find any speedups. I don't have much time to spare unfortunately.
Mar 18 2009