How do you move the position of a sprite in smileBASIC?


After defining your sprite using the command SPSET, you can use the command SPOFS to move it to a different position on the screen! Let's say your sprite definition number is 0 for the sprite you want to move. Your code would look like this:

SPOFS 0,60,100

SPOFS allows you to change the X coordinate and Y coordinate of a sprite on the screen. So in the above example, the 60 is the new X coordinate and 100 is the new Y coordinate of the sprite.

Run this code and see what happens. Your sprite should now have a new position on the screen! Congratulations! Try to make the sprite go in other parts of the screen! Explore and see what you can do!

Page updated: October 17th, 2015 @ 11:23 PM Eastern Time
To help organize our content, all of our game creation tutorial content is moving to our other site:
The move will take about two months to fully complete, so stay tuned!

Game Making Tutorials
Find tutorials about your favorite game creation software! Use the navigation below!

Game Maker: Studio
Help, References, and Tutorials
RPG Maker Fes
Help, References, and Tutorials
Help, References, and Tutorials

Need Help?
Search answers to game development questions or ask a question yourself
Get exclusive updates from!
Join the Email List
Download Books
Search Downloadable Books from
Copyright 2010-2018
All Rights Reserved.