I made a simple game that requires images to be displayed rapidly. So far I have used images and manipulated them with setting the filehandle and using show/hide image.
I notice that sometimes the images do not seem to appear/disappear/change as quickly as I would like. I saw that some games use sprites. Would sprites be noticeably faster than using images?
Also will sprites work with somewhat detailed images like pictures or photographs?
Thanks for any advice or suggestions.
TJ.
images vs sprites...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: images vs sprites...
Hi TJ,
there are no "sprites" in Livecode! The most similar thing is using images as icons in buttons
Just set the ICON of a button to any image ID.
The images have to be in the stack already, be it as referenced or imported images.
This way they will be loaded when the stack opens and are immediately ready for us as icons in buttons.
This will be much faster than what you are currently using.
Please don't let the term "icon" irritate you!
We are used to see an ICON as a small image of some kind, but in Livecode this can be ANY image of ANY size!
Hope that helps!
Best
Klaus
there are no "sprites" in Livecode! The most similar thing is using images as icons in buttons

Just set the ICON of a button to any image ID.
The images have to be in the stack already, be it as referenced or imported images.
This way they will be loaded when the stack opens and are immediately ready for us as icons in buttons.
This will be much faster than what you are currently using.
Please don't let the term "icon" irritate you!
We are used to see an ICON as a small image of some kind, but in Livecode this can be ANY image of ANY size!
Hope that helps!
Best
Klaus