Now when you drop your sword in the beginning, instead of having it appear on the ground, it shoots out in front of you and is pulled down by gravity and disappears through the ground and is deleted. Yeah.
It used to go up into the sky faster and faster, until I fixed the minus sign.
Now the goals are to have it leave exactly out of your hand, have it shoot out and bounce (or stick) into the ground, have it hit trees and rabbits, and have it offloaded appropriately if it goes out of bounds. Only after all of this works will I just make dropped items fall out of your hand. Later you'll be able to place them on the ground or something, in case they are fragile, but that isn't important now.
That offloading part is kind of tricky. If a projectile leaves the field of play, there's the question of how to handle it. Right now, I'm going to offload it into a special array, and when you enter the site where the projectile would have been flying, it then places it appropriately (most likely just sitting on the ground). If you don't enter the site for a while, the entry in the special array will be dumped into the regular item list, and then later on it will be accessible to creatures, etc. That way, no item that becomes a projectile will ever be lost. Let me know if you can think of some other way to handle this, or if you can think of some nightmare scenario that I need to deal with. One I can think of right now is having two archer creatures in the two sites marked O:
OX
BO
where X is an offloaded site, and B is a loaded site. If they are standing next to the (offloaded) corner of X that wedges itself between the two O's, then even if they see each other, their projectiles will disappear upon crossing X. I can think of a few ways around this:
1) they can't see each other through X
2) they can see each other, but won't shoot through X
3) projectiles can pass through X provided they are headed toward a loaded site
4) always load sites in a "convex" pattern, so that this just never happens
(1) seems unnatural, but might be useful since they can't walk through X anyway. (2) might be abusable (to cut off ranged attacks from dangerous opponents -- although if you are personally that close to X, it will load it). (3) would be weird if X were a cliff that would block projectiles. (4) is memory intensive.
Anyway, it feels nice to get back into moving things again, instead of all of this crap I've been doing. I'm not sure how much projectile code I'll do -- like, having things stick into creatures. That might wait until, well, stuck-ins and missile weapons. I'm not going to spend too much time on this anyway, since casting spells is next.