Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Projectile Scaling  (Read 3405 times)

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Projectile Scaling
« on: August 19, 2012, 05:36:36 PM »

Request a variable like "scaleMult" and "scaleDuration" in the projectile definition; it would cause the projectile, after being created, to scale up or down to a new target scale over the specified duration.

For example
  "scaleMult": 0.5,
  "scaleDuration": 1,
would cause the projectile to be scaled down to be half as big after one second had passed from its time of creation.
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Projectile Scaling
« Reply #1 on: August 19, 2012, 05:40:59 PM »

Yay, my idea :P, i pretty much meant, start off small, get bigger, and allow you to change whether damage is greater over distance or less over distance
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Gaizokubanou

  • Captain
  • ****
  • Posts: 347
    • View Profile
Re: Projectile Scaling
« Reply #2 on: August 19, 2012, 05:44:46 PM »

Does projectile size have any relation to its hit detection or is this purely visual?  Either way it would be cool but I'm sincerely curious because if it's the first, then that could be very interesting.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: Projectile Scaling
« Reply #3 on: August 19, 2012, 06:04:42 PM »

Can you give me an example of what you'd use this for? Are you thinking of this as a purely a purely visual parameter, or with mechanics to match it?
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Projectile Scaling
« Reply #4 on: August 19, 2012, 06:07:30 PM »

If we could get the scale during an OnHit() type of callin, we could do everything but the visual side of scaling the quad over time :)

Would also like to be able to do color shifts, maybe 3 RGBA over projectile life, that would add lots of visual options too :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Projectile Scaling
« Reply #5 on: August 20, 2012, 03:36:29 AM »

Can you give me an example of what you'd use this for? Are you thinking of this as a purely a purely visual parameter, or with mechanics to match it?
It would allow for creation of wave blasts, Think about a swimming pool wave machine, a wave starts off thin and powerful and gradually expands outwards, losing its effect over distance, but you could add an option so that either it increases damage over distance, has the same damage or decreases damage over distance, sorry for the long reply I was asleep
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Projectile Scaling
« Reply #6 on: August 20, 2012, 03:38:43 AM »

Does projectile size have any relation to its hit detection or is this purely visual?  Either way it would be cool but I'm sincerely curious because if it's the first, then that could be very interesting.
Yes, it's rather hard to explain this to, hit detection for a wave of energy would work by if it hits a ship, whatever part of the wave that hits it would disappear, but the rest keep going, like a nuclear bomb
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Trylobot

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1170
    • View Profile
    • Github profile
Re: Projectile Scaling
« Reply #7 on: August 21, 2012, 03:34:27 PM »

This would be used for any type of projectile that doesn't model some kind of solid, or cohesive mass. It would let us primarily do "gaseous" or "liquid"/"wave" type projectiles. It would have the mechanic of altering the hitbox for the projectile (which would imply altering its AI-perceived threat level, and make it accordingly more/less difficult to avoid). And to add sprog's suggestion would just need to include a "damageMult" that would also be applied over the duration.

Can you give me an example of what you'd use this for? Are you thinking of this as a purely a purely visual parameter, or with mechanics to match it?
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Projectile Scaling
« Reply #8 on: August 21, 2012, 03:37:28 PM »

This would be used for any type of projectile that doesn't model some kind of solid, or cohesive mass. It would let us primarily do "gaseous" or "liquid"/"wave" type projectiles. It would have the mechanic of altering the hitbox for the projectile (which would imply altering its AI-perceived threat level, and make it accordingly more/less difficult to avoid). And to add sprog's suggestion would just need to include a "damageMult" that would also be applied over the duration.

Can you give me an example of what you'd use this for? Are you thinking of this as a purely a purely visual parameter, or with mechanics to match it?


Exactly, For instance, You could (In theory) Create your own "fake" nebulae, using the Impact number as a way to apply friction to ships, hehe :D
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7174
  • Harpoon Affectionado
    • View Profile
Re: Projectile Scaling
« Reply #9 on: August 21, 2012, 07:32:12 PM »

A fake nebula projector would actually be a pretty interesting support weapon! Being able to deny the speed bonus to large ships could really help protect a flank or carriers.
Logged

Sproginator

  • Admiral
  • *****
  • Posts: 3592
  • Forum Ancient
    • View Profile
Re: Projectile Scaling
« Reply #10 on: August 22, 2012, 12:05:02 AM »

A fake nebula projector would actually be a pretty interesting support weapon! Being able to deny the speed bonus to large ships could really help protect a flank or carriers.
Indeed, you see, this feature would offer amazing new tactics and an epic modding opportunity
Logged
A person who's never made a mistake, never tried anything new
- Albert Einstein

As long as we don't quit, we haven't failed
- Jamie Fristrom (Programmer for Spiderman2 & Lead Developer for Energy Hook)