December 22, 2024, 03:45:12

Author Topic: Ship bounds penetration events?  (Read 11883 times)

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Ship bounds penetration events?
« on: August 03, 2011, 22:44:19 »
Nexus has a lot of limitations for things that are extremely frustrating for us on the BSG team. One particular problem we have is with missiles. By default, they operate like strikecraft. While normally that's kind of okay, they have drawbacks that make them annoying, such as flying away from ships when they're exploding or ONLY targeting the center-mass of a ship.

We're looking to change them into regular cannon type weapons like the railguns in order to fix this. However, flak defense systems are not able to target the particle projectiles. This means we have to use a shield on the battlestars. This creates more issues. I can't seem to stop the effect from playing, when the shield activates and deactivates, which is a showstopper. But for this purpose lets just say I fixed that. We still need a way for the flak effect to play so that the missiles look like they're being shot by it.

Do any of you know if events are kicked off when projectiles get close to a ship or penetrate it's collision sphere? Ultimately if the flak started firing once they got within a certain radius, that's ideal, so we can fake the autodistance firing we have right now.

What's more annoying is that this will cause yet another problem, even if we can pull it off. We'd have this flak "shield" effect that would be playing, then on top of that we'd still need real flak weapons, to fight off raiders. This would cause the flak effect to compound even further, which *could* affect performance, if it got too dense.

Crap like this really makes me consider switching to another engine >_<
« Last Edit: August 03, 2011, 22:46:19 by jstubbles »

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
Re: Ship bounds penetration events?
« Reply #1 on: August 03, 2011, 23:08:56 »
Short answer?
No. There are too many problems and it would be quite hard (if not impossible) to pull that off.
Unfortunately, I don't see what there's left to do but, well, suck it up.
For what is worth, I don't really think it's that much of an issue...

Long answer?
May be. But it won't involve shields. If you were my employer and asked me to make such an effect with particle weapons, I would do something like this:
-Upon impact, a function is issued that it will decide whether or not to apply the damage made by the projectile.
-Probably have a "dummy" missile, very small with no trail and have it be fired automatically when one of the missiles are fired to activate the flak (you'd need to devote a weapon slot for that, I'm afraid)

But, like I said, it may even end up looking worse. I can make a script for it, if you want, though.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Ship bounds penetration events?
« Reply #2 on: August 03, 2011, 23:31:47 »
Yeah, that wouldn't work at all how we'd like. Seems like more of a problem than not. It's just so annoying that the engine can't do the simplest of things, while being robust in other areas.

I can personally live with the missiles only targeting the center-mass of a ship, but we really need to find a solution to why the missiles fly away from exploding ships. It's just plain ridiculous and we can't have that. For one, it signs a death sentence for the ship those missiles were targeting. All of the missiles fly away and then come back in one big ball of missiles, which the flak can't defend against and usually results in instant death (or close to).

Is it even possible to prevent them from flying away from a ship explosion? Or at the very least, have all missiles selfdestruct instead? I realize that for multiplayer, both with cause issues with balance. If they are allowed to fly away from explosions, it will give an unfair advantage to basestars, while if we destroy all missiles, it will be an advantage to the other team.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
Re: Ship bounds penetration events?
« Reply #3 on: August 04, 2011, 00:17:47 »
That... that could be done. I'll see what I can do.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
Re: Ship bounds penetration events?
« Reply #4 on: August 04, 2011, 01:57:46 »
First approach: Having the closest missiles destroyed.

Code: [Select]
RULE event Exploding
condition !e.ship:boat
:action
SelectEx(s.this:boat & !s.this:bomber & distance(s.this,e.ship) < e.ship:radius * 4,
Terminate(s.this);
);
:end
END
Play arround with the number "4", see if you find one suiting. Just insert that piece of code
let's say, underneath this in your missions (you may want to create a global include file):

Code: [Select]
MACHINE "Director"

STATE IntroMovie

RULE event In
:action
:end
END

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Ship bounds penetration events?
« Reply #5 on: August 04, 2011, 07:01:05 »
Thanks Mularac - I'll give that a shot. If I have issues I'll point our scripter here. I really don't understand this stuff myself.

**edit
Okay, so this does work to some extent, but there are still issues. We'd have to play it like 2-3 times at least, to clear the missiles out. It plays right when the ship starts to explode, but exploding takes like 4-5 seconds. During that time, more and more missiles are still coming out, flying away from the explosion, then converging into a single cluster again.

Also, won't this kill vipers and raiders as well?

One more thing I hate about "missiles" - they fire in the direction the ship is moving! SO STUPID. So when a basestar is moving away from a battlestar, the missiles fire in front of the basestar, turn (the engines turn off while doing so, dumb!) THEN then retarget the battlestar and go after it. GRRRRRrrrrrr >_<
« Last Edit: August 04, 2011, 08:59:02 by jstubbles »

Offline Lt.Brandon

  • Crewman
  • *
  • Posts: 39
  • Karma: 0
  • FIRE ZE MISSILEZ!
    • View Profile
    • War of The Damned MODDB Page
Re: Ship bounds penetration events?
« Reply #6 on: August 04, 2011, 09:01:28 »

Also, won't this kill vipers and raiders as well?


Yeah it'll blow up anything launched like a missile or fighter.

Offline Mularac

  • Lieutenant
  • ***
  • Posts: 531
  • Karma: 11
    • View Profile
Re: Ship bounds penetration events?
« Reply #7 on: August 04, 2011, 17:22:49 »
Quote
Also, won't this kill vipers and raiders as well?

Actually... no it won't.
But yes, you are right.

Also, for what is worth, the missile effect and code in nexus is meant for torpedoes, intelligent autolock crafts that have a level of maneurability.
I'll try and think of something better.

Offline jstubbles

  • Petty Officer
  • **
  • Posts: 169
  • Karma: 2
    • View Profile
    • http://www.ivassago.com
Re: Ship bounds penetration events?
« Reply #8 on: August 05, 2011, 23:08:23 »
I'm not sure there will be much of a solution to the problem. Without the source code it's just too restricting on things we want to achieve. We'll just have to deal with it.

Offline Arparso

  • Administrator
  • Lieutenant
  • *****
  • Posts: 558
  • Karma: 14
  • I can see you...
    • View Profile
    • http://arparso.de/nexus
Re: Ship bounds penetration events?
« Reply #9 on: August 16, 2011, 15:15:03 »
Yeah, I sadly agree.

Nexus' engine does what it's intended to do pretty well, but extending or modifying some core behaviour is very tricky if not downright impossible at times. :(

Don't see any alternative, though, except even older games like Homeworld 2. Well, unless you like having to code your very own space strategy game with UDK, Unity or whatever...
« Last Edit: August 16, 2011, 15:16:46 by Arparso »