aliens

Author Topic: externalising / unhardcoding bullet sprites (projectiles)  (Read 19462 times)

Volutar

  • Guest
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #15 on: July 23, 2012, 01:08:39 pm »
The thing is - there is no loader for other than spk/scr/pck/dat files... Though it's possible to use pck/dat files for them. But this is not very modify-friendly.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #16 on: July 23, 2012, 01:57:52 pm »
well, I guess we can live with .pck for the time being, since we have to work with that format anyway. If we later add support for other file formats, we can update this as well. :)

Volutar

  • Guest
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #17 on: July 23, 2012, 02:40:34 pm »
Well, I bet externalizing projectile particles in that way can be done quite quickly. It doesn't require alot of work. Though if you will be creating surfaces for every single particle of every projectile, no matter empty or exactly the same as others, you will get memory consumption grow. There might be a redundant data for each sdl surface (i don't actually know), but best option for such thing when using OpenGL - is texture atlas (I 'm not sure if there is similar entity in SDL), but it will require extra pixels between particles, just not to get hard edges when zooming in.

These projectile template images are named entities (referenced from some config like BULLET_RIFLE=/data/img/bullet1.pck) and refereced in item section as "projectile" property (like projectile=BULLET_RIFLE).
« Last Edit: July 23, 2012, 03:00:50 pm by Volutar »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #18 on: July 24, 2012, 04:00:30 am »
There is no particularly special reason why the hardcoded graphics are that way, besides the weird grey area of whether they count as "distributing copyrighted graphics", though probably nobody cares...

I'd just rather externalize them when all the graphics are more open for modding, because I'm sure people won't just want to play with bullet sprites, but everything else. :P

Edit: Anyways don't feel like all your hard work is going to waste, we do try to accommodate as much as we can from the community, even if we don't always reply to everything with immediate solutions. Sometimes some things are simple enough that we can quickly add them in to please you, like the maps with high levels, inventory sprites without helmets, etc. Other things take a lot more time or we'd rather invest in implementing them properly rather than just quick hacks, like complete graphics replacements and such. OpenXcom's end goal is to be fairly moddable, even if not 200% "scripted game" moddable, but at least enough to keep most of the community happy. :)
« Last Edit: July 24, 2012, 04:26:56 am by SupSuper »

Offline Francois424

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #19 on: October 18, 2012, 04:40:51 am »
*snip* but you can add perfectly fine things like stun grenades, or a rocket launcher with a "3-rockets-clip" and auto-shot mode... as long as it stays within the combinations of existing weapon features.

*Mad, Evil laugh echoes while explosions happen everywhere...*

This remake keeps getting better and better every topic I read.  8)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #20 on: June 19, 2013, 01:16:23 pm »
*invokes threadcromantic powers*

so guess what i'm working on today?

here's a clue:
« Last Edit: June 19, 2013, 02:42:10 pm by Warboy1982 »

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #21 on: June 19, 2013, 02:57:02 pm »
Rainbow guns? :)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #22 on: June 19, 2013, 03:05:23 pm »
well i needed SOME proof of concept :P

Offline luke83

  • Commander
  • *****
  • Posts: 1559
    • View Profile
    • openxcommods
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #23 on: June 19, 2013, 03:16:39 pm »
I like Rainbow ammo , its very pretty ;D

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #24 on: June 19, 2013, 04:25:45 pm »
oooh, so we can finally make that nyan-nyan-cat-launcher! woohoo!

no, seriously, this is great!

while you're at it, might it be possible to add adjustable bullet speeds?


EDIT: I just tried it, and it actually works! woohoo! that is to say, I expected it to work, but I didn't expect me to be able to actually work with it :D

anyway, playing around I noticed two things:

1) we need another damage type defined: Stun Damage that is not AOE damage (think rubber bullets, or, as I tried to create, sonic pistol for selectively incapacitating at a distance)

2) the "new battle" setup behaves weirdly: all additional items added by custom rulesets are automatically loaded onto the transport with a quantity of 100. is that defined in the ruleset somewhere? with all the new stuff, setting up a "new battle" becomes increasingly tedious. maybe a "unload all"-button would also help?
« Last Edit: June 19, 2013, 09:10:01 pm by moriarty »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #25 on: June 25, 2013, 01:51:00 pm »

while you're at it, might it be possible to add adjustable bullet speeds?


done.


1) we need another damage type defined: Stun Damage that is not AOE damage (think rubber bullets, or, as I tried to create, sonic pistol for selectively incapacitating at a distance)


simply define a blastradius of 0


2) the "new battle" setup behaves weirdly: all additional items added by custom rulesets are automatically loaded onto the transport with a quantity of 100. is that defined in the ruleset somewhere? with all the new stuff, setting up a "new battle" becomes increasingly tedious. maybe a "unload all"-button would also help?


that's what right click is for ;)
i did clamp it to between 0 and 100 because it goes out of range for new items. i've added some better handling for this.
« Last Edit: June 25, 2013, 02:14:41 pm by Warboy1982 »

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #26 on: June 25, 2013, 02:47:21 pm »
 :P :P that's still one right click per new item:P :P

Will defining a blast radius of 0 automatically turn off the explosion animation? Because I modified a weapon without a blast radius, and setting damage to "stun" resulted in stun explosions  ???

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #27 on: June 25, 2013, 02:55:48 pm »
from the ruleset:

#    blastRadius: How big of an explosion does this cause? 0 for none. (int) (default -1, meaning "use formula")

(plus if you grab the latest git build, that problem with new items goes away.)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #28 on: June 25, 2013, 05:08:05 pm »
perfect  ;D  ;D

Offline ClaytonCross

  • Sergeant
  • **
  • Posts: 11
    • View Profile
Re: externalising / unhardcoding bullet sprites (projectiles)
« Reply #29 on: June 26, 2013, 09:42:57 am »
I like this idea just because I would like to change the color of rifle rounds from pink to gray, so I don't think this necessarily  has anything to do with adding or moding weapons. It could just mean changing projectile appearances easily. I would also consider changing lasers to purple as violet is a stronger wave length of light and could conceptually make better weapons. Not sure why red is so common but if you have ever used a green laser pointer instead of a red one you can see that it is a significantly less fussy on that side of the light spectrum, but I am just weird that way.