Project X Forums
http://px.worms2d.info/forum/

Sprite Builder (!!!) (R)EVOLUTION + Video Tutorial
http://px.worms2d.info/forum/viewtopic.php?f=13&t=595
Page 2 of 6

Author:  PyroMan [ Tue Jan 29, 2013 12:45 am ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

to animate your sprites for bullet, u need add one simple parameter into your animation scrip.
According to sample script, u need add new line betwee 62 and 63 lines
Code:
    62          WeapSpriteParams* Params = new WeapSpriteParams;
    63          new WeapSprite(this, sprite, Params);

so after 62 line press Enter and type this:
Params->

will open a list of functions (u need press SYNTAX CHECK first, to see it) and choose there "bool animate".
press enter and type "= true;"

You will get this:
Code:
    62          WeapSpriteParams* Params = new WeapSpriteParams;
    63          Params->animate = true;
    64          new WeapSprite(this, sprite, Params);

to change animation speed change another parameter: anim_speed. 1.0 is defauld. so if u need slower - set to 0.6 (or any other).
result should be:

Code:
    62          WeapSpriteParams* Params = new WeapSpriteParams;
    63          Params->animate = true;
    64          Params->anim_speed = 0.6;
    65          new WeapSprite(this, sprite, Params);


if your sprite made of 1 frame - it will not couse any errors :)) But if sprite has some frames - they will be looped.

Author:  Atr0x [ Tue Jan 29, 2013 1:40 am ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

PyroMan wrote:
I can record a video from screen about adjusting stuff here and making weapon from scratch. Anyone interested?
If yes, i will do it. I can.



natural yes ! :mrgreen:

Author:  StepS [ Tue Jan 29, 2013 7:38 am ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

oh ye, one of the ideas i wanted to make a long time ago came live! :D great job!
i also had an idea of separate worm hats using script similar to this, distributed by wormstates, imagine how cool would it be

Author:  Twicken [ Tue Jan 29, 2013 8:27 am ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

well done man. im going to start revolutionizing my libz :)

Author:  PyroMan [ Tue Jan 29, 2013 8:53 am ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

Twicken wrote:
well done man. im going to start revolutionizing my libz :)


Alright :) If u will got any problem or difficulty with adjusting script - let me know, i will help

Author:  PyroMan [ Tue Jan 29, 2013 4:57 pm ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION

StepS wrote:
oh ye, one of the ideas i wanted to make a long time ago came live! :D great job!
i also had an idea of separate worm hats using script similar to this, distributed by wormstates, imagine how cool would it be

Thanks. I've been thinking about that long time ago also, but had no idea how to do it.
Yeah, distributing to wormstates is what im actually working on now. But i,m gonna adjust it according to worm size even, becouse very soon we will have them a bit scaled, for some utilities or even scemes with prepared that utilities.

Author:  Atr0x [ Tue Jan 29, 2013 8:44 pm ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION + Video Tutorial

ty so much for video tutorial... 8-)

so i will make my first weap...with name "Stupid Weapon" LOL

SURE...hahaha... :mrgreen:

tyvm.

Author:  PyroMan [ Tue Jan 29, 2013 10:17 pm ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION + Video Tutorial

Atr0x wrote:
ty so much for video tutorial... 8-)

so i will make my first weap...with name "Stupid Weapon" LOL

SURE...hahaha... :mrgreen:

tyvm.

lol :D ye my imagination got stuck so i called it "stupid". U saw that awful piece of pixels i`ve made in photoshop, isnt that stupidly too much black with uncampatible green on red? :DDD

Urw. But i made it for everyone. Specially i hope this will help to Curtis, coz that ~9Mb lib can be less than 500 Kb though, which is kinda awesome. Also our replays can get back their lightness.

Still, i need to think about how to make those cool effect of explosions, fire, etc without additional huge libs like my sfx. Maybe "particles" can be answer.

Author:  Twicken [ Sun Feb 03, 2013 3:18 pm ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION + Video Tutorial

Hey pyro, this script is great!. i have managed to reduce my libs by half :).

I have stumbled upon a strange glitch however when using the lib. sometimes white lines and triangles will appear after playing allot of games without restarting WA. but that problem doesn't concern me too much.

There is another glitch i get when using the lib in a highlander match with other libs. Melee weapon sprites and sometimes others disappear completely! in some cases you cant even move. its really weird, so i uploaded a replay so you could see for yourself.

http://www.sendspace.com/file/5j1y33

Might i also make a suggestion concerning the script?

It would be cool if here was a weap scale param, like the hand scale.

Also would be much more useful for more weapons if the bullet sprites could be animated in different ways, such as fast cycle and track speed, and maybe some of the other more useful ones. i tried to make a bullet with the bulldozer, however it just spins.

those things aside, kudos!

Author:  PyroMan [ Sun Feb 03, 2013 5:45 pm ]
Post subject:  Re: Sprite Builder (!!!) (R)EVOLUTION + Video Tutorial

Twicken wrote:
Hey pyro, this script is great!. i have managed to reduce my libs by half :).

I have stumbled upon a strange glitch however when using the lib. sometimes white lines and triangles will appear after playing allot of games without restarting WA. but that problem doesn't concern me too much.

There is another glitch i get when using the lib in a highlander match with other libs. Melee weapon sprites and sometimes others disappear completely! in some cases you cant even move. its really weird, so i uploaded a replay so you could see for yourself.

http://www.sendspace.com/file/5j1y33

Might i also make a suggestion concerning the script?

It would be cool if here was a weap scale param, like the hand scale.

Also would be much more useful for more weapons if the bullet sprites could be animated in different ways, such as fast cycle and track speed, and maybe some of the other more useful ones. i tried to make a bullet with the bulldozer, however it just spins.

those things aside, kudos!


Thanks, Twicken.

Well i saw few weirdness with this lib: sometimes sprites overlapping, that add visual effect of white line across the sprite, but for sprites that has transparency channel (like my Security grenade has green light effect) - that transparancy multiplyed many times (overlapped). Seems like i know what can couse that. I think i lnow what couses that. It`s not that big problem, and i think i will fix it without problems with next updates.
White triangles i had only with very small sprites. Try enlarge file dimensions (simply add more empty space in photoshop). Filesize will not increase, but problem can be solved, i think.
Another problem that i saw personally - is my GunpowderBomb sprite detached from worm and played separately when other weaps selected. This happened to me when played helicopters with raffie.

About replay:


- About weap scale: There is a weap-scale parameter. Here is it: Params->scale it works for holded sprite. That parameter was made one of the first, i should add weap_ tag to it. My fault.
- About bullet sprites animation: Actually they ARE animating in different ways. All taht types of animations i have scripted. Script takes it from weapon settings. So if you configure your bullet (in weapon editor) to be animated like TrackMovement - it will be animated like that :) It works, try it.
- About bulldozer: i saw that your bulldozer uses fast cicle method. For my library, all that parameters is about rotation. But if your sprite is animated (independently of rotation) - i made an animation function for that. its simple: Params->animate. set it to true and adjust Params->anim_speed and it will run your animation.
Of you dont need to rotate your bullet at all (when its active), u can simply delete bullet animation (CMissile scprit and all below)

Page 2 of 6 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/