This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-08-30 14:32:49

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Another performance question

For a scrolling archipelago, which is best, a big sprite of many islands with lots of transparancy and one set of scripts or many small sprites, one for every island, that all need to have their own movement scripts?

http://scratch.mit.edu/projects/AlveKatt/32539

Thanks.

Offline

 

#2 2007-08-30 14:59:24

Sawman3
Scratcher
Registered: 2007-07-19
Posts: 97

Re: Another performance question

AlveKatt: based on what you already have, I would suggest going with the single sprite idea.  Just incorporate the islands into your (already, I see) nicely scrolling background.  That way, what you want to do requires no more coding than perhaps a slight expansion on what you already have.  Hope that helps!  smile


"These are the old days, the glory days...they're back."

Offline

 

#3 2007-08-30 16:20:12

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Another performance question

I don't think you can have a sprite larger than the screen, which makes the question moot - you will probably have to go the many islands route, though some sprites might contain 2 or maybe (if very small) 3 Islands.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#4 2007-08-30 16:51:55

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Another performance question

Well, I would need more than one island per size of the screen. Just so you allways have at least one in every dimension on screen, otherwise there would be no reference points to show you that you are really moving.

Offline

 

#5 2007-08-30 17:03:55

Sawman3
Scratcher
Registered: 2007-07-19
Posts: 97

Re: Another performance question

Mayhem: it wouldn't need to be larger than the screen, would it?  It would just have to be larger than the *cropped* screen Alvekatt created--it would just rest 1 layer back from the edge sprite.


"These are the old days, the glory days...they're back."

Offline

 

#6 2007-08-30 17:25:49

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Another performance question

The cropped screen is Mayhems creation. I did manage to get scrolling done on my own, but it was much too laggy to be usable. So Mayhem lets me use his scrolling code that is much more optimized.

Offline

 

#7 2007-08-31 03:31:27

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Another performance question

Sawman3 wrote:

Mayhem: it wouldn't need to be larger than the screen, would it?

If it wasn't it would rather defeat the whol epurpose of scrolling. 

If I were you, Alvekatt, I'dd draw out the entire archipeligo as one picture, its height and width an exact multiple of the window size of the scrolling engine.  Draw your islands against a single colour, non-detailed background.  Slice it into screen-sized sprites (Reiner's Tilecutter is a good program for this) then import these into scratch.  Finally, use flood fill to make the sea on the sprites transparent.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#8 2007-08-31 12:14:17

Sawman3
Scratcher
Registered: 2007-07-19
Posts: 97

Re: Another performance question

I know Mayhem...didn't you read the rest of my post?  It just needs to be larger than the CROP


"These are the old days, the glory days...they're back."

Offline

 

#9 2007-08-31 13:54:22

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Another performance question

I did read it, and my comment stands.  It would be a waste of time to scroll a background that is, in total, no larger than than the screen, since you could just display it full screen with no need for scrolling. 

The "frame" or lack of it is irrelevenat to this argument, since it is a purely arbitrary device.  If the background behind the frame is no bigger than the full screen, just get rid of the frame.

And I'm pretty sure that Alvekat wants his play area to be greater than a single screen.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#10 2007-08-31 14:21:20

Sawman3
Scratcher
Registered: 2007-07-19
Posts: 97

Re: Another performance question

Right.  What i was saying was just for an illusion of scrolling--it wouldn't really be effective at all, as you say--i though that was what he was going for.  Sry  big_smile !


"These are the old days, the glory days...they're back."

Offline

 

Board footer