Operator
Posts: 138 Joined: Mon May 06, 2013 5:52 am
Post
by Operator » Wed Mar 16, 2016 4:40 pm
Maybe someone can use this in a game
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
Attachments
image.jpg (63.05 KiB) Viewed 1531 times
rbytes
Posts: 1338 Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max iPad Pro 11 MacBook Dell Inspiron laptop CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag:
Contact:
Post
by rbytes » Wed Mar 16, 2016 6:30 pm
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.
The only thing that gets me down is gravity...