PixelProjectiles v2.E

by Ease
An update of Shadowdarke's PixelProjectiles [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Ease.PixelProjectilesv2.E##version=4

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Ease.PixelProjectilesv2.E##version=4

298 downloads
Version 4
Date added: Mar 13 2013
Last updated: Mar 15 2013
3 fans
An attempted alteration of Shadowdarke's PixelProjectiles, getting it to work with the new pixel movement.

Shadowdarke's library is amazing, and recommend to almost all beginners considering projectiles. However, it is outdated (now nearly 8 years old!), and can't cope with Pixel Movement.

This library has been built using the original source from Shadowdarke's library, and includes his original demo.

FirePixelProjectile(owner, destination, proj_type, weapon)
ARGS:
  • owner (atom) - The atom that launched the projectile, also
    the start point of its trajectory.
  • destination - destination may be an angle in degrees, or
    an atom that the projectile is launched
    towards.
  • proj_type - The type of projectile. This should be a
    type of /obj/sd_px_projectile.
    DEFAULT: proj_type = /obj/sd_px_projectile
  • weapon(obj) - The weapon that fired the projectile. Not
    necessary but could be useful to track.



Known Bugs:
  • The Instant Projectile occasionally misses. - Fixed
  • The conversion of owner.dir to an angular direction is really ugly. I'd love to find an alternate/better method of doing this.

Comments

Fat Albert: (Aug 28 2015, 7:55 am)
Okay so I raised the bound height & width of the projectiles which seemed to fix the skipping problem. Now that I think about it I think shadow darkes pixel projectile system always jumped frames. Does anyone have any ideas on how to make the movement more smooth?
Fat Albert: (Aug 16 2015, 7:31 am)
So I'm having a few issues with the library.. One is at certain angles, the projectile seems to miss or skip over my target. Second, a friend pointed out to me that the projectiles seems "Jumpy", like not smooth or seamless which took me a good minute to agree with him cause I've always like this projectile system, but I definitely see what he's talking about now. I going to be updating my projectile system very soon so it can look cleaner, I was wondering if you experienced similar issues or had any advice to fix these problems?
Ease: (Jul 16 2015, 5:48 am)
Glad to be of service Fat Albert :) If you have -any- issues with it at all, please don't hesitate to tell me.
Fat Albert: (Jul 14 2015, 9:54 am)
Wow, Thx a lot, for saving me the trouble of updating my projectile system. I was wondering what was wrong with my projectiles for awhile now. I will definitely be giving you credit along with Shadowdarke.
Multiverse7: (Mar 18 2013, 7:14 am)
I pseudo-moved this conversation to a New Topic in Design Philosophy. I didn't think I would get this many replies. I wouldn't want you to not get any feedback on your modified library. The rest of these posts can be removed now.