Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
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  
  Porting from 2D to 3D  (Read 1587 times)
0 Members and 1 Guest are viewing this topic.
Offline tacticat

Junior Newbie





« Posted 2007-05-02 17:36:48 »

Hi,
I'm the architect of Tacticat http://www.tacticat.com, a 2D sim for sailing races written in java.
The sim is a technical training tool, intended for racers training for the olympics, altough it has naturally evolved during a year to a full multi-user interactive game.
A server-client all-java, the servers today located in Dallas, London and Brisbane to cover sailors from all over the world. The client side a java application via webstart.

We have decided to go 3D. We want to keep all the communications layer, physics engine and rules engine (sailing rules i mean), and we have decided that today 2D clients will play concurrently wit the future 3D clients, in the same 'universe'.

After studying the available possibilities we have decided to give Java 3D a try, the first proto seems OK. I'd like to know of other people having done something similar. The recommended NOT-TO-DO and the important things not to forget.

Any ideas, recommendations or whatever are welcome.
And if you like sailing you can try the sim (it is free of course).

Amando Estela
Tacticat,
Offline neozerabbit

Junior Newbie





« Reply #1 - Posted 2007-05-08 19:13:31 »

Hi !

There will be a working to do waht you want but it is totally possible with Java 3D
Take also a look on jogl which is very efficient in 3D.
Offline tacticat

Junior Newbie





« Reply #2 - Posted 2007-05-09 05:55:54 »

Take also a look on jogl which is very efficient in 3D.

How important are the performance gains using JOGL?
With Java3D I do have scenograph functionality, that's good.
What about the 'universality' of the application?, I mean I need it to be runnable by a wide variety of users and platforms, most of the current users of Tacticat run the 2D sim with small computers and low-end graphic cards... JOGL or Java3D then? or is it the same?.

I'd rather not start studying JOGL if I can avoid it. Just understanding Java3D took me a while...

aestela.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Ninja


Medals: 55



« Reply #3 - Posted 2007-05-09 09:10:31 »

Stick to Java3d for this kind of application. JOGL is a pure OpenGL binding, so there is no scenegraph included and deployment is slightly more complex (there is a webstart extension entry to deploy the needed jar and native libraries, so it is not that problematic). If you need the latest in graphics (e.g. shaders), you might have to use JOGL, but if you are satisfied with the visual possibilities, Java3D is good enough.

Mathias - I Know What [you] Did Last Summer!
Offline tacticat

Junior Newbie





« Reply #4 - Posted 2007-05-09 17:15:45 »

if you are satisfied with the visual possibilities, Java3D is good enough.
Very satisfied. It's a big jump from the current 2D sim.

We're starting the porting soon. Right now we have tested all techniques we will need:
 - loading a 3DS model for the boats
 - moving the boats using the current physics engine
 - moving the camera(s), we haven't yet decided how many we will give to the user. A external camera, aft and up of their boat and maybe 4 views (bow, aft, starboard and port) from the boat.
 - displaying text with the boats and HUD-like
 - capturig the mouse and key events that will be forwarded to the existing code

One thing we haven't solved yet is that when we go 3D it makes sense to put waves, both in the display and in the physics engine. The physics has no secret and we can easily model the boat behaviour but what about the display part?.

How do we create the waves? We would have the function y=f(x,z,t), we know for every point in the water what is its height at any time. How can we create it in terms of background, objects, shapes or whatever? And move it? (waves move, and get bigger, and disappear!)

Anyone with a recommendation??
That would help a lot.

A.
Offline cylab

JGO Ninja


Medals: 55



« Reply #5 - Posted 2007-05-09 20:12:04 »

You could create a regular grid representation of the water surface:

o Compute the initial vertices of this grid incorporating the height values via your y=f(x,z,t=0)
o Create a TriangleArray using the computed vertices as coordnate array
o Create a Shape3D with the TriangleArray as geometry
o start your game loop
   - Recompute the vertices of the grid using y=f(x,z,dt*n)
   - Update the coordinates of your TriangleArray with this data

This should basically work. Start with a rough grid resolution (e.g. 32x32) and see how the performance is going. There might be more performant ways to implement this, but I am no java3d pro...

Mathias - I Know What [you] Did Last Summer!
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.

rwatson462 (28 views)
2014-12-15 09:26:44

Mr.CodeIt (19 views)
2014-12-14 19:50:38

BurntPizza (35 views)
2014-12-09 22:41:13

BurntPizza (70 views)
2014-12-08 04:46:31

JscottyBieshaar (32 views)
2014-12-05 12:39:02

SHC (44 views)
2014-12-03 16:27:13

CopyableCougar4 (40 views)
2014-11-29 21:32:03

toopeicgaming1999 (108 views)
2014-11-26 15:22:04

toopeicgaming1999 (94 views)
2014-11-26 15:20:36

toopeicgaming1999 (29 views)
2014-11-26 15:20:08
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!