Actually, thats not true. There is a random delay into the creation of a new knight, and if you rely on that tactic it won't be long before one gets through.
I should also note that that the code uses a variable "V-Acc" for the vertical acceleration (gravity), but also includes a variable "H-Acc" for horizontal acceleration. Its currently set at zero, but it would be possible to use it to add wind-speed to the effects of the archery.
It's an arrow, Yibbert404. A good archer fires his arrow in an arch, not directly at the target, in order to improve the range of his weapon.
I should mention that whilst this was all coded from scratch, it was insanecashew's Prototype bow and Arrow project, and his "defend the fort" game, that inspired me first off to experimet with arched trajectories, and secondly to turn it into a defence game (though that last bit was really an afterthought).
Download "Archery"(5 sprites and 11 scripts) and open it in Scratch
Project Notes
A simple experiment in applying gravity to an arrow fired at 45 degrees.
Increase/decrease power with up/down.
Space to fire.
Not a complete game by any means, but you can test your archery skills by seeing how many knights you can kill before they batter down your wall
The trajectory was easy - the hard part was getting the arrow to change direction as it flew. In the end, I did it by having the actual trajecory traced by an invisible sprite, which the arrow follows and constantly points towards.
Comments
You need to be logged in to post comments
Add a Comment
man this rocks
(view all replies)Comment Reply
Actually, thats not true. There is a random delay into the creation of a new knight, and if you rely on that tactic it won't be long before one gets through.
(view all replies)Comment Reply
Just hold down the SPACE BAR and you'll hit the horse every time.
(view all replies)Comment Reply
I don't understand it because it is not like a game. That is the fun part!
(view all replies)Comment Reply
I like it
(view all replies)Comment Reply
Very neat - especially the way you describe how you displayed the arrow. I wish more people wrote clear project notes like these.
(view all replies)Comment Reply
Mayhem , very well done.
(view all replies)Comment Reply
I should also note that that the code uses a variable "V-Acc" for the vertical acceleration (gravity), but also includes a variable "H-Acc" for horizontal acceleration. Its currently set at zero, but it would be possible to use it to add wind-speed to the effects of the archery.
(view all replies)Comment Reply
It's an arrow, Yibbert404. A good archer fires his arrow in an arch, not directly at the target, in order to improve the range of his weapon. I should mention that whilst this was all coded from scratch, it was insanecashew's Prototype bow and Arrow project, and his "defend the fort" game, that inspired me first off to experimet with arched trajectories, and secondly to turn it into a defence game (though that last bit was really an afterthought).
(view all replies)Comment Reply
what am i throwing?
(view all replies)Comment Reply