Page 1 of 1

Advanced ballistics

Posted: Sat Jun 13, 2009 2:24 pm
by Griswoldz
In this thread you can check the current state of advanced bullets and missiles environment, plus you can report all bugs related to it (Of course as soon as it'll get released :D). The main aim is to achieve a similar ballistic system as in TA, although new ideas are still welcome :).
**********************************************************************************************************************************************************************
Current state of bullets algorithm:
planning 95%
coding 10%

**********************************************************************************************************************************************************************
Current state of missiles algorithm:
planning 40%
coding 0%

**********************************************************************************************************************************************************************
As i see i fail miserably in implementing new things to the engine. I'll stick in completing the code as standalone ballistics calculator, which could be implemented later in the engine by You Zuzuf :D. Just before releasing it I could talk with You about compatibility. Especially starting values and returning ones. Right now there are couple of them.

Bullets script:

-x,y,z of the bullet -Gat

-x,y,z of target -Gat

-Movement vector of the target -Gat

-speed of the bullet (Unit specs based) -Gat

>>rotation speed of unit's weapons -Gat

-Z (left, right) and Y (up, down) Angle of weapon of shooting unit -Gat -Ret

-gravity of the map (remember cool lunar battles in TA :D?) -Gat

>>landscape height -Gat

Statements:

>>Can create a new bullet as a class and follows it's path. After collision, it sends proper statement to effects function to create explosion.

-If just bullet , the script tries just to count next position of the bullet.

-function gathers gravity of the map and speed of the bullet for specific unit only once (Not sure about second one)

>>being able to standalone create, manipulate, and terminate bullets.

-Tries to successfully avoid landscape objects by using most efficient max height of the bullet achieved before destroying the target.

>>Changes health of certain unit.

Missiles script:

-x,y,z of the missile -Gat -Ret

-Z and Y angle of the missile -Gat -Ret

-Speed of the missile -Gat

-Field of vision of the missile (in degrees) -Gat

-x,y,z of the target -Gat

>>cooldown time of the missile -Gat

Statements:

>> being able to standalone create, manipulate, and terminate missiles


Small evil dictionary :P:
Ret means Returns. Gat means Gathers.
>> means: Planning to release in future versions.

I'll make sure to edit this post as soon as i'll make any changes.

Re: Advanced ballistics

Posted: Sat Jun 13, 2009 3:52 pm
by zuzuf
I think it can help if you know a bit how current weapon code works:
  • check if there is something to track and update target position if needed
  • if the weapon is in tracking mode, then try to guess were the target will be when the weapon will reach it (extrapolate position using known target speed and distance from weapon)
  • check if weapon needs ballistics (bullets) and add gravity calculations
  • detect collisions with map and objects/units.
  • if weapon hits something it enters in "dying" mode (spawns some nice fxs)

Re: Advanced ballistics

Posted: Sat Jun 13, 2009 5:32 pm
by Griswoldz
oh i would forgot about effects in dying mode. Shouldn't be hard to make, but i need to study the code a little more :P.

Re: Advanced ballistics

Posted: Sat Jun 13, 2009 6:21 pm
by zuzuf
current code would be better split into several specific parts (tracking, ballistics, detection, dying mode, ...)

Re: Advanced ballistics

Posted: Sat Jun 13, 2009 6:28 pm
by Griswoldz
I agree. Now it's really messy :P.

@Edit
First post has been updated! First we are implementing basic stuff. Lets see how the things are going to develop :D.

Re: Advanced ballistics

Posted: Tue Jul 21, 2009 5:54 am
by xpoy
Some time no update, so now what?

Re: Advanced ballistics

Posted: Tue Jul 21, 2009 7:15 am
by HoneyFox
hmm... Sounds like we can write some simulation codes for missiles/bombs.
which will greatly increase the type of missiles/bombs. (vlaunch missiles, gliding bombs, leading target missiles, and so on...)

Re: Advanced ballistics

Posted: Tue Jul 21, 2009 8:01 am
by Balthazar
HoneyFox wrote:hmm... Sounds like we can write some simulation codes for missiles/bombs.
which will greatly increase the type of missiles/bombs. (vlaunch missiles, gliding bombs, leading target missiles, and so on...)
Yeah, this will be the awesome :P