images vs sprites...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

images vs sprites...

Post by tjo7777 » Thu May 08, 2014 9:04 am

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.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: images vs sprites...

Post by Klaus » Thu May 08, 2014 12:25 pm

Hi TJ,

there are no "sprites" in Livecode! The most similar thing is using images as icons in buttons :D
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

tjo7777
Posts: 34
Joined: Fri May 02, 2014 9:16 pm

Re: images vs sprites...

Post by tjo7777 » Thu May 08, 2014 5:34 pm

Thanks Klaus!

Post Reply