Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Loading images from file

Author
Message
3ddd
22
Years of Service
User Offline
Joined: 14th Apr 2004
Location: Orlando, FL
Posted: 30th Apr 2004 17:54
I know the Create Animated Sprite command will load up a bunch of sprites that it cuts up from a graphic file (eg, .bmp). These sprite can then be pasted to a bitmap using the Set Sprite Frame and Paste Sprite commands. This is what I am currently doing in a tile based game I am working on. I have read that the Paste Image command would be far faster than the Paste Sprite command. First off, is this true?

If so, than I'd like to switch to pasting images instead. Is there a command similar to Create Animated Sprite that works with images and not sprites? I'd like to load a bunch of tiles from a graphic file, but not have to display the bitmap and then chop it up using a Get Image loop.

Thanks!
Derek
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 30th Apr 2004 18:11
Wow, that's a nice intelligent question. But, I don't know of a better solution. The way that I'd do it would be to load a splash/loading screen, sync, load the tiles bitmap, run the get image loop, load the next splash image, and sync again. That would hide it from the user during load time.
--
TAZ

3ddd
22
Years of Service
User Offline
Joined: 14th Apr 2004
Location: Orlando, FL
Posted: 30th Apr 2004 18:27
k, thanks. I just sort of figured we were past having to display images on screen in order to load a sequence of them. I guess I'll just stick to what I have working now and then optimize the tile rendering "engine" later. I'll probably do 1 of 2 things: 1)save each tile to a file and load each seperately and use Paste Image, or 2) convert my game to use the Matrix1Map plugin that Ian Mold wrote.
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 30th Apr 2004 18:53 Edited at: 30th Apr 2004 18:57
If you use the LOAD BITMAP command and load to a bitmap other than 0(screen) then the user won't see it. You can then split it up with GET IMAGE. Then delete the bitmap and switch back to bitmap 0.
Most of the time that will happen quick enough you won't need to bother with a splash/loading screen.

something like this


i won't see you in the pit
3ddd
22
Years of Service
User Offline
Joined: 14th Apr 2004
Location: Orlando, FL
Posted: 30th Apr 2004 19:31
That's very helpful, thanks!

Login to post a reply

Server time is: 2026-06-09 15:43:28
Your offset time is: 2026-06-09 15:43:28