Noob: Couple of questions Sprites / Comment line

Everything else that doesn't fall into one of the other categories.
Alan
Posts: 2
Joined: Fri Jun 07, 2024 3:04 pm

Noob: Couple of questions Sprites / Comment line

Post 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
plouf
Posts: 295
Joined: Tue Feb 25, 2014 6:01 pm
Location: Athens,Greece

Re: Noob: Couple of questions Sprites / Comment line

Post 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
Christos
Fred
Site Admin
Posts: 1821
Joined: Mon Feb 24, 2014 10:51 am

Re: Noob: Couple of questions Sprites / Comment line

Post by Fred »

You can use clipsprite() to use sprite tiles
Alan
Posts: 2
Joined: Fri Jun 07, 2024 3:04 pm

Re: Noob: Couple of questions Sprites / Comment line

Post by Alan »

Thank you - just playing with clipsprite
Post Reply