LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Sprites 202 (Intermediate sprite control)

Root / Submissions / [.]

UltraPhoenix4Created:
You've figured out how to place and move sprites, but now it's time to find out the other things you can do with them! Again this is in layman's terms and there will be a TL;DR at the end.

Part 1: SPSCALE

Sometimes, you need your sprites to be a different size than the default. SPSCALE is the thing you need if that's the case. Open EDIT mode and type this in:
ACLS
SPSET 0,17
SPSCALE 0,2,2
Now your fish is bigger! Now let's break the code down: SPSCALE, like stated previously is used to resize sprites. 0 is the management number, get used to this because eventually I'll expect you to know it. 2,2 are the width and height I don't recommend going above 10 unless you really need to, because the sizes are pretty different.

Part 2: SPROT

And other times, you just want a spinny fish™. Use SPROT to fulfill your spinny fish dreams™. Open EDIT mode and type this in:
ACLS
SPSET 0,17
SPSCALE 0,2,2
SPOFS 0,45,45
WHILE 1
X=X+1
SPROT 0,X
VSYNC 1
WEND
NEXT
YEAH! SPINNY FISH™! Anyways let's break down the code: SPROT, is used to rotate a sprite to the specified angle. As simple as that. NEXT!

Part 3: SPHOME

When creating a spinny fish™ one may want their spinny fish to rotate along a certain point or pixel. You bet SmileBASIC has you covered. Open EDIT mode and type this in:
ACLS
SPSET 0,17
SPSCALE 0,2,2
SPOFS 0,45,45
SPHOME 0,8,8
WHILE 1
X=X+1
SPROT 0,X
VSYNC 1
WEND
NEXT
Yay, now spinny fish™ spins in place! Now for the code: SPHOME is used to set a reference point on a sprite. I like to think of it like a mouse cursor, the very tip clicky-part of the cursor is its reference point. And if you use SPHOME before SPOFS it moves the reference point there and all the other parts of the sprite follow. Just like a mouse cursor. TL;DR What we did:
ACLS
SPSET 0,17
SPSCALE 0,2,2
SPOFS 0,45,45
SPHOME 0,8,8
WHILE 1
X=X+1
SPROT 0,X
VSYNC 1
WEND
NEXT
Thanks again for reading, I hope I can make some future devs!

var MySprite = spset(0) is a life saver :) ^(suggestion :P)

Replying to:answer
var MySprite = spset(0) is a life saver :) ^(suggestion :P)
you can create objects? edit: "objects", lol. thanks for sharing this, even if it wasn't directed at me :D