Author Topic: Missiles face wrong direction when flying.  (Read 4988 times)

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Missiles face wrong direction when flying.
« Reply #15 on: September 17, 2013, 01:04:35 am »
Don't take Kahuna too seriously and you'll do fine :)  We all have different personalities here.

On the missile flight thing I'm surprised to see them flying backwards; some deviation is normal due to the stupid-math-tricks I did to avoid actual trig calls (goodness those are slow) but that's not just off by a few degrees ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Anon

  • Newbie
  • *
  • Posts: 7
Re: Missiles face wrong direction when flying.
« Reply #16 on: September 17, 2013, 05:13:57 pm »
Don't take Kahuna too seriously and you'll do fine :)  We all have different personalities here.

On the missile flight thing I'm surprised to see them flying backwards; some deviation is normal due to the stupid-math-tricks I did to avoid actual trig calls (goodness those are slow) but that's not just off by a few degrees ;)
Oh no, those are going towards the marauders. I totally get why you'd need to do stuff like that, being a CS major myself. After reading up on it I figured it was because the trig calls caused some performance issues. Just wondering though, wouldn't it be a bit better to just use a bunch of static sprites to make the smoke clouds? A single particle flying toward the enemy puffing off static smoke that disappears would produce a similar result to this, but would require no messy angle formulas and would look better. Not sure how much of a performance hit that's make though, but I'm assuming that most computers could handle it.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Missiles face wrong direction when flying.
« Reply #17 on: September 17, 2013, 05:17:56 pm »
Oh, I see, you mean to use particle emission every few frames.  I see why you'd think that, but ultimately that would seriously multiply the number of sprites that need to be drawn every frame in heavy-missile combat, and that would really chug things in a hurry.  Drawing shots is one of the big performance hogs in AIW on the graphical side.  There's a lot of sprite batching and such to avoid texture swaps but it just gets to be quite a lot of draws and so on.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline orzelek

  • Hero Member Mark III
  • *****
  • Posts: 1,096
Re: Missiles face wrong direction when flying.
« Reply #18 on: September 17, 2013, 05:31:07 pm »
One way to reduce this would be to produce a lot of point sprites by using a shader.
I haven't tried something like this and I'm assuming it would have limited applications - would require GPU that can do it to work.