Log In  

Cart #proportional_nav_demo-0 | 2023-05-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Here is a quick demo I threw together to demonstrate Proportional Navigation missiles in 2D. Generally speaking you don't want to put your players against this type of missile unless you want missiles to be very threatening (e.g. Highfleet) or you are going for something more sim-like.

Feel free to reference or use my code. I did my best to make it readable.

P#129491 2023-05-07 22:09 ( Edited 2023-05-07 22:14)

good basic reference example.
I used PN for my missiles in Attack of the Deathstar and produces excellent results gameplay wise.

P#129517 2023-05-08 11:44

Nice demo! The defensive tactic that works for me (and one that often works in sims as well) is to make a tight turn when the missile is nearby, using the player's smaller turn radius to out-turn the missile. If you want to tone down the difficulty for a game, making the missile's path "stiffer" would be an easy way to do it.

It would be interesting to play with this with keyboard controls instead of mouse, and perhaps in a larger play field. I suspect those would make it easier to control the player's vehicle and perform evasive maneuvers.

(It would also be interesting to model inertia/fuel to see how much benefit mixed guidance gives over raw proportional guidance -- though if you're not building a sim, that might be a level of detail that's not relevant! Fun to read your comments on it, though.)

P#129528 2023-05-08 17:53

@freds72 Your game was actually the inspiration for me to make this experiment! Those torpedoes were extremely fun to use.

@cmounce I doubled the player's turn speed in this demo so that it was physically possible to dodge the missile. With the players stats equal to the missile's stats it is impossible to dodge (i think).
Sim-lites usually allow the player to have a higher g-limit than the missile so that evasion can be reliably done, but in true Simulators the player is reliant on making the missile run out of fuel/speed before it reaches them.
The mixed guidance doesn't do anything in this demo, but you are right about its intended purpose. If there is a maneuvering target, the mixed guidance should prevent the missile from using all its fuel trying to match every little motion the target does. This comes at the cost of flight time. The missile follows a longer path and gives the target more time to react.

P#129535 2023-05-08 20:23

Really interesting demo. I'd never even thought of this before. Feels like the "mixed guidance" one is the most forgiving. It's the only one I could get the plane to avoid.

P#129558 2023-05-09 04:27

It is possible to dodge the 'pure pursuit' and 'mixed guidiance' missiles I think, I could be wrong but I tried a technique of dodging the missiles by first drawing a 'q' like shape using the missle and it worked! Even though, it is very close, the missile will just despawn.

P#129629 2023-05-11 07:00 ( Edited 2023-05-11 07:05)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-02-29 09:21:34 | 0.026s | Q:22