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

#1 2010-10-28 15:18:04

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

an alternative to cloning? help!

Hi guys, I have a question...

I'm working on a project, and  I'm trying to cut back on sprites as much as possible to make the project smaller and faster, then cloning what sprites there are (i'm in Panther) allowing them to act as more than one sprite until they're not needed. I have found this to be a very sucessfull technique, though a little harder to code.

Now, I have an area with 42 spaces for a maximum of 42 items. I initially had one sprite that cloned itself 42 times to fit into and meet the needs of every space at once. However, it took quite a while to generate the 42 clones (15 seconds or so) and also slowed the project down quite a bit, especially when you pressed stop and the clones automatically deleted themselves.

I have a few alternative coding methods and I'd like to hear others or suggestions for which is best for this situation, discussions often help find the best solution, discussions have shown ;P

♦ Create 42 permenant sprites (I don't like this one, too many sprites  sad  )

♦create 6 sprites (one for each row of 7 spaces) and let them move around on their line, changing 7 spaces to the correct items, jumping back and forth.

♦ create one sprite that moves over every one of the 42 squares as they are needed (this would cause a loading time I'm hoping to avoid)

Input is greatfully recieved!

Sparks


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2 2010-10-28 15:32:08

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: an alternative to cloning? help!

I would make 1 sprite that clones itself 6 times and each takes a row.


You can now reach me on Twitter @johnnydean1_

Offline

 

#3 2010-10-28 15:41:08

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: an alternative to cloning? help!

that's an interesting idea! Very clever, thanks!

Last edited by sparks (2010-10-28 16:05:46)


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#4 2010-10-28 16:20:39

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: an alternative to cloning? help!

Thats ok!


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer