Box2D Forums

It is currently Sat May 25, 2013 1:30 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Apr 08, 2010 1:14 am 
Offline

Joined: Tue Dec 01, 2009 6:33 am
Posts: 15
box2D 2.1.0 Delphi translation is finished finally with some enhancements. In this version, I translated all stuff to Pascal code including controllers and convex-polygon decomposition. And I created two new controllers Tb2WindController and Tb2ExplosionController. Another enhancement is file UPhysics2DHelper.pas. This file provides three methods, BuildStaticBoundBox, BuildEdgeShapeCurve, BuildRope. With them you can easily create a bound box consisted of edge-shapes, ropes and terrain from curves.
New demos, Buoyancy Controller, Graviation Controller, Explosion, Rope In Wind, Terrain Box.

I create a new home for Delphi translation, http://code.google.com/p/box2d-delphi/

You can download source and an executable file from this svn.


Top
 Profile  
 
PostPosted: Thu Apr 22, 2010 1:50 pm 
Offline

Joined: Thu Apr 22, 2010 1:47 pm
Posts: 2
i have some bugs feedback for you, please contact me


Top
 Profile  
 
PostPosted: Sun Apr 25, 2010 12:28 am 
Offline

Joined: Thu Apr 22, 2010 1:47 pm
Posts: 2
Thanks a lot for nice delphi-port!! ;)


Top
 Profile  
 
PostPosted: Fri Jun 11, 2010 10:28 am 
Offline

Joined: Fri Jun 11, 2010 10:23 am
Posts: 1
:P Well Done! I Just Looking for a port to delphi, Thank You Very Much.


Top
 Profile  
 
PostPosted: Sun Aug 22, 2010 9:38 pm 
Offline

Joined: Mon Aug 16, 2010 11:09 am
Posts: 128
Thanks dude, very much appreciated.

The forum has a new board section, specially for Delphi ! ;) :)

Perhaps we can discuss changes to the Delphi port there.

I look forward to using the Delphi port a bit more ;) :)

I also have some idea's for stuff that I might want to change... like introducing some more properties here and there to make things easier... and perhaps a bit more powerfull... like removing/lifting some of the constraints... not yet sure if that's wise though... like polygon verteces count... but maybe I will just use many triangles instead and polygon array does seem to be used as a large copy structure... so might be wise to keep it small unless some special copy constructor is made which does it as efficiently as possible, which is probably possible.

I noticed how you left out all the "inherited Create" lines which are usually present in classes... I feel slightly not at ease with that... but as far as I understand it's an optimization ?

Also here and there classes seem to access private members of other classes, for example some classes that inherit from others.

These private members should probably be moved to a "protected section" this would allow the classes to be placed into seperate units.

One big unit might get on my nervous... because of scrolling issue's and such... but then again having many different units might also be a bit shitty... but at least easy to scroll. I would need some special custom versioning software if I want to add version numbers to the file names which I like to do if I get serious about modifieing the library.

Also what's up with the "ifdef" overloaded directives for the record operators like additions or whatever.. like vectors or something... it seems like Delphi 6/Delphi 2006 backwards compatibility support... the same seems to be done for "inlining"/ifdefs.

I think the Delphi 2007 compiler might have issue's if too many ifdefs are being used... it's just a hunch... I am not sure... but I would like to bring that to your attention... ofcourse compiler bugs are a poor excuse... but I kinda like 2007... these bugs could also still be present in 2010.

Delphi 7 doesn't even work that well anymore on windows xp x64 pro edition... not sure about windows vista/seven. None the less having support for Delphi 7 is still kinda nice in case some bugs pop-up in 2007 which delphi 7 doesn't have or can debug better... I have seen situations like that, it's rare though.

How much time did it cost you to translate cpp to delphi ? Like days, weeks, months ? Are there any bugs/problems you are aware of ?
Logging such bugs/problems in a special text section or so could be usefull... then we other Delphi programmers might take a look at it to see if it can be solved.
For now it seems you did a pretty nice job of converting it ! ;) :)

The testbed does have some bugs here and there... but those are just in the testbed me thinks... like arrays going out of bounds... or references being nil/access violations... that kind of thing...

If I do wanna contribute some changes to the library I will get in touch with you to see if you can maybe incorporate it into your subversion repository... so that it could become a joint effort of making the library a bit better... and very maybe/perhaps these could be further incorporated into a cpp version... but I doubt it.. since cpp doesn't have some of the delphi language features like properties ?! cpp also doesn't have easy (multi-dimensional dynamic) arrays like delphi has... but some custom cpp code could take care of that perhaps cpp templates but I don't like those since they hide a lot of code and are gimmicks ?! so probably just real code if I ever wanted to convert delphi's SetLength to cpp stuff ;)


Top
 Profile  
 
PostPosted: Wed Aug 25, 2010 10:20 am 
Offline

Joined: Tue Dec 01, 2009 6:33 am
Posts: 15
Yes, every Delphier is welcomed to join this translation work. I am also annoyed by so much ifdef and there is actually one more big deal about these ifdefs. I didn't know that operator overloading was slow than direct function call on Delphi compiler until I nearly finished the first version. So the code left as it was. The best way is not to use operator overloading in box2D kernel but allows user to use this new feature in their own codes. The present situation is that when user disables operator overloading, they must use Add(Vec1, Vec2) instead of Vec1 + Vec2 in their own unit. Maybe some day I will rewrite the kernel and only implements the algorithms using Add() but still provides Vec1 + Vec2 for users.


Top
 Profile  
 
PostPosted: Wed Jan 05, 2011 8:03 am 
Offline

Joined: Tue Jan 04, 2011 1:40 pm
Posts: 1
Hi!
Is it possible to make this delphi translation of Box2D run in spanish? How do I locate the display files?
I can do the translations myself (I have experience doing English to Spanish Translation), I just need to know which files I have to translate for all the menus and on screen text to be displayed in a different language.
Thank you!


Top
 Profile  
 
PostPosted: Sat Mar 19, 2011 8:47 am 
Offline

Joined: Tue Dec 01, 2009 6:33 am
Posts: 15
Hi Guillo, actually there is not such a translation file. I think English is OK for most people. If you want to translate the TestBed demo, just edit the dfm. There are also some simple texts in each test unit.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group