Page 2 of 2

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 3:29 pm
by mandoman
You guys seem to have the spinning part nailed, which is really cool. Now, can a way be made to allow a ship to fire either continuously, or at will, while spinning at a high rate of speed? I know it can't now, but I guess that was my suggestion. I understand if it can't, as there seem to be some things that just won't work, no matter what. :)

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 3:39 pm
by cim
mandoman wrote:
You guys seem to have the spinning part nailed, which is really cool. Now, can a way be made to allow a ship to fire either continuously, or at will, while spinning at a high rate of speed?
Yes, but the scripting required is extremely complex. (So no examples of this bit...)

In outline:
- the ship will fire its forward weapon if its main entity is pointed at its primary hostile target and it is in range.
- when the ship fires its forward weapon it will also fire all subentity-mounted weapons. Conventionally these are mounted facing forward, but this is not a requirement.

So to get it to fire continuously while spinning:
- have a small main entity which is kept pointed at its primary target.
- have a larger subentity completely surrounding this. This is the main hull. This subentity's orientation is constantly changed by script to reflect the direction the ship is actually travelling. Because the main entity isn't going to be pointed in the direction of travel, ship movement will have to be done entirely by script.
- add four laser subentities, one for each laser, pointed appropriately. Ensure that these are turned to match any rotation of the hull subentity
- do not add any flashers or exhausts.

You'd have to basically reimplement most of Oolite's combat movement and turning code in a frame callback, and there'd be quaternions everywhere, but it is theoretically possible. Well, at least until the lasers overheat...

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 4:02 pm
by mandoman
Hmmmm, as usual, I've bit off more than I can chew. This ship will sit on the back burner for a while, I think. Thanks cim.

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 4:17 pm
by Fatleaf
cim wrote:
Well, at least until the lasers overheat...
But if you become a test pilot you end up with a piece of equipment that is a powerful laser that doesn't overheat 8)

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 4:33 pm
by mandoman
Fatleaf wrote:
cim wrote:
Well, at least until the lasers overheat...
But if you become a test pilot you end up with a piece of equipment that is a powerful laser that doesn't overheat 8)
Whoa, how to I sign up for that gig? :D

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 4:41 pm
by Fatleaf
mandoman wrote:
Whoa, how to I sign up for that gig? :D
Sign up to join this motley dishevelled bunch and some cool oxpe'rs turn up from time to time asking for stuff to be tested. Some things they want tested to see what can be done but have no intention of releasing it. You of course get to keep the nifty piece of kit if you promise not to share it about. The commander who made this one I have, released a toned down version of it.

Re: Attack/Combat Modes

Posted: Sat Jul 21, 2012 5:15 pm
by mandoman
Fatleaf wrote:
mandoman wrote:
Whoa, how to I sign up for that gig? :D
Sign up to join this motley dishevelled bunch and some cool oxpe'rs turn up from time to time asking for stuff to be tested. Some things they want tested to see what can be done but have no intention of releasing it. You of course get to keep the nifty piece of kit if you promise not to share it about. The commander who made this one I have, released a toned down version of it.
A truly notable group of commanders. I wish I had time, but I'm so busy trying to get my own ships up to snuff, that I probably wouldn't be worth much as a test pilot. :)