Missile Command style logic
quantumsheep
Member Posts: 8,188
Hi all,
I come to you, bearing no gifts, and offering a burden
Math, my friends, has come to haunt me... at least, I *think* it's math...
I really like the old classic Missile Command ( http://en.wikipedia.org/wiki/Missile_command ) and wanted to do a variation on that theme.
Essentially, I need to make multiple clicks with the mouse and have multiple objects accelerate towards the corresponding click position.
With what I have right now, once I make a second or third click, the original projectiles will change course and move towards that second mouse click.
I'm thinking I would have to keep track of multiple clicks, and have a separate projectile for each click of the mouse (so that missile 1 goes to mouse click 1, missile 2 goes to mouse click 2, as opposed to all missiles going towards the latest mouse click).
Is there a more efficient method of doing this?
Any help would really be appreciated!
Many thanks,
QS
I come to you, bearing no gifts, and offering a burden
Math, my friends, has come to haunt me... at least, I *think* it's math...
I really like the old classic Missile Command ( http://en.wikipedia.org/wiki/Missile_command ) and wanted to do a variation on that theme.
Essentially, I need to make multiple clicks with the mouse and have multiple objects accelerate towards the corresponding click position.
With what I have right now, once I make a second or third click, the original projectiles will change course and move towards that second mouse click.
I'm thinking I would have to keep track of multiple clicks, and have a separate projectile for each click of the mouse (so that missile 1 goes to mouse click 1, missile 2 goes to mouse click 2, as opposed to all missiles going towards the latest mouse click).
Is there a more efficient method of doing this?
Any help would really be appreciated!
Many thanks,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Comments
IT EVEN HAS MY FACE ON IT!!!!
Thanks dude, will check it out now.
(watches as a thousand Missile Command clones appear)
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I liked that you gave the bullet new attributes target x and target y - took me a sec to notice, but it's very, very clever!
You, Sir, get a 'Special Thanks' in the credits! Let me know your real name if you like and I'll make sure it goes in
Thanks again - I can actually start building levels now! Genius!
A grateful QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
While it works fine in GS, It doesn't work so well on an actual iPhone in the viewer...
:O
What a rollercoaster, eh?
Can the lovely CodeMonkey offer a suggestion as to what to do to get it working?
Cheers,
QS
Also, is there a way to get it working with touches so that you can press down on multiple positions and get a spread of missiles going up? *cheeky grin*
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
As you can imagine, precision's important in a game like this
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Thanks man - I really appreciate the time you took to make a bloody demo *AND* help me work out the issues!
When this game goes to the App store, you, sir, get a free promo code
Thank you again - it's greatly appreciated!
Onwards!
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io