Welcome, Guest. Please login or register. - Did you miss your activation email?

Login with username, password and session length
FOR MORE INFORMATION ABOUT OUR GAMES, VISIT: www.cateia.com
 
Pages: [1]
  Print  
Author Topic: Collision detection and physics  (Read 3327 times)
Krešimir Špes
Lead Programmer
Administrator
The Father
*
Posts: 353



View Profile WWW
« on: March 01, 2008, 08:32:47 PM »

Due to simplicity and infrequency of ship-ship collisions, I've decided upon the following physics model:

* All collision is based on circles. each ship has a hull circle and a shield circle (could be changed to ellipse if needed in the future). Disruptors and torpedoes explode in the otuer shield circle if that shield has power or within the hull circle otherwise.

ship-ship collisions collide using hull circles.

physics is based on a simple newtonian model, featuring velocity and acceleration, both angular and normal.
when a collision occours, damage is distribute and ships bounce in the opposite direction, based on mass, angle of impact etc.

I believe that such a physics model is sufficent for tnz2. I tried using a physics library but it didn't work quite well.
Logged

Krešimir Špes
Lead Programmer
Major Diarr
Manager
*****
Posts: 75


View Profile
« Reply #1 on: March 02, 2008, 10:07:56 PM »

It does sound sufficient, however I would make two changes. 1) Shields collide with shields and hulls and vice versa. 2) The collision edge definitely needs to be an ellipse.
Logged
Krešimir Špes
Lead Programmer
Administrator
The Father
*
Posts: 353



View Profile WWW
« Reply #2 on: March 03, 2008, 09:45:11 AM »

yeah, I think it's going to have to be an ellipse.
Logged

Krešimir Špes
Lead Programmer
Major Diarr
Manager
*****
Posts: 75


View Profile
« Reply #3 on: March 04, 2008, 04:31:26 AM »

What about shield to shield and shield to hull impacts? We've seen shield to shield impact before and we know that shields stop matter because of that big piece of Romulan hull hitting the E-E's shield and bouncing off without damaging the hull. I won't get into how much damage impacts should do to hulls and shields, that's a separate issue.
Logged
Krešimir Špes
Lead Programmer
Administrator
The Father
*
Posts: 353



View Profile WWW
« Reply #4 on: March 04, 2008, 06:02:30 PM »

hmm. dunno. you have to keep in mind that tnz2 is an arcade game and it's primary goal is fun. it's gameplay doesn't have to be strictly defined by scenarios seen in XYZ star trek episode.
Logged

Krešimir Špes
Lead Programmer
Major Diarr
Manager
*****
Posts: 75


View Profile
« Reply #5 on: March 04, 2008, 11:42:20 PM »

In that regard, If impacts are too powerful, I can see them taking away from the fun because the game would be about jockeying for position to ram, with all other attacks being secondary. I rather shield impacts on shields do little damage and impacts on hulls do a load of damage. So, if your shields are down and you get rammed by a shielded ship, you're dead and the other guy is going to be fine. That way, there is a really cool extra attack open but it doesn't take anything away from and doesn't have anything over the conventional attacks that the game should really be about. The way to handle that would be to just give shields lot of HP and hulls little HP, there would be exceptions like the Defiant which might have almost as much hull HP as some weaker shields.
Logged
Krešimir Špes
Lead Programmer
Administrator
The Father
*
Posts: 353



View Profile WWW
« Reply #6 on: March 05, 2008, 08:27:57 AM »

huh, good idea, thanks :)
Logged

Krešimir Špes
Lead Programmer
Ivan Vučica
Programmer
Administrator
Manager
*
Gender: Male
Posts: 90

Gravatar


View Profile WWW
« Reply #7 on: March 29, 2008, 02:12:15 PM »

Quote from: "kspes"
Due to simplicity and infrequency of ship-ship collisions, I've decided upon the following physics model:

* All collision is based on circles. each ship has a hull circle and a shield circle (could be changed to ellipse if needed in the future). Disruptors and torpedoes explode in the otuer shield circle if that shield has power or within the hull circle otherwise.

ship-ship collisions collide using hull circles.

physics is based on a simple newtonian model, featuring velocity and acceleration, both angular and normal.
when a collision occours, damage is distribute and ships bounce in the opposite direction, based on mass, angle of impact etc.

I believe that such a physics model is sufficent for tnz2. I tried using a physics library but it didn't work quite well.
What happened in the meantime? Didn't we decide to go back to OpenNewton or w/e is that lib called?
Logged

Ivan Vučica
get leet eat wheat
Krešimir Špes
Lead Programmer
Administrator
The Father
*
Posts: 353



View Profile WWW
« Reply #8 on: March 29, 2008, 06:21:58 PM »

oh yeah, that's an old post. We're back to using Newton Game Dynamics again.
Logged

Krešimir Špes
Lead Programmer
Pages: [1]
  Print  
 
Jump to:  


Cateia Games



Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC
Enterprise design by Bloc