? Display a Sprite ● SmileBASIC Source

Sign In

*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)
Currently in "Random page " mode! Reload to get another random page, or click the "Leave random" button below! Bookmarking this page will not work, and the page is read-only.

Display a Sprite

Here are my notes on how to display an animated sprite. XSCREEN 2 'enables use of the touch screen SPSET 0, 724 'defines a sprite '1st arg 0-511, control number for sprite '2nd arg, sprite number 0-4095 SPOFS 0,50,50 'moves sprite into place '1st arg, control number '2nd and 3rd are x and y, 4th is z SPSCALE 0,8,8 'scales up sprite '2 and 3 are x and y SPANIM 0,"I","@SPRITE",0 '1st control number '2nd is what changes, I is sprite number '3rd is data label '4th 0 to specify endless loop @SPRITE DATA 4 'first data is number of frames DATA 8,724 'delay, then sprite template number DATA 8,725 DATA 8,726 DATA 8,727
3 votes
  • sprite
4 Comment(s) HitomiHoshino HitomiHoshino You can display more than one sprite by replacing the 0's for the control with another number and doing the same kind of commands again. TheRealGamerBoy07 TheRealGamerBoy07 How can you display 2 (or more than 1) sprite? I need It for my 2-4 player local multiplayer topview driving game. HitomiHoshino HitomiHoshino I managed to display that graphic without SPDEF. So far I have stumbled onto this without it. Please mention more about it. MyLegGuy MyLegGuy But...but...you didn't say anything about SPDEF.