Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / how would one fake a missle launch ? :D i know its kindda a funny project :D

Author
Message
haliop
User Banned
Posted: 7th Feb 2014 18:12 Edited at: 16th Feb 2014 06:54
im cruising the web learning a bit about missles kinda hard stuff
so im thinking maybe someone knows this tiny equation of getting it(missle) to start , taking off , accelerate and pointing and cursing towards target...

i know its very difficult to code and requires some basic knowledge on rocket science .. if you have any thought please share

ty for your time \
Nadav.

fake system for missles



Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Feb 2014 20:29 Edited at: 7th Feb 2014 20:30
you can simulate/calculate in theory
but in real you can see what happens.

hehe, try "Kerbal Space Program" at Steam

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 11th Feb 2014 02:55
A distance formula for linear acceleration is like this:
acceleration# = (maxSpeed#^2 - minSpeed#^2) / (2.0 * totalDistance#)

x# = maxSpeed# * totalTime# + 0.5 * totalTime#^2 * acceleration#

Code for a loop of this looks like this:


Similar can be done with y position. You may also want to add a maximum distance at which acceleration stops.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Feb 2014 04:04
Apply a mass to the rocket, set your gravity value, then begin applying your forces; rocket's thrust, wind, etc..

You can add multiple thrusters and set a random variable of tiny discrepancies between the power of each that can simulate a less than perfect launch, throwing off the trajectory.

Then there's the equations for projectile motion.

haliop
User Banned
Posted: 16th Feb 2014 06:53 Edited at: 16th Feb 2014 06:53
cool stuff, but what i've done is a very decent fake system for it.
1st because its easy and looks good
2nd so it will work on all devices without needing to use math although from what i see here it wont hurt too much..

so the fake system is this:

1st where is your rocket starts x,y,z
2nd where is the target.

now this may need some adjustments but not too difficult ones...

in loop
missle

MoveObjectLocalY(missleId,speed)
RotateObjectLocalZ(missleId,rotationPower)


simply run the program and see where the missle hit, inc/dec speed and rotationPower as needed to get the missle to hit where you want it to.
save those vals and your done.
add some missle cloud trails to make it look good.
heres a video of the fake system in action.


obviously im talking about a very simple missle but im guessing a system like this for a multiplayer game should work better then all others since it uses a very simple coding and i think thats a good thing when you think about networking..

land to land missle.


Login to post a reply

Server time is: 2024-11-25 01:50:36
Your offset time is: 2024-11-25 01:50:36