View unanswered posts | View active topics It is currently Sat Apr 27, 2024 1:36 pm



Reply to topic  [ 8 posts ] 
 Interception algorithm help 
Author Message
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Interception algorithm help
Alright, so I'm disappointed with the current way homing missiles work. They always overshoot the target and look funny in flight, especially when overshooting the target.

I rewrote the basic Coalition homing missile script to do away with purely emission-controlled thrust and instead put in Lua-controlled accelerations based on the position of the missile in relation to the target actor. This woks pretty well, but as a measure to keep the missile from overshooting the target, it slows down almost to a standstill when the actor is four times the velocity minus 10 ((self.Vel.X * 4) + 10) pixels away. This works, but looks very strange. There must be a better, nicer way to keep the missile accelerating throughout the entire burn whilst retaining accuracy.
Here's my code so far (I must have made an error somewhere, when the missile loses it's target it begins accelerating full ahead positive on both axes).
Attachment:
MiniMissile.rar [1.09 KiB]
Downloaded 231 times


Can anyone improve it, or suggest a better way to do it?

EDIT: I think I've made it plenty perfect to my liking. Grif reminded me of trig functions, so I used the same calculation as in the old method to get the angle of the target, then used the x and y components to add acceleration to the missile.
Code:
Attachment:
MiniMissile 2.rar [1 KiB]
Downloaded 264 times

turnspeed and maxspeed should be fairly self-explanitory. The values currently present cuase this effect:
Image


Thu May 14, 2009 11:00 pm
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Interception algorithm help
but the question is, can you check for terrain, get it to avoid terrain that isn't the target, and even give it path-finding AI so it can run through mazes to a target?


Fri May 15, 2009 3:10 am
Profile YIM WWW
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Interception algorithm help
That'd be annoyingly dumb. It looks very nice now, where it is somewhat like a SAM site.


Fri May 15, 2009 4:06 am
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Interception algorithm help
Daman wrote:
That'd be annoyingly dumb. It looks very nice now, where it is somewhat like a SAM site.


First of all,

Worms : the homing pigeon, and patsy's magic bullet.


Second of all, chainsaws that follow the ground, climb walls and mow down actors feet first. this could be awesome, could it not?


Fri May 15, 2009 7:04 pm
Profile YIM WWW
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Interception algorithm help
Homing pigeon doesn't dodge objects.

I'm saying making ♥♥♥♥ home all the time is not the way to a good mod(especially making it pathfind too urgghh). It's dumb. There are enough homing rocket launchers as it is.


Fri May 15, 2009 8:08 pm
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Interception algorithm help
Daman wrote:
Homing pigeon doesn't dodge objects.

I'm saying making ♥♥♥♥ home all the time is not the way to a good mod(especially making it pathfind too urgghh). It's dumb. There are enough homing rocket launchers as it is.


I actually agree with you, Pathfinding missiles is overpowered and adding it to CC would probably be dumb, if you gave it good pathfinding. If it gets lost spins around and blows up at random, it becomes hysterical.

And as for to many homing weapons. For a while a build or 3 ago, there was 1 homing missile, without lua, then suddenly there where 9. and then in B22, everyones like "we can't make homing missiles, we need lua for that" and I was like WTF?! Its an exploding actor with a vacuum gun!

So now theres a bajillion homing missiles that use lua, and here I am, working on a mod with 411570N3 for warhammer 40K and the tau, and I'm making the broadside which has semi-intelligent terrain avoiding smart missiles, that dodge debris, objects that aren't the target, and they track and follow. I have no idea how I'm gonna code that, AND on top of that, even though I started trying to figure out how to just make it a genaric homing missile in B22, Now there are 18 billion homing missiles and I'm just gonna look like a fudge copycat.

What the hell do I do?


Fri May 15, 2009 9:47 pm
Profile YIM WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Interception algorithm help
Do the same thing you always do; that is, don't do anything because it's a W40k mod and they never get finished?


Fri May 15, 2009 10:32 pm
Profile
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Interception algorithm help
Grif wrote:
Do the same thing you always do; that is, don't do anything because it's a W40k mod and they never get finished?


Ivan made space marines, Ork Gothic made orks, someone else (forgot there name) made guard.

And guess what, the tau mod is almost releaseable, We just have some minor balance issue, the problem is they get released and people like you go "oh, warhammer 40K, it will suck by default" and you never even open the thread because of some random bias, and then you forget that it ever existed.


The tau mod we're working on has : 2 working actors that just need new sprites, 6 guns, and 1 grenade, as is, all of which work, we're mostly just balancing it to get it 100% perfect, updating to B23 if needed (gibs and material names, I don't know the gibs off hand, I know mine are fine).

This mod will be released soon, and it will be awesome. Guess what I made? A wide-beam laser that isn't a huge muzzle-flash, or TDEs with invisible explosions. and guess what, It works, doesn't use lua, and works on doors and stuff. you know, something that's never been done before.




But lets stay on topic.

Since you have working code, could you teach me how to do it, or possibly join our WH40K Tau thread and help with the seeker missiles? actually we need to either learn lua, or get someone who knows lua for the pulse carbine, so we can have alternate fire types that isn't done as tracer rounds. (which was promised in a prior dev log)


Sat May 16, 2009 2:17 am
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.111s | 16 Queries | GZIP : Off ]