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.

2D All the way! / 2D animation in classic

Author
Message
hpfan273
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 24th Jul 2007 02:21
how do i take an image with a whole bunch of little images ((( like this one ---><--- ))) and animate it in DarkBASIC classic??? i really need help, my whole game is sprites... so yea... lol

Why do they turn against me? Especially when i need them the most?
MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 24th Jul 2007 02:49
You could cut all the sprites out (in paint or what have you), put them in individual files, and load them sequentially.

Alternatively, paste the image and use for-next loops to jump to each sprites coordinate in the image, and use get image.

Or, you could look into memblocks to do the same thing. Presumably, they'll be handy for cutting up images bigger than the screen.

Shadow heart
17
Years of Service
User Offline
Joined: 2nd Dec 2006
Location: US
Posted: 24th Jul 2007 02:54
yeah i cut them out. i used to take gif sheets like that and make huge animated gifs of like storys of megaman killing sonic or something. lol.z

haha lets rock this world.
da power pwnerer
17
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 28th Jul 2007 01:10
Or you can get DarkBASIC Pro and use its sprite commands


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Jul 2007 23:57
It's much simpler than that, just load the bitmap (as a number other than 0) into DBC and use GET IMAGE for each of the images, they look the same size so you could use a FOR loop for this, much quicker
The once you have all the images you just need to make a routine for changing the image number used by your sprite.

I am King of the noobs!
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 12th Aug 2007 00:39
Incedentally, is that you're image? If so, good good good.

(N-1)/n*100<n2/n-n/2+n/4*2+100
hpfan273
17
Years of Service
User Offline
Joined: 19th Jan 2007
Location:
Posted: 14th Aug 2007 04:30
lol... no... if u mean did i make it? no... and if u mean... am i using it? no... lol... it waz just a random example i found

Why do they turn against me? Especially when i need them the most?
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 14th Aug 2007 22:31
Ah.

(N-1)/n*100<n2/n-n/2+n/4*2+100
Fa1con
16
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 22nd Aug 2007 05:55
ok first make all the animation in one row
then this code



[u]FOR i = 0 TO 5
rem the 5 is the amount of frams you have(how many images in your row)
GET IMAGE i+1, X1+(45*i), X2, Y1+(45*i),Y2
NEXT i

PlayerAnimationFrame = 1
PlayerANimationFrameOffset = 0



this means when you press rightkey the animation will start
make sure all images are same width apart
this code works so if you have any other questions feel free to ask
hope that helped

Login to post a reply

Server time is: 2024-05-19 06:42:06
Your offset time is: 2024-05-19 06:42:06