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

Offline Anon

  • Newbie
  • *
  • Posts: 7
Missiles face wrong direction when flying.
« on: September 14, 2013, 05:25:05 pm »
http://imgur.com/UdWvxSZ

I noticed this back when AI War was still in 1.xxx version numbers, but I haven't played since then. Missiles face the wrong direction while flying, and it looks very odd. Not sure if I should but this into general since it's more of a bug report than a tech support request, but whatever.

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #1 on: September 15, 2013, 12:51:25 am »
I'm confused.. so your bug report is that Missiles used to face the wrong direction when AI War was still version 1.xxx?
Well AI War isn't version 1.xxx anymore. It's 7.xxx now and Missiles don't face the wrong direction anymore.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline Coppermantis

  • Hero Member Mark III
  • *****
  • Posts: 1,212
  • Avenger? I hardly know 'er!
Re: Missiles face wrong direction when flying.
« Reply #2 on: September 15, 2013, 02:11:33 am »
If you haven't palyed since 1.xxx then, well, forget everything you knew about AI War. Heck, I started at 5.xxx and it's barely recognizable.
I can already tell this is going to be a roller coaster ride of disappointment.

Offline Anon

  • Newbie
  • *
  • Posts: 7
Re: Missiles face wrong direction when flying.
« Reply #3 on: September 15, 2013, 03:37:50 am »
I'm confused.. so your bug report is that Missiles used to face the wrong direction when AI War was still version 1.xxx?
Well AI War isn't version 1.xxx anymore. It's 7.xxx now and Missiles don't face the wrong direction anymore.
Bug still exists, see pic.

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #4 on: September 15, 2013, 03:48:53 am »
i don't see anything wrong in your pic.
also. see my pic.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #5 on: September 15, 2013, 03:52:47 am »
unless it's those marauder ships sending those missiles.
well. in that case only those marauder ships have this bug.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline KDR_11k

  • Hero Member Mark II
  • *****
  • Posts: 904
Re: Missiles face wrong direction when flying.
« Reply #6 on: September 15, 2013, 04:54:44 am »
Looks like a result of low precision with projectile facings. Probably a performance thing.

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Missiles face wrong direction when flying.
« Reply #7 on: September 15, 2013, 05:56:12 am »
If the distance the missiles fly is short and the number of drawn frames is low (typically due to performance issues), you may see missiles drawn facing weird directions (due to errors with angle calculations to draw visually due to odd rounding issues caused by those small numbers). Thankfully, its is merely a graphic thing. The missiles themselves will still hit properly.

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #8 on: September 15, 2013, 07:00:58 am »
Right when the missiles spawn from the turrets they face the wrong direction but then they turn and face forward.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline Anon

  • Newbie
  • *
  • Posts: 7
Re: Missiles face wrong direction when flying.
« Reply #9 on: September 15, 2013, 03:11:58 pm »
Right when the missiles spawn from the turrets they face the wrong direction but then they turn and face forward.
No they do not, the continue to face about 5 degrees away from their target while flying straight towards it. The weapon firing in that picture is an AI MLRS guard post, but the same bug applies to all missiles. Instead of having the image axes aligned down the exact center of the rocket trail and the center of the projectile, one appears to be aligned down the right side of the smoke trail. This leads to an incorrect rotation of the image.

For some reason I am unable to insert a second quote, but the bug exists over all firing distances and performance is not an issue for me.
« Last Edit: September 15, 2013, 03:14:37 pm by Anon »

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Missiles face wrong direction when flying.
« Reply #10 on: September 15, 2013, 03:37:42 pm »
Right when the missiles spawn from the turrets they face the wrong direction but then they turn and face forward.
No they do not, the continue to face about 5 degrees away from their target while flying straight towards it. The weapon firing in that picture is an AI MLRS guard post, but the same bug applies to all missiles. Instead of having the image axes aligned down the exact center of the rocket trail and the center of the projectile, one appears to be aligned down the right side of the smoke trail. This leads to an incorrect rotation of the image.

For some reason I am unable to insert a second quote, but the bug exists over all firing distances and performance is not an issue for me.

Oh, that is just a performance optimization; approximation of certain angles (like rotation angle for drawing) that don't "matter" as "much".

May not be that big of a deal in most fights, but when there are several thousands of projectiles on the screen flying around at once (which is very, very possible in AI War) that need to be updated each frame, this can start making a big difference.

Yes, GPUs could theoretically help with this (turning this from a decent cost to so trivial you could have much more being drawn at correct angles), but the devs want this game to run well even if you have nothing but a low end 2D accelerator, or possibly even no GPU.

Offline Anon

  • Newbie
  • *
  • Posts: 7
Re: Missiles face wrong direction when flying.
« Reply #11 on: September 15, 2013, 07:50:22 pm »
Right when the missiles spawn from the turrets they face the wrong direction but then they turn and face forward.
No they do not, the continue to face about 5 degrees away from their target while flying straight towards it. The weapon firing in that picture is an AI MLRS guard post, but the same bug applies to all missiles. Instead of having the image axes aligned down the exact center of the rocket trail and the center of the projectile, one appears to be aligned down the right side of the smoke trail. This leads to an incorrect rotation of the image.

For some reason I am unable to insert a second quote, but the bug exists over all firing distances and performance is not an issue for me.

Oh, that is just a performance optimization; approximation of certain angles (like rotation angle for drawing) that don't "matter" as "much".

May not be that big of a deal in most fights, but when there are several thousands of projectiles on the screen flying around at once (which is very, very possible in AI War) that need to be updated each frame, this can start making a big difference.

Yes, GPUs could theoretically help with this (turning this from a decent cost to so trivial you could have much more being drawn at correct angles), but the devs want this game to run well even if you have nothing but a low end 2D accelerator, or possibly even no GPU.
Makes sense, through I wish there was an option for true sprite rotation. After having picked apart the data resources it appears that short from changing the code there's no real way to remedy this.

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #12 on: September 16, 2013, 12:31:41 am »
No they do not
Yes they do

they continue to face about 5 degrees away from their target while flying straight towards it.
I didn't say no to this

EDIT: In the screenshot.. only the ones facing upper right corner are facing the right direction (that's where the enemy is).
« Last Edit: September 16, 2013, 12:35:51 am by Kahuna »
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!

Offline Anon

  • Newbie
  • *
  • Posts: 7
Re: Missiles face wrong direction when flying.
« Reply #13 on: September 17, 2013, 12:00:21 am »
Stuff
There's no need to be so overly confrontational and deliberately cherrypick parts of a post to try to prove your "correctness" after the point has already been explained. TechSY730 has already explained what is happening and why.

Offline Kahuna

  • Core Member
  • *****
  • Posts: 2,222
  • Kahuna Matata!
Re: Missiles face wrong direction when flying.
« Reply #14 on: September 17, 2013, 12:29:48 am »
I didn't mean anything I just said in a bad way. I wasn't being confrontational in purpose. I just say things as they are.
Actually now that I think about it.. your replies were about as confrontational as my replies. Don't be a martyr.


Bug still exists, see pic.
For some reason I though you are still in version 1.xxx^^

No they do not
I have some bad habits (saying things as they are for example(which can be interpreted as being confrontational)) but pulling stuff out of my butt isn't one of them.

Also. I don't always say everything entirely seriously. Anyway.. sorry about that.
set /A diff=10
if %diff%==max (
   set /A me=:)
) else (
   set /A me=SadPanda
)
echo Check out my AI War strategy guide and find your inner Super Cat!
echo 2592 hours of AI War and counting!
echo Kahuna matata!