Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / animate water

Author
Message
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 16th Aug 2003 08:40
hi
i am having problems trying to animate water. i am using a 1024x1024 bmp with 16 different frames. each frame is 256x256 when i set the fet image to 256 i get an error. [can not grab image due to an illegal area] if i set it to use 128 it will load it but my animation is off.. any idea's why i can't use 256

thanks.. code is in the source button
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 16th Aug 2003 16:22
I don't know if you have DBPro but if you do there are some sprite animation commands that load from a filmstrip like you're trying to do.

You are the th person to view this signature.
GRAVITY: I fought the law but the law won
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 16th Aug 2003 19:33
I ended up using an avi to do the animation. worked way better.. any yea i have DBPro
Beta1
21
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 18th Aug 2003 17:25
I think its because if its a 256x256 image the coordinates run from 0,0, to 255,255. Hence trying to include 256 is outside the available area.

spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th Aug 2003 00:09
See source box for working version.

Yuor biggest problem is loading piccy into bitmap 0 (which is the main screen). Depending on what mode you are running in, it is probably only 640*480 or 800*600. The image is therefore too big for the screen! Trick is to load into another bitmap and get images from that.

Also note that get image is a bit weird and you don't subtract 1 from right or bottom. So if you wanted to grab a 256*256 image you say:
get image 1,0,0,256,256 or get image 256,256,512,512, e.t.c.

The programmer formerly known as sonic
zao420
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: Canada
Posted: 21st Aug 2003 04:00
thanks spooky. i might go back to doing it this way. right now i am trying to use an avi. but havving some problems. i am not sure if i am doing it right or not but for some reason it don't work right..

loads the avi

plays avi to image and prepare the matrix


i used matedit to make the matrix. i tried i few different ways with out it working. so now i am trying to make it like this..

here is the avi. its only 502 kb
http://members.shaw.ca/wgraham1/martrix%20anim2.avi

the probleming i am having is every thing is pic 1 and i can see the water under that.

Login to post a reply

Server time is: 2024-09-20 19:37:04
Your offset time is: 2024-09-20 19:37:04