? How to make a sprite from text! ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

How to make a sprite from text!

Making a text sprite is pretty straightforward, however, it may not be obvious at first glance how to create one. First, set the graphics page you’re editing to the fourth, or the spritesheet. GPAGE 0,4 Next, clear a space out for your text. I’ll be using the entire first 8 rows of pixels for text space. GFILL 0,0,512,8 After that, graphically print the text in there. Make sure you’re printing in the cleared out space, or you’ll get some other sprites underneath, unless you want that. Note: You should set the scales to 1, since you can always just use SPSCALE to change the size, which supports more than just integers. GPUTCHR 0,0,”Chicken drumsticks<<“,#GREEN Now, define a sprite that encases the text. SPSET ID,0,0,LEN(”Chicken drumsticks<<“)*8,8 Finally, just change the graphical page back to whatever it was before, such as 0 (top screen). GPAGE 0,0 That’s it!
Author
auceps
Updated
Rating
2 votes
Categories
Keywords
3 Comment(s) random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies You didn’t add enough arguments to GPAGE. It should be GPAGE DISPLAY,MANIPULATION auceps auceps too old to criticize too dumb to criticize spend time wisely drink milk to grow your bones random_god random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies You're welcome