Page 1 of 1

Posted: Tue Aug 31, 2004 8:25 pm
by carlinho
So I have this new collection of an archer
but somehow when I try to do the flying sequence of the arrow it sucks...
It looks like a static arrow flying straight
I went into the Myth bowman collection and I see it's treated as a texture???
and there's only one sprite in it , 1 frame 1 view of an arrow...
so how do they make the arrow fly and appear smaller when it's falling from just this bitmap...
What would I need sprite wise to do a flying arrow?
How would I do it?
Or if I copy the arrow of the bowman collection and I use that projectile for my unit...
How can I make the sequence last longer so they can shoot from far away and the range is not limited to the bowman 20 worldunits longer range?
Somehow I changes the range to 40 but it still keeps on shooting from a close range...
thanks!!!!!!!!!!!
carlinho

Posted: Wed Sep 01, 2004 9:08 am
by iron
To make Amber treat a bitmap as a texture, make sure its dimensions are powers of two. Eg 64x16, 128x32, 256x4 - whatever fits your image.

Posted: Wed Sep 01, 2004 11:28 am
by mauglir
It's also worth mentioning that the arrow itself can be any size, but it's bitmap must have dimensions that are a power of two. So, if your perfect arrow is 119 x 21 pixels, for example, you can just place that on a solid background color that is 128 x 32 pixels. Then when you idex the bitmap, just set the background color to be transparent (by making it the third color in the color table) that way all you'll see in game is the arrow without the background color. Is that clear as mud? :cool:

Posted: Wed Sep 01, 2004 3:09 pm
by carlinho
Right on!!!!!
I had no idea about pair of 2 sizes, so thanks a lot!!!!!
still I have no idea how they make the arrows smaller and falling with perspective from 1 bitmpap that's treated as a texture..???
and why a texture??
what does it tell to the myth engine and where does the animation for the arrow flight come from?
thanks guys!!!
carlinho

Posted: Wed Sep 01, 2004 3:21 pm
by haravikk
You need to make sure that the plain background for the arrow bitmap is the transparent colour (the third colour in your colour table). Once you have the power of two dimensions and the transparent background the image should appear as type 'RAW' in the bitmap list, it can now be selected as a texture (sprite that can be aligned 3 dimensionally).

If it still won't import as 'RAW' then try making sure the dimensions are also identical (ie 32 x 32, 64 x 64, 128 x 128) I've had trouble sometimes and having the dimensions identical has fixed it.

Posted: Wed Sep 01, 2004 7:57 pm
by iron
Only bitmaps designated as "textures" get enlarged/shrunk/pointed in the right direction like arrows and soulless javelins do. I haven't tried making it animate (arrows don't animate btw) but it may be possible to have several texture bitmaps in the sequence & have Myth loop through them.

Posted: Wed Sep 01, 2004 8:17 pm
by carlinho
thanks guys! I'll give it a try!
carlinho

Posted: Thu Sep 02, 2004 3:04 am
by carlinho
Damn...it seemed really easy...but somehow it's not working...
so I do this arrow 60 by 60 size, and the colour table shows blue as 3rd colour(although somehow I've been using all my new units with blue as the first colour??? I don't get it..
and then I import the bitmap into amber and ....still when I open a new sequence and I add that bitmap I still can't select it as texture...sigh...
maybe it's the way I import it...
As for the colour table I tried both ways...blue as first and blue as 3rd but still same thing...no texture...buahh!
help...thanks!
carlinho

Posted: Thu Sep 02, 2004 4:26 am
by lank
60 is not a power of two. try 64 (which is 2^6).

Posted: Thu Sep 02, 2004 1:43 pm
by carlinho
uhhhh....
reproved in mathematics again....damn...
thanks!
carlinho

Posted: Thu Sep 02, 2004 5:21 pm
by lank
:)