Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (686)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (758)
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 1851 times)
0 Members and 1 Guest are viewing this topic.
Offline tacticat

Junior Newbie

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

I'm the architect of Tacticat, 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
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...

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

JGO Wizard

Medals: 135

« 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.

Offline cylab

JGO Wizard

Medals: 135

« 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.

roseslayer (474 views)
2016-08-06 11:43:29

roseslayer (430 views)
2016-08-06 09:43:11

xTheGamerCodes (507 views)
2016-08-04 15:40:59

xTheGamerCodes (500 views)
2016-08-04 15:40:24

orrenravid (848 views)
2016-07-16 03:57:23

theagentd (925 views)
2016-07-11 14:28:54

Hydroque (1021 views)
2016-07-06 05:56:57

Hydroque (1017 views)
2016-07-03 08:52:54

GrandCastle (832 views)
2016-07-01 09:13:47

GrandCastle (640 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42 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!