Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,251 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Space physics #250856
02/10/09 10:23
02/10/09 10:23
Joined: Jan 2009
Posts: 34
D
DrunkenPirate Offline OP
Newbie
DrunkenPirate  Offline OP
Newbie
D

Joined: Jan 2009
Posts: 34
Hello,
I am creating a space game and I plan on accelerating the ship via the built in physics system. Here are a few of my questions about the physics system that could not be answered by reading the manual or searching the forum.

1. Mass, etc in space: Should I set my spaceships mass to 0 in space? I think not because it still has mass, just not weight. (Because no gravity) Friction theoretically should be set to 0 but I think you need it in a game otherwise controlling would be difficult. What do you think?

2. Thrust: I'm using
Code:
phent_addforcelocal(ship,shipAccel,vector(-10,0,0));

to apply thrust to my ship. Now my question is, should I be executing the rotational thrusts in that same addforce? Or should I put in different addforce's to simulate an jet firing at the wing tip to turn the ship, etc.

I would also like to just get your ideas for how I should be accelerating this ship throughout space as well as rotating the ship how it would actually be done in space.

Re: Space physics [Re: DrunkenPirate] #251755
02/14/09 18:36
02/14/09 18:36
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Do not set the mass to 0. That would make it a fixed entity. Mass is mass, which is not weight, so set mass to your approximated value. Make sure you set friction and gravity to zero though. Since there will be no global gravity and no air friction.

Use the force+torque options to carefully rotate the ship. If you want it to be more arcade like then either A) Don't use physics B) Add a somewhat complex controlling system that adds and subtracts torque and velocity as necessary to balance the ship.


xXxGuitar511
- Programmer
Re: Space physics [Re: xXxGuitar511] #251774
02/14/09 19:36
02/14/09 19:36
Joined: Jul 2007
Posts: 424
EUROPE
maslone1 Offline
Senior Member
maslone1  Offline
Senior Member

Joined: Jul 2007
Posts: 424
EUROPE
Yeah,... if you want to create a simulation you have to use mass!!!.

Take a look in to

2_D Spaceshooter

In this little program i also use mass.
I also created two planets. One planet with gravity and one with anti-gravity. Maybe you'll find what you are looking for.

here u can watch my 3d version of the spaceshooter:





cheers
Marcel

Last edited by maslone1; 02/14/09 19:43.

A8c, Blender, FlStudio, Unity3d
Re: Space physics [Re: maslone1] #271465
06/13/09 11:09
06/13/09 11:09
Joined: Apr 2009
Posts: 39
T
TrQuocAn Offline
Newbie
TrQuocAn  Offline
Newbie
T

Joined: Apr 2009
Posts: 39
oh ! It's very nice but I can't down load the demo !
Any one would help me ?


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