The Daily Click ::. Forums ::. Klik Coding Help ::. 360 more precise shooting?
 

Post Reply  Post Oekaki 
 

Posted By Message

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
20th January, 2010 at 19:08:34 -

I was searching around for the most precise 360 shooting. im using angle, move safely and advanced direction. And those strange math stuff sin and cosinus stuff.
It is perfectly accurate within 300 pixels or such. But if the distance is very far away like 600 or 700 pixels some shoots are very inacurate. not very but a few pixels away from its target. Is there a way to make shooting a lot more precise than it is, if is so please halp! me.


 
Code me a sausage!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
20th January, 2010 at 19:38:01 -

Well, 360 degrees will only be as accurate as 360 degrees can be.
For example;

You don't use 32 dir because between every directeion there is 11,25 degrees (I think) of missed area. A piece of cake so to say.

When you use 360 degrees, essentially, all you are doing is using 360 directions instead of 32. It also produces pieces of cake, though far more slim than the 32 dir piece. But when the cake is very elongated (strange sentence), it's width at the "base/crust" will be noticable.

I believe there is a way to simulate 3600 directions in a full circle, but I don't have a clue on how you do it though. There are a LOT of articles on the 360-subject, are you sure you've checked them all out?

An idea on how to go about a solution would perhaps be to align the angle with every loop? If you have the target coordinates, use them and the "bullet's" relative coordinates after each loop and calculate the nearest angle from the current position.

You guys with all your alterable values can do that. I myself only have 3 for each object. That's my main incentive for getting MMF2 instead of MMF1.2...

Edited by Eternal Man [EE]

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
20th January, 2010 at 19:56:56 -

Thanks for the reply, i did check some more articles. And found the most precise one, completely accurate to the spot even at 900+ pixels afar.

http://www.create-games.com/article.asp?id=1221

It is a bit complicated but i used the last example, and did the angle with advanced direction object instead what he wrote in some strange alien language and everything put in alt vals.

its very accurate the problem is i dont know will it be laggy with lots of bullets and stuff flyin around. hehe, hope not.

 
Code me a sausage!

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
20th January, 2010 at 20:24:05 -

Hey, check out Batchman's comment in that article.

Actually that gives me an idea. hmm.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th January, 2010 at 23:13:22 -

"360 degree movement" is something of a misnomer, as it suggests you get a maximum of 360 different "directions" which is absolutely not the case.

As long as you store both the object's angle and coordinates in alterable values (ie. as floats), it is far more precise than that.

Anyway, it's all been discussed a million times before. If you can't find a decent example, you're not looking

 
n/a

Watermelon876



Registered
  16/04/2009
Points
  27

I am an April FoolVIP Member
21st January, 2010 at 01:59:00 -

Store your bullet's position in Alterable Value so that you can use floats. This innacurate shooting ruined Survival Space.

 
Awesomeness is Watermelon.
*/l、
゙(゚、 。 7
l、゙ ~ヽ
じしf_, )ノ
This is Koji. Copy and paste Koji to your sig so he can acheive world domination.

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st January, 2010 at 14:26:51 -

Here ya go:
http://www.create-games.com/download.asp?id=7708

I commented it nicely. Most of the code is in Lua format, though. It should be accurate to a lot of thousands of pixels

And here's a simple explanation how how this whole trigonometry stuff works:
http://www.create-games.com/article.asp?id=1984

Edited by Muz

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click