Author Topic: Turret updates?  (Read 5135 times)

0 Members and 1 Guest are viewing this topic.

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Well, how much more processing time would it take to check polygons instead of bounding boxes?

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
If it could cause too high performance loss, wouldn't be possible then, as other proposed, to have different FOVs for the different axis, and leave to the modders to don't make turrets firing to the hull of its own ship?

 

Offline Flipside

  • əp!sd!l£
  • 212
It would only need to do it for the polygons of the ship that is actually firing, and would only need to be checked once per shot, so it wouldn't matter what way round the normals are then. Maybe of you only checked for collisions more than 10m away from the firepoint or the like?

Flipside :D

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I say go with altering the pof data regardless. Making it so the turret can't shoot through the ship is nice and all but it sounds like it's going to involve a fair overhead for very little gain compared with just getting the modders to do it when the ship is made.
 
Here's an idea. Instead of putting all this extra code into FS2 we (or more specifically the SCP) implement the 3 axis fov settings. Then we figure out how to get the turrets to figure out what is part of the ship and what isn't but don't put it into FS2. Instead we put it into Aurora and PCS who have the processor cycles to spare.

Why calculate the acceptable firing angles every time a turret fires when you can calculate them once when building the pof and be done with it? Both PCS and Aurora could probably figure out the firing arcs at least as well as FS2 could.

*apologises in advance to Kazan and Bob for increasing  their workload* :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline diamondgeezer

Obviously I'd be quite happy to rejig my ship's firing points if that was what was required to fix the shoot-through-your-own-hull bug. And eventually someone will get bored and take the time to retrofit the old V ships.

 

Offline Flipside

  • əp!sd!l£
  • 212
I find myself agreeing with karjorama, I don't think there is much excuse for creating a turret that cannot fire under the three axis system. Also, this give the wonderful option of narrow plane strip weapons ;)

Flipside :D

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
What if we had the engine calculate the invalid firing angles (not each individual angle, just the angle intervals for each of the three axis) in mission load for every ship used in the mission?  You'd only have to check if the turret is aimed within one of those intervals then.

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
You mean as part of the POF data parsing?  Sounds like it could work, but if the firepoint moves (rotational turrets) I'm not sure how accurate it would be.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
It's like I said in DG's thread, make it so you can put n degrees on the x, y, and/or z axis around the normal in the pof data, and this wouldn't be such a problem.

If the normal was -1x, and the fov for x was 90, and for y was 180, it's make a thin rectangular arc around the turret that would be allowed to fire in, so you could make it not hit it's own hull.

Am I wrong?
Freelance Modeler | Amateur Artist

 

Offline Flipside

  • əp!sd!l£
  • 212
It's a good idea, and, the area of non-firing would be the same, regardless of what the turret does,  but it would still require a matrice of some kind to hold 'obstruction' info for every turret on a ship. Things could get complex at times, besides this still would not solve the firing point inside the hull problem alas :(
Actually I think it WOULD work with only normals that face towards it, after all, any obstruction etc has got to have polygons facing the fire point, it's impossible not to if I remember rightly. If anyone can design a ship where you can have a point moving out from the centre and hitting two polygons in a row which have their normals facing away from the direction of travel, then I will admit I am wrong, but as far as I can imagine it, this is true.

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
mmm I was thinking.. yes, the multiple fov sounds good, but actually we non coders have absolutely no idea about how the thing work
I mean: how does the game decide if a ship is in turrett's range(=you are inside its FOV) and therefore you are a valid target?
I have no idea, but imagine it calculate the firing area as a cone (i mean, mathematically) to decide if a point (target's position) is inside this area or not.
Now imagine what will happen with 2 FOVs for the two axis....
This is something coders knows better than us btw.

I have another possible solution if both multiple FOVs and occluded sight check can't work: we may call it "special turrett"
Even in the more complex ships the turretts that could have this kind of problems are really few, so, what about using a predefined targettable area? It would be pure pain in the ass if we have to do this for each turrett, but since it would be necessary very rarely, it wouldn't be much a problem. I'm talking about  making a model of the firing area wich will be stored in the pofdata and used by the game to define where a turrett can fire or not. Since it will be a mesh, it could probably cause some performance hit too, but considering that it wouldn't be required very often, it may work, the point is if it would be useful  or possible to have the firing range defined by a mesh

 

Offline Sandwich

  • Got Screen?
  • 213
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Brainzipper
Quote
Originally posted by Flipside
Actually I think it WOULD work with only normals that face towards it, after all, any obstruction etc has got to have polygons facing the fire point, it's impossible not to if I remember rightly. If anyone can design a ship where you can have a point moving out from the centre and hitting two polygons in a row which have their normals facing away from the direction of travel, then I will admit I am wrong, but as far as I can imagine it, this is true.


I still think this is the best idea, as it would allow a theoretical turret positioned below an arch to shoot to either side, but not to shoot at the arch.

Would it be easier to render a single frame from the POV of the turret about to fire at a low(er) resolution (300x300 or something) with no textures or lighting, and limited to the current ship? that way it would be a white-on-black render - essentially a "mask" where the black areas would be valid angles to shoot at.
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
Quote
Originally posted by KARMA
I'm talking about  making a model of the firing area wich will be stored in the pofdata and used by the game to define where a turrett can fire or not. Since it will be a mesh, it could probably cause some performance hit too, but considering that it wouldn't be required very often, it may work, the point is if it would be useful  or possible to have the firing range defined by a mesh

about predefining the firing area of some occluded turretts with a specific mesh, wich I don't know if it could be practicable/efficent/useful or not, it would probably be possible to detect in a easy way if a ship is in the FOV or not by using some kind of collision detection: if a ship pass through the bounding box once, it means she is inside the firing area; if a ship pass two times, it means she was inside the firing area but now exited. Note that the mesh don't need to be very complex, a deformed octagonal pyramid (14 triangles) for example should be enough

  

Offline TrashMan

  • T-tower Avenger. srsly.
  • 213
  • God-Emperor of your kind!
    • Minecraft
    • FLAMES OF WAR
Why not just have a long, long cube object placed on the turret barrel. it would move with the barrel.
If that object intersects any face of the capship the turret can't fire. I don't know if it could be done like this, nor just how resource demanding it would be - it's just a tought!
Nobody dies as a virgin - the life ****s us all!

You're a wrongularity from which no right can escape!