Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,654 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Animated Sprites Problem #179241
01/22/08 09:30
01/22/08 09:30
Joined: Jan 2008
Posts: 5
Vancouver, BC, Canada
D
Danielson Offline OP
Newbie
Danielson  Offline OP
Newbie
D

Joined: Jan 2008
Posts: 5
Vancouver, BC, Canada
So basicly i want to create a simple fire for a torch,
i created 11, frames named fire1.tga to fire10.tga, then the last one is fire+11.tga,
they are all 100x217, except the last one, it is 1100x217, and contains them all in a row with the 11th at the far right,

the problem is im getting a eroor E1112 <Fire+11.tga>: badsize,

what could i be doing wrong?

Re: Animated Sprites Problem [Re: Danielson] #179242
01/22/08 09:49
01/22/08 09:49
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
First - not sure, but size is not power of 2
Second - nice looking torch fire you may create with one sprite (save memory)


Never say never.
Re: Animated Sprites Problem [Re: tompo] #179243
01/22/08 10:06
01/22/08 10:06
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
kasimir Offline
Senior Member
kasimir  Offline
Senior Member

Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
the spites should have all the same size - the engine does not know that the last frame is bigger than the other...
so you have to resize frame1 - 10 to 1100x217

Re: Animated Sprites Problem [Re: kasimir] #179244
01/22/08 12:21
01/22/08 12:21
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
No... you are wrong... this is not last image... those all images 1-10 are in one group in one image .tga That's ok

Last edited by tompo; 01/22/08 12:21.

Never say never.
Re: Animated Sprites Problem [Re: tompo] #179245
01/22/08 13:36
01/22/08 13:36
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Happy Birthday Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
hm i guess you should write +10 then?
But I guess that won't help

So you could also use images with as example 3 frames and then just "switch" them at runtime. Here is a sample code-as always not tested:

Code:
#define fireFrames 10
#define fireParts 3

action fire()
{
int i=0;
while(1)
{
i+=2*time_step;
i%=fireFrames;
temp = integer(i/fireParts);
if(my.skill1!=temp)//need a new pic
{
my.skill1=temp;
ent_morph(me,str_cat(str_cat_num("fire",2.0,temp),".tga"));
}
my.frame = 1+i%fireParts;
wait(1);
}
}



Re: Animated Sprites Problem [Re: Scorpion] #179246
01/22/08 20:03
01/22/08 20:03
Joined: Jan 2008
Posts: 5
Vancouver, BC, Canada
D
Danielson Offline OP
Newbie
Danielson  Offline OP
Newbie
D

Joined: Jan 2008
Posts: 5
Vancouver, BC, Canada
so i loaded it as a entity vs add as a sprite and it now works, except theie is a black outline whihc didnt get transparecied, and it pauses for about a frame between loops.
if i add a single frame for just a still the transparency is perfect.??
is that cuz the last frame is the worng size, doesnt know whatim throwing at it?

like kasmir said shoudl they all be 1100x217, and only contain the feame of the file like this?

fire1.tga( fire1, space, space, etc till the blank reaches 1100)
100x217 100x217 100x217 100x217

fire2.tga( space, fire2, space, etc till space reaches 1100total)
100x217 100x217 100x217 100x217

....im not sure about that?
it seems to work the way i have done it? but has those 2 problems....


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1