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 / Ok, now i feel like a complete newbie for asking this but...

Author
Message
Cairne
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: The Internet
Posted: 28th Jul 2004 15:32
How do you make 2d animations? I do what the tutorials say to do but my animation never shows up on the screen.

I use darkbasic classic and i practically have no experience.
Cairne
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: The Internet
Posted: 28th Jul 2004 15:50
Oh, and by the way, this is the size of the animation i'm using and the code i'm trying to use.



The image is sized 1330 by 616, its 10 frames long, and each picture for the animation is 266 by 308

I use darkbasic classic and i practically have no experience.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 29th Jul 2004 02:29
I don't see anywhere in that code where you've pasted the image(s) for the animation to take place. Try doing that in the do--loop.

paste image #, x, y

Any truly great code should be indisguishable from magic.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Jul 2004 03:36
rem Load character into hidden bitmap
LOAD BITMAP "Hkick.bmp",1

rem Grab images for character animation
FOR y=0 to 1
FOR x=0 TO 5
GET IMAGE 1+x+(y*7),(x*200),(y*290),(x*200)+200,(y*290)+290
NEXT x
NEXT y

rem Delete character bitmap
DELETE BITMAP 1

rem Set player variables
xpos=0
ypos=300
image=1

rem Activate manual syncronization
SYNC ON

rem Begin Loop
DO

Rem Animate runner and wrap
image=image+1 : IF image>10 THEN image=2
REM HERE IS WHERE EXTRA CODE IS INSERTED************************
paste image image,100,100
rem ************************************************************
rem Refresh screen now
SYNC : SLEEP 20

rem End Loop
LOOP

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.
Cairne
20
Years of Service
User Offline
Joined: 30th Mar 2004
Location: The Internet
Posted: 29th Jul 2004 14:09
thanks i'll try those.

I use darkbasic classic and i practically have no experience.

Login to post a reply

Server time is: 2024-09-22 18:36:42
Your offset time is: 2024-09-22 18:36:42