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

#1 2010-10-02 17:22:16

Nitezscratch
Scratcher
Registered: 2008-06-20
Posts: 43

Sprite Generation

A generate _ block would work much like a broadcast.  You would name it, and a dialog box would come up (similar to building a block in BYOB) where you would build a script.  Then you could draw a costume.  Once you were done, your work would not show in the program until the generate block was activated.  The costume would appear, preform the scripts placed in the box before hand, and then be removed from the program. It would allow sprites to be created on the fly.

So you say, "why not just hide the sprite and show it when necessary?" Without a generation system, you can only show/hide sprites that exist. Each sprite that exists makes the file size larger. A generation system would do wonders for space-shooter games where only so many projectiles can be on-screen at once.  It would be similar to the pen tool, except you could have all the control you have of a sprite.  Scratch is one of the few programming languages that doesn't have a generation function.  This should definitely be a priority when making the next version of Scratch.

Anyone have anything to say about this idea?


http://nitezproductions.com/box.pnghttp://nitezproductions.com/sig.gifhttp://nitezproductions.com/box.png

Offline

 

#2 2010-10-03 05:58:02

Repto
Scratcher
Registered: 2010-01-10
Posts: 88

Re: Sprite Generation

i agree, I have often found problems when trying to get enough projectiles to make a game interesting and have often had to resort to beams or 1 shots with massive reload times.


http://scratch.mit.edu/static/projects/Repto/1074910_sm.pngandhttp://scratch.mit.edu/static/projects/Repto/1184314_sm.pngMy most successful projects!

Offline

 

#3 2010-10-03 12:14:53

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Sprite Generation

There's already a similar feature which is likely to be in Scratch 2.0.  tongue
http://suggest.scratch.mit.edu/forums/6 … ?ref=title


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2010-10-07 10:33:33

FuzzyCat007
New Scratcher
Registered: 2010-06-19
Posts: 5

Re: Sprite Generation

Would the generate block work like

var mySprite = new mySprite;

used in JavaScript/Actionscript, Ruby, C++,
and other object-oriented languages?

Offline

 

Board footer