I am interested in making a Celestia (http://www.shatters.net/celestia/) like program. In addition to the general features found in Celestia, I would also like to add in the ability to simulate collisions between bodies, performing force based mesh deformations on the objects involved. (Asteroid impacts on silicate. Collisions between ultra large bodies and )
Ideally, I would like to do this in Java using jME3 (This will be a long term hobby project, and I would like to grow is alongside the jME3 source.). However, I am also looking at Ogre3D for this. I have taken a good, long look at various posts from Stackoverflow.com, Wikipedia and other benchmarks relating to Java and C++. In conclusion I am left with the following nagging doubt:
Java's speed when performing complex math and working with big numbers seems to be a lot worse than that of C++.
Given the potentially complex mathematics involved, would I be better of implementing this in Ogre3D? (I will have to honest and admit that the slew of features offered by Ogre3D is also acting in its favour.. but thats another topic?)
(I would also welcome any views and/or recommendations regarding using jME for this. )
Should I use Ogre3D
-
- Gnoblar
- Posts: 8
- Joined: Tue Mar 16, 2010 6:00 am
- Location: Sendai, Japan
Should I use Ogre3D
I would like to create a Celestia like program, with the addition of collision between bodies. I am however torn between using Java, which I have used until relatively recently, and using C++ which I have not used for several years. My biggest concern relates to the performance of Java vs C++ when performing complex math operations. I quoted the post I made on the jME forums below.
Life is just the belly-button lint of the universe.
- spacegaier
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 135
- Contact:
Re: Should I use Ogre3D
Well, let's put it like this: Ogre is capable of merely everything related to graphics (as long as you are capable of handling it). So no problem from this side.
AFAIK, there are also more graphical games using C++ than Java, but I guess this task could be managed by many languages...
AFAIK, there are also more graphical games using C++ than Java, but I guess this task could be managed by many languages...
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Gnoblar
- Posts: 8
- Joined: Tue Mar 16, 2010 6:00 am
- Location: Sendai, Japan
Re: Should I use Ogre3D
Yeah, jME could handle the graphics by itself fine. I am however worried about Java taking a big speed hit then C++ once I start using really big numbers. Java performance doesn't exactly shine when talking about trigonometrical function etc.spacegaier wrote:Well, let's put it like this: Ogre is capable of merely everything related to graphics (as long as you are capable of handling it). So no problem from this side.
AFAIK, there are also more graphical games using C++ than Java, but I guess this task could be managed by many languages...
All things said I am leaning towards Ogre ><;
Life is just the belly-button lint of the universe.
- wacom
- Gnome
- Posts: 350
- Joined: Sun Feb 10, 2008 2:07 pm
Re: Should I use Ogre3D
Perhaps JBullet would interest you then?elyzion wrote:I would like to create a Celestia like program, with the addition of collision between bodies.
-
- Gnoblar
- Posts: 8
- Joined: Tue Mar 16, 2010 6:00 am
- Location: Sendai, Japan
Re: Should I use Ogre3D
JBullet is the default physics engine for jME3, so if I use Java it is what I would be using
Life is just the belly-button lint of the universe.
- Moohasha
- Gnoll
- Posts: 672
- Joined: Fri Dec 07, 2007 7:37 pm
- x 8
Re: Should I use Ogre3D
Does java let you use vertex/pixel shaders? I don't know how details you want your graphics to be, but that may be a big consideration. Especially if you're concern is speed/performace, you can offload some calculations to the video card by letting a vertex shader handle them instead of doing them on the CPU. But I haven't messed a whole lot with shaders, so I don't really know what I'm talking about.
I think asking in the Ogre3D forums, you'll probably get a lot of people suggesting you use Ogre (or at least C++), which would be my recomendation. As spacegaier said, most high end games are written in C/C++ rather than Java, which suggests to me that it's better suited for the task.
I think asking in the Ogre3D forums, you'll probably get a lot of people suggesting you use Ogre (or at least C++), which would be my recomendation. As spacegaier said, most high end games are written in C/C++ rather than Java, which suggests to me that it's better suited for the task.
Black holes are where God divided by 0
-
- Gnoblar
- Posts: 8
- Joined: Tue Mar 16, 2010 6:00 am
- Location: Sendai, Japan
Re: Should I use Ogre3D
Trying Ogre3D for now. The Java engine I looked at does support shaders in glsl, as well as a slew of other features pretty much similar to many other game engines out there.
Look for me crying on the forums later when I actually try to DO something in C++ (・・;
Thanks for all the replies!
Look for me crying on the forums later when I actually try to DO something in C++ (・・;
Thanks for all the replies!
Life is just the belly-button lint of the universe.
- bibiteinfo
- Gremlin
- Posts: 197
- Joined: Wed Apr 12, 2006 2:48 pm
- Location: Montreal, Canada
-
- Gnoblar
- Posts: 8
- Joined: Tue Mar 16, 2010 6:00 am
- Location: Sendai, Japan
Re: Should I use Ogre3D
Using a Java wrapper for Ogre still comes down to native code getting called from the JVM. The Java code would still have to perform the math needed to calculate orbits etc. to be passed to the Ogre native library for rendering. This is the main point of my problem. I can't really see a way around this, short of coding the math intensive bits in C++ and calling it from Java. Given my current options, I am going with a native C++ application in Ogre for the time being.
**EDIT: Well.. Pending on the results of my discussion at the jME forums of course ><;
**EDIT: Well.. Pending on the results of my discussion at the jME forums of course ><;
Life is just the belly-button lint of the universe.
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
- Contact:
Re: Should I use Ogre3D
You could always use MOgre and C# if you prefer java type environments. The maths speed difference between c++ and c# is bugger all UNLESS you are an expert c++er. Not to mention you could write the whole thing in c#, get it DONE and profile any slow functions, convert just those to c++, call them from c# (easy with c style functions) and save yourself a lot of hassle and/or years of your life