Program1031.comTM
Game Programming Help for Beginners!
Home Need Help? Start here!
Questions and Answers
Get Exclusive Stuff!
Email Newsletter

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


Answer:

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

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
smileBASIC
Help, References, and Tutorials

Download Books
Search Downloadable Books from Program1031.com

Home Questions and Answers Email Newsletter
Watch our YouTube channel Read our Twitter feed
Content and Design © 2012-2023 Program1031.com. All Rights Reserved. | Privacy Policy | Terms of Service
All Copyrights and Trademarks of mentioned products are copyrights and trademarks of their respective owners.

As an Amazon Associate and ChristianBook.com Affiliate, Breakthrough Gaming LLC earns a commission on qualifying purchases from Amazon.com and ChristianBook.com through our website. Thank you for your purchases!

Our other websites: