Page 1 of 1

Noob: Couple of questions Sprites / Comment line

Posted: Fri Jun 07, 2024 3:25 pm
by Alan
Hi All,

Just starting out with SpiderBasic and have a couple of questions... Apologies if you get these all the time..

Can you animate sprite sheets with SpiderBasic and if not is there a some work around? -- ok seen sprite sheet query by foz so forget this one :D

and...

Is it possible to block comment "REM" lines of code with a start and end command, for example ;[ that would start and ]; to end the comment block
(hope that make sense) instead of putting ; on every line.

; this code is for testing
;[
code example
code example....
];

Thanks

Re: Noob: Couple of questions Sprites / Comment line

Posted: Fri Jun 07, 2024 4:12 pm
by plouf
hi

the logic of animating sprites is just dipslay sprite 1 then sprite 2 etc
you can load spriteshhet with loadImage() and then use draw functions to draw the specific part of image in the sequence of sprites
i.e draw top left to sprite1 top right in sprite 2 etc

but in general you can also cut it, in a paint program and just have sprite1/2/3 .png available:) faster way loading


As for comments you can select entire block in IDE and use rightclick to comment/uncomment all , its easy..
a "workaround" can be to use CompilerIf 0 (or 1) / compilerEndIf to block part of code

Re: Noob: Couple of questions Sprites / Comment line

Posted: Fri Jun 07, 2024 4:23 pm
by Fred
You can use clipsprite() to use sprite tiles

Re: Noob: Couple of questions Sprites / Comment line

Posted: Fri Jun 07, 2024 4:26 pm
by Alan
Thank you - just playing with clipsprite