-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADR - Ship collision #5
Comments
Since we have yet to implement any kind of ship mass and all ships are identical, it may make sense to start with an extremely rudimentary bounce mechanic. And, as far as I know, the velocity mechanic at present is that the ship always moves in the direction that it is heading (there is no thrust/vector mechanic at present). ProposalOne simple and kludgy option would be to calculate some kind of collision vector between the two ships, rotate each of them at some fraction of that vector, instantly move them a proportional distance from one another at the point of impact, leave their current velocities, and be done. NoteAnother question is whether or not a physical collision should cause damage to either ship. In this early stage, it could be cute to make a collision cause damage. This could make for an interesting gameplay mechanic in itself when players are at low HP. However, as of right now, you cannot see opponent HP. Visibility of opponent stats is, in and of itself, a design decision to be made. |
+1 that it should cause damage. And I agree that the gameplay mechanic will be interesting and add a little more depth. We might try to based the damage amount on the vector alignments and velocity (head on does more damage than glance off side). Opponent damage status is a tough one, a few ideas:
|
From a live discussion:
|
ADR Context / Overview
SRT is not using real Godot physics at present and is simply implementing KinematicBody2D. We are using only MoveAndCollide, with the result being simply that the ships kind of grind past one another.
Some form of actual collision mechanics needs to be implemented.
Currently all ships have the same maximum speed and max health and they always travel in the direction that the nose is pointing.
Decision
Examples:
A head-on collision where one ship is stopped and the other ship is traveling at max speed would do 50% damage to both ships.
A collision where one ship is moving "up" at max speed and one ship is moving "left" (t-bone) at max speed would do 50% damage to both ships, because the effective "head on" force is is 1x max -- only one of the ships hit the other at full-speed head-on.
A "glancing" collision where both ships are moving at max speed but they are 179deg oriented towards one another would cause a small fraction of damage to both ships because the effective "head on" velocity is very low.
When ships collide they should both be moved by the collision. Each ship should be immediately rotated in some way relative to their original directions of travel, and then they should be translated some distance in that new direction proportional to their original rate of travel.
Rationale
When things collide, they should take damage.
When non-perfectly-shaped objects collide, they move a bit.
Status
Accepted
Consequences
Implementing the damage without the "bounce"/movement will potentially have a weird effect because Godot tends to "grind" these objects against one another. So they would end up having tons of collisions which would probably have the wrong effect.
Also, if the ships aren't sufficiently rotated and moved away from one another, there is risk that the new travel path will re-collide the ships, which we probably don't want.
Authors
@RoddieKieley
@dudash
Luke Dary
Kaliq Ray
@thoraxe
The text was updated successfully, but these errors were encountered: