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

Question:
How do you draw a sprite on the screen in smileBASIC?


Answer:

In your code, you will need to use the command SPSET, like this:

SPSET 0,0000

SPSET is a command that creates a sprite in your smileBASIC program. Sprites are a big part of your game. They can be animated, they can move around the screen by themselves or by user input (by the player pressing buttons), detect collisions, and more!

The 0 after the command is the management number of this sprite. You can set this number from 0 to 511, meaning you can have 512 active sprites at can do certain things in your game at one time. (You can also create a variable, assign a number between 0 to 511 to that variable, and use that variable in SPSET to assign the number. As a note, when your game projects have more complicated code, this practice will become very important!)

The 0000 is the four digit sprite definition numbers. This number is assigned to a certain sprite in your sprite sheet. You can use the Smile Tool to see what sprites are in your sprite sheet and what each of their numbers.

If you run your code, you should see your sprite appear in the top right corner of the screen. Congratulations! Your sprite is now drawn on the screen! Explore and see what you can do! Now you might want to move your sprite to a different spot on the screen. Find out How to move your sprite to a different place on the screen here!

Page updated: October 17th, 2015 @ 10:43 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: