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.

DarkBASIC Professional Discussion / Animated sprite not showing up

Author
Message
saintvicious
15
Years of Service
User Offline
Joined: 6th Feb 2011
Location:
Posted: 6th Feb 2011 23:17
My animated sprite isn't showing up. It's a sprite sheet made up of 4 sprites. Here's my code:

Set Display Mode 640, 480, 32
Sync On
Sync Rate 60

create animated sprite 1, "animation.bmp", 50, 50, 1

set current bitmap 0

// Main Loop
Do
play sprite 1, 1, 4, 50
sprite 1, 200, 200, 1
Sync
Wait 1
Loop
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 7th Feb 2011 06:49 Edited at: 7th Feb 2011 06:52
It's showing the sprite exactly the way you wrote it... the only thing is you told it there are 50 frames across and 50 frames down. So it's cutting up the image to show 2,500 frames (if the sprite sheet isn't too big they may be a single pixel for each frame). To get it to work you just reduce it to the actual number of frames across and down which is probably 4 across and 1 down.



Login to post a reply

Server time is: 2026-07-16 00:07:56
Your offset time is: 2026-07-16 00:07:56