StellarForum
May 20, 2012, 01:19:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Stellar Frontier has moved to the new forum and site at stellarfrontier.com!
Please make a new account there in preparation for SF 2.0 and to chat on the boards!
 
   Home   Help Search Groups Login Register  
Pages: [1]
  Send this topic  |  Print  
Author Topic: Weapon Effects.  (Read 322 times)
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« on: August 09, 2010, 04:45:32 PM »

Well the idea here is to add effects to weapons that don't count in the hitbox. There are two ways this can be done:

  • Manually assign a hitbox size
    This one is simple, and I prefer this one over the other. All you do is just assign a hitbox size in one of the data files. you assign the x,y size and the x,y coords of your actual image that the TOP LEFT corner of the hitbox will start at. This is useful if you have something like a flame overcoming your bullet and leaving a trail, so you want the middle front to be a hitbox.
  • Allow usage of separate files which will be the effects
    This one is a little bit more complicated. Basically, when making your weapon bmp/png, you can also assign a file to act as an effect with the bullet, that don't count as part of the hitbox. An example is when you make a weapon that has a huge glow. The problem now is that your 100x100 bullet image now has a HUGE hitbox. In this way, you could crop the image down to what you want your hitbox to be, and export the other stuff to a different image.

I hope I explained well enough, but if you have any questions, feel free to ask.
« Last Edit: August 09, 2010, 04:48:07 PM by warfighter67 » Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #1 on: August 10, 2010, 01:25:24 AM »

The hitbox idea 1 actually would be harder then 2 because you need to redefine how images work for hitboxes.


I did something similar to hitboxes for ringed planets in SF 2.0. The ring is a image on top of the image, and doesn't affect the actual hitbox. Was rather easy to do it this way. Wink
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
warfighter67
Advanced Member
****
Posts: 183


piepwnsu dshunia10
Email
« Reply #2 on: August 10, 2010, 12:25:03 PM »

Would this be possible for other things like bullet images too?
Report to moderator   Logged

known as "RearAdm. OE Earthforce Commander" [10/30/09]

ALL UR BASE R BELONG
NiteHawk
<dev></dev>
Administrator
Legendary Member
*****
Posts: 2816



WWW
« Reply #3 on: August 10, 2010, 03:52:14 PM »

I could add it in the future yes.
Report to moderator   Logged

http://chrisvall.com - Coding/gaming blog in the works.
Pages: [1]
  Send this topic  |  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!