Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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  
  Okay, Give it to me straight, is this possible? :D  (Read 1414 times)
0 Members and 1 Guest are viewing this topic.
Offline Trounce

Junior Newbie




Java games rock!


« Posted 2005-03-11 11:04:15 »

I'm a moderately experienced game programmer whose written text games, games using DirectDraw, multiplayer internet games using Direct3D, and recently some fun physics based games using Newton's physics engine.

Physics are a blast! ...and not my strong point.

I'm starting another game project from scratch using JSR-184. It's basically a stripped down version of Java 3D (if I recall correctly) neither of which I have any experience with. JSR-184 (m3g? Java 3D for mobiles?) is a specification for 3D on limited handheld devices.

I want to create a game using realistic physics and JSR-184. The problem is... there are no native binaries available for the devices that run JSR-184. They themselves are only running a stripped down version of Java -- J2ME.

Does that mean I can't get ODEJava to work with JSR-184? Are the native .dlls absolutely mandatory? I don't need ODEJava to manupulate the screen, only the update the object's locations and whatnot. JSR-184 is suppose to be very similar to Java 3D which there is already a binding for.

I have a gut feeling that this is all fruitless. There is no way I can write my own physics engine (yuck!) and I have a bad feeling that a Java ODE wrapper absolutely must need native support.

Last, but not least, this is going to be a lot of fun if it works. I really enjoy having to work with limited hardware. If you're interested in this, let me know, let's see if we can work something out. Smiley

Trounce
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #1 - Posted 2005-03-11 13:20:28 »

Odejava is just a binding to ODE, ODE is the actual physics engine. So in short, Odejava does require the natives to run properly.

There was much talk about making Odejava Java only, but i dont know what happened to that...

Guess your stuck with making one on your own. That or finding a physics for J2ME (probably costs you an arm and a leg!)

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Trounce

Junior Newbie




Java games rock!


« Reply #2 - Posted 2005-03-11 13:46:07 »

I'd have a better chance of turning lead into gold before I'd be able to write a physics engine. I can handle the simple things. Most games use some form of physics, but the real fun stuff requires all kinds of scary math concepts.

What about... looking at the ODE sources and making a 'light' version? At it's core it's all math right? It's just a bunch of equations?

I think you're right about physics for J2ME. That would be valuable. Maybe more valuable than any commercial game ever developed from it. Smiley

I'm up for the challenge if anyone else is.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2005-03-13 00:59:09 »

ODE is pretty greedy on system requirements in addition to being native code.  It uses the stack heavily and performs many floating point calculations per second (some devices such as the PocketPC apparently only emulate floating point arithmetic.

I think what you need is a lightweight pure java physics engine as has been suggested.

Quote
What about... looking at the ODE sources and making a 'light' version? At it's core it's all math right? It's just a bunch of equations?  


It's certainly possible to look ad ODE and learn how a physics engine works.  I would suggest a very good understading of physics and dynamics engines before tackling such a project though.

Will.

Offline Falken

Senior Newbie




biggidy bong


« Reply #4 - Posted 2005-03-13 13:27:35 »

So are you developing the game for a limited handheld device using J2ME?   If you are, then it will be impossible to use ODEJava with JSR-184.  But I do agree that a light version of ODE in pure Java is certainly possible.  Many of the current devices aren't really powerful enough to cope with the number of computations, but they are getting faster day by day.

I've heard rumours that some companies are considering whether to embed a physics API in their J2ME devices.  But even if that was to go ahead now, it would take year or two before anything becomes of it.  Eventually it will surely happen, but there is currently very little on the horizon.

A pure Java version of ODE would be a very cool piece of technology to have.
Offline Trounce

Junior Newbie




Java games rock!


« Reply #5 - Posted 2005-03-13 13:46:59 »

Yep, using J2ME.

I've gone ahead with plan B: Look through an open source physics engine and try to gut it / re-code it in pure Java for use on J2ME.

Many physics engines have loads of features that just aren't needed for a specific game. I think that if I only use the features that are applicable to the game, it might be possible. I figured that any device that can use JSR-184 should be powerful enough to simulate limited physics.

...that's the theroy. Smiley

Of course all physics engines use floating point math which would be a problem for current devices. I'm going to try it anyway.

It will probably be too slow, but... maybe not?
Offline Falken

Senior Newbie




biggidy bong


« Reply #6 - Posted 2005-03-13 19:28:16 »

It's certainly worth a shot.

I wouldn't worry so much about floating point. I'm sure that the situation will improve soon and, even if it doesn't, you could release your code as open-source and somebody is bound to convert it to fixed-point.  I believe there is a strong demand for a J2ME physics engine.

However I am concerned about the fact you might not be able to retrieve the transformed data from a JSR-184 scenegraph.  I am not familiar with combining physics engines and scenegraphs, so bare with me here.  In JSR-184 you can create a scenegraph, rotate things about a few times and then you have no idea where anything is.  You cannot retrieve much data from it, you can only render to the screen.  So would you need 2 copies of the data?  One copy in the scenegraph (that you cannot access) and another copy for calculating collision intersections.  Both would have to be transformed independently, causing further computations, and both would be consuming valuable heap.  Is this the case? and can it be avoided?
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #7 - Posted 2005-03-13 20:23:38 »

The same is with ODE Smiley

GeomTriMesh will require you pass it an array of vertices and the indices. This will be stored in ode somewhere...Two copies of data, both dont talk to each other.

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Trounce

Junior Newbie




Java games rock!


« Reply #8 - Posted 2005-03-13 22:37:53 »

I didn't even think of that. I haven't used JSR-184 in any depth what so ever. I just assumed it would be similar to DirectX and allow you access to vertex and matrix data.

I think there would be two systems in place. One virtual for the physics side, and one visual for the game's models. The physics engine would take care of all collisions and the creation of primatives. Once the physics engine has updated, it would just send the physical object's matrix to the 3D model handled by JSR-184 which should then animate realistically.

This is going to be very difficult.  :-/

I have that loathing feeling that I might be biting off way more than I can chew. Smiley
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.

xsi3rr4x (12 views)
2014-04-15 18:08:23

BurntPizza (10 views)
2014-04-15 03:46:01

UprightPath (24 views)
2014-04-14 17:39:50

UprightPath (10 views)
2014-04-14 17:35:47

Porlus (27 views)
2014-04-14 15:48:38

tom_mai78101 (49 views)
2014-04-10 04:04:31

BurntPizza (107 views)
2014-04-08 23:06:04

tom_mai78101 (207 views)
2014-04-05 13:34:39

trollwarrior1 (176 views)
2014-04-04 12:06:45

CJLetsGame (182 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!