? 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 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 That’s it!
Author
kenchic
Updated
Rating
1 vote
Categories
Keywords
0 Comment(s)