Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Petra, AndrewAMD, Quad, VoroneTZ, 1 invisible), 488 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Ship Physics: How would you tackle it? #392292
01/21/12 09:53
01/21/12 09:53
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline OP
Expert
Rondidon  Offline OP
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Hello guys,

I`m facing the task of programming a driving physics system for small swimming ships (car ferrys). I`m not sure whether I should use PhysX for this or program it "from scratch" by myself.

How would you tackle this intend? Which advantages do you see in using PhysX for this? (collision system, swim physics, stability and bugs)

Thanks for sharing your thoughts. laugh



Re: Ship Physics: How would you tackle it? [Re: Rondidon] #392345
01/21/12 20:17
01/21/12 20:17
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline OP
Expert
Rondidon  Offline OP
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
No ideas?

Re: Ship Physics: How would you tackle it? [Re: Rondidon] #392347
01/21/12 20:31
01/21/12 20:31
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
probably using c_move and then adding inertia and "height waving" for the ship would do the trick


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Ship Physics: How would you tackle it? [Re: painkiller] #392350
01/21/12 20:39
01/21/12 20:39
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline OP
Expert
Rondidon  Offline OP
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Okay, that makes sense. But what is about collisions (especially with the riverside and while docking)?

Re: Ship Physics: How would you tackle it? [Re: Rondidon] #392354
01/21/12 20:48
01/21/12 20:48
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
As c_move only supports OBB (and I probably wouldn't use physX in this situation), I suggest you write your own collision and movement system yourself. Because your ship only stays at sea level, you only have to perform 2D calculations.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Ship Physics: How would you tackle it? [Re: Superku] #392355
01/21/12 20:54
01/21/12 20:54
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline OP
Expert
Rondidon  Offline OP
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Quote:
and I probably wouldn't use physX in this situation

What is the biggest disadvantage of PhysX? The performance?

Re: Ship Physics: How would you tackle it? [Re: Rondidon] #392358
01/21/12 21:09
01/21/12 21:09
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Another possibility is to use car.c system with var tcar_hover = 1; FLAG1.
Do this and take a look on the knights_on_wheels.c sample, maybe it helps.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: Ship Physics: How would you tackle it? [Re: rojart] #392365
01/21/12 21:44
01/21/12 21:44
Joined: Dec 2003
Posts: 1,225
germany
gri Offline
Serious User
gri  Offline
Serious User

Joined: Dec 2003
Posts: 1,225
germany
one of my sideprojects handles ship stuff too...

pirateship simulation...the reason why I purchased 3DGS 10 years ago.

But I spend to less brainticks for this project.

maybe you have a solution already for that. But are you intressted on a code moving your units with the ship?
Not only moving ahead .... rotating too and tilt and roll.
'gri


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Re: Ship Physics: How would you tackle it? [Re: gri] #392454
01/22/12 19:45
01/22/12 19:45
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
PhysX doesn't support ocean-physics. It supports particle fluids, but they are not designed for such big volumes of water. Thus, you can't use a native PhysX feature for that particular task. Though, NVidia is working on such a feature, which would be again for PhysX 3.x, which is not support by the current Gamestudio plugin - you would have to write a completely new one.

I was asked for this lately, too. My answer was since the premise was that Gamestudio is the engine for the project, to write a fishtank simulation (like this), based on heightfields and transfer the dynamics to a terrain. In Skyrim, Bethesda implemented a very basic version of that for pools of water to render a normalmap or something to simulate dynamic rings of water, which appear when the player walks through the pool. In that case they do just normalmapping, but for ocean physics you need a real deformed mesh in my oppinion, so, it is worth it.

Together with a scene description in 2D (like Superku proposed) and a description where ships are and what (oriented) shape they have, this could lead to a very nice water simulation (if multithreaded, it could be also not so CPU heavy as one might think, given that the user has multicore CPU which is nowadays standard).

Together with a cool water shader, you could achieve a very nice water simulation.

But this drives only the water simulation. The ship simulation can be done with force fields, which is in fact a PhysX feature, though, not enabled in the PhysX plugin. As far as I know, Slin works with PhysX forcefields for the very exact same problem and if you ask him, he might commit that to the repository of the open source PhysX plugin on SourceForge.

Last edited by HeelX; 01/22/12 19:47.
Re: Ship Physics: How would you tackle it? [Re: HeelX] #392482
01/23/12 10:18
01/23/12 10:18
Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Rondidon Offline OP
Expert
Rondidon  Offline OP
Expert

Joined: Aug 2002
Posts: 2,183
Germany, BaW�
Interesting! Thanks a lot for sharing your ideas (especially to HeelX)! That helped me a lot and I see somewhat clearer now.

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1