Page 1 of 1

sBasic-Coin multi-frame sprite

Posted: Wed Mar 16, 2016 4:40 pm
by Operator
Maybe someone can use this in a game :D

Dropbox-Link for the multi-frame coin:
https://www.dropbox.com/s/z3rbu2utrnhi8 ... i.png?dl=0

Code: Select all

REM sBasic Coin Animation
REM sB 5.4 / iPhone 4 / iOS 6.1 / by Operator
REM maybe usefull for a game...

OPTION SPRITE POS CENTRAL
GRAPHICS
GRAPHICS CLEAR

coin$ = "coins sBasic 72dpi.png"
SPRITE "coin_ani" LOAD coin$, 3,2
SPRITE "coin_ani" AT 160,160
SPRITE "coin_ani" SHOW
SPRITE "coin_ani" LOOP

'it won't animate without this empty loop 
LOOP:
GOTO LOOP

Re: sBasic-Coin multi-frame sprite

Posted: Wed Mar 16, 2016 6:30 pm
by rbytes
Cool! dId you use sB to create it?

To cut down on CPU load, you could add the command SLOWDOWN just before GOTO loop. This won't affect the speed of the animation playback, but just slow the looping down.