Getting wrapped :/

there are tons of free libraries out there being used by gamedevelopers, from noobs to pros… c/c++ and other native language developers that is :frowning:

physics libs like novodex/phyx physics sdk, newton game dynamics, opcode. soundlibs. ai libs. hundreds of smaller opensource libs. what the hell, how about directx(thinking about the upcoming windows vista problems) :wink:



what do you think should happen to make more of these libs avaliable for us java geeks?

  • as today, the few inclined makes wrappers through swig or manually. wrappers that are only somewhat up to date, crashes now and then or are hard to use.(with a few exceptions)
  • a new central open source project focused on providing and updating a subnet of projects with wrappers. making sure new libs are covered and kept up to date etc
  • get sun or some big java endorcer to take wrapping under its wings, letting us gamedevs out of the wrapping hell
  • is jni the best technique possible for native communication or should more effort be put into that?
  • throw in the towel and move over to c or port jme to c-sharp? :slight_smile:
  • etc etc



    more opinions?
throw in the towel and move over to c or port jme to c-sharp?


For such a thought you should be flogged! :-p

Personally I think there should be a pretty wizard that you can go through to create a wrapper and it does all the connecting and prettying up for you. ;)  I know there are a few APIs that go almost that far, but they seem to still make you do a lot of legwork to make it happen.  Unfortunately, the number of Java developers that are also competent C/C++ developers are few and far between.  It is on them that our trouble lies and on them that we have to rely.

In short, I have no solution. :-p

darkfrog

I think that java should be able to call native fuctions with out wrappers.

Well I think instead of having to write games myself I should be able to just think about what I want and my computer will do it for me…  :wink:



darkfrog

Gamalution … or is that what happened to the Incredible Hulk?

Badmi said:

I think that java should be able to call native fuctions with out wrappers.

This is nearly possible as you can completely generate the needed wrappers with swig. Unfortunately a c(++) library is still unusable, mostly because of lacking data type conversion and pointers...

My favorite solution would be compiling the c(++) library to java byte code. And this is even possible! There are papers out there about it, and some people claim they have done it. But I have never seen a working tool for it :(

not very hard either. ported a big chess-engine i made a few years ago to c++ and c# to see performance differences etc. the port to c# almost only involved making all method names starting with uppercase, then it worked…the big issue would be the lwjgl stuff…



but, lets forget this thread now and focus on taking java and opengl to new heights :wink:

My favorite solution would be compiling the c(++) library to java byte code. And this is even possible! There are papers out there about it, and some people claim they have done it. But I have never seen a working tool for it


that would be an interesting thing! gotta surf around a bit on it :)

One paper that matches exacly:

found this: http://www.axiomsol.com/



anyone know of something similar that is open source?

C2J translator - translate C programs to Java programs. Software development services.



Whatever "under GNU license" may refer to…

well there is c2j from novosoft. http://tech.novosoft-us.com/product_c2j.jsp unfortunaly it was last updated 2001 and you may have to ask them to get the code as i did not find it anywhere on the site, only win32 binaries are there, but maybe i’m just stupid.

given it’s age and focus on java 1.1 it’s most likely not an option, but maybe you know a team of great programmers with too much freetime on there hand and can persuade them to pick it up again. :smiley:



edit: maybe i should read the new posts when the board gives me this nice warning :slight_smile:

Sounds good - but then we would still need a c++ to ansi c compiler, for most libraries :expressionless:

ok, sounds like it's not an option yet then…i'll start porting jme to c# tonight, see you all at the jMESharp forum!

Hey, hey, hey! Don't you dare!

I'm willing to propose some more possibilities, just to keep you from turning to the dark side, MrCoder!



One is Open Source: http://ovid.tigris.org/Ephedra/

The other is commercial: http://www.jazillian.com/



[Edit] Oh and there is some example code from O'Reilly that seems to include the code of "C2J" (I don't know whether it's the one posted earlier) and the abandoned project "C2J++": http://examples.oreilly.com/javacook2/javacooksrc2.jar

thanks, that'll stop me for at least a few hours s :wink:

MrCoder said:

ok, sounds like it's not an option yet then...i'll start porting jme to c# tonight, see you all at the jMESharp forum!  }:-@ :D


Bite your tongue, mister.  :)

We will likely be hitting this issue at work as we integrate into various existing company libraries.  I'm not hugely worried about it, but I'll let you know if we hit any huge roadblocks.

integrate through swig?

I did not get any of the non-commercial tools for converting c++ to java to work properly for a larger library (ODE). So if you mean you will have to do that at work… good luck!  (Probably it will be much better if you can take a commercial one, though)

ok, sounds like it's not an option yet then...i'll start porting jme to c# tonight, see you all at the jMESharp forum!  evil grin


Shouldn't it be #ME?