Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (650)
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 1638 times)
0 Members and 1 Guest are viewing this topic.
Offline Trounce

Junior Newbie

Java games rock!

« Posted 2005-03-11 10: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

Offline darkprophet

Senior Devvie

Go Go Gadget Arms

« Reply #1 - Posted 2005-03-11 12: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!)


Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Trounce

Junior Newbie

Java games rock!

« Reply #2 - Posted 2005-03-11 12: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-12 23: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.

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.


Offline Falken

Senior Newbie

biggidy bong

« Reply #4 - Posted 2005-03-13 12: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 12: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 18: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 Devvie

Go Go Gadget Arms

« Reply #7 - Posted 2005-03-13 19: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.


Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline Trounce

Junior Newbie

Java games rock!

« Reply #8 - Posted 2005-03-13 21: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.

Jesse (16 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (42 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (20 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!