Talk:SmileBASIC (Petit Computer 3)/@comment-15296152-20150624200939

Dunno if this was part of the new update, but I saw that they included callback functions for BGs and sprites.(BGFUNC and SPFUNC). You assign a label (or DEF?) to a particular BG/SP, and then when you do CALL BG (or CALL SPRITE), it'll go through all of the BGs/sprites that have a function assigned to it (with using CALLIDX to indicate which BG/sprite is currently being processed).

This sounds incredibly useful. Take for instance, you have a bunch of enemy sprites, all with different AI. Instead of having to sort through all your sprites and jump to whatever AI you have assigned to them, you assign via SPFUNC, and then just do CALL SPRITE.