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

#1 2008-09-11 17:23:31

Infinex_emperor
Scratcher
Registered: 2008-08-20
Posts: 9

Generating Sprites

I think, along with my labels suggestion, something that would revolutionize scratch would be the ability to generate sprites.

First, you make a base sprite.  The the code could be as follows.


When I receive "create enemy" generate sprite "enemy one"
If total enemies is < "your choice  (number)"
Change enemies(variable) by 1
Change total enemies by 1
ELSE
Set Enemy Max to 1

(variable) If "enemy one" 's health <1 delete sprite
change enemies by -1
broadcast "enemy died"

When I receive "enemy died"
If enemy max=0
broadcast create enemy




that can create never ending battles without having to make scripts that reuse sprites

Offline

 

#2 2008-09-11 17:24:57

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Generating Sprites

like cloning?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-09-11 17:26:42

Infinex_emperor
Scratcher
Registered: 2008-08-20
Posts: 9

Re: Generating Sprites

Bluestribute wrote:

like cloning?

yes like cloning

Offline

 

#4 2008-10-11 23:03:08

Infinex_emperor
Scratcher
Registered: 2008-08-20
Posts: 9

Re: Generating Sprites

You can use both generating sprites and labels put together by using this simple code:

[Generate sprite (pick random from 1-10<labeled enemy >) if there were ten enemies and you wanted to create a random one.

Offline

 

#5 2008-10-11 23:28:41

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Generating Sprites

Being able to duplicate sprites is the number 1 thing I think that scratch needs in order to let users create better projects. I've heard that this has not been included because new users would misuse it.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2008-10-19 09:30:28

TimeFreeze
Scratcher
Registered: 2008-08-11
Posts: 500+

Re: Generating Sprites

Duplicating sprites is a great idea. I hear a lot of people complaining about it, and how flash is much better since you can do that in flash, but putting it in scratch would be awesome. Though like archmage said, I think new users that are also new to programming might misuse it.


There are 10 types of people in this world: Those who understand binary, and those who don't. --[insert unrelated transition]-- GRANDILOQUENCE FTW!

Offline

 

#7 2008-10-19 10:21:30

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: Generating Sprites

TimeFreeze wrote:

Duplicating sprites is a great idea. I hear a lot of people complaining about it, and how flash is much better since you can do that in flash, but putting it in scratch would be awesome. Though like archmage said, I think new users that are also new to programming might misuse it.

Like a project, a sprite, forever, clone sprite,

Offline

 

#8 2008-10-19 11:40:31

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Generating Sprites

TimeFreeze wrote:

Duplicating sprites is a great idea. I hear a lot of people complaining about it, and how flash is much better since you can do that in flash, but putting it in scratch would be awesome. Though like archmage said, I think new users that are also new to programming might misuse it.

Even if scratch could duplicate sprites, flash would still be much better. There is a list of things that flash has over scratch.

Just like arrays made a big difference in the kinds of projects people could create, sprite duplication would also make a big difference. Though, it wouldn't put it up to the level that flash is at.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#9 2008-10-25 12:06:50

user
Scratcher
Registered: 2007-11-09
Posts: 1

Re: Generating Sprites

What about
{spawn sprite [ list ] ( number ) times}
and
(sprite id)

Offline

 

#10 2008-10-26 05:11:19

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Generating Sprites

I would love this.

So many times I haven't made projects coz there would be too many sprites and it would look scruffy, but this sounds like a great idea!


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#11 2008-11-22 14:23:35

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Generating Sprites

Now i understand how this will make good projects.

Like in a shooter you duplicate the bullets that way it would be easier than making 10 bullets for a machine gun.

Offline

 

#12 2008-12-04 00:05:14

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: Generating Sprites

I totally agree with the cloning. It would make shooting games easier to make. Or you could make games were you need to defeat as many enemies as you can in an allotted time. that would be great. Also you should have two different versions of Scratch. One for new members and one for member that have been deemed fit for cloning.

P.S. I know How Jamie gets things put on the site(He got the Remix bar under the games) and I think we should try get it that way.

P.P.S. I'll send Jamie here to see if he's on our side of this(most likely)
[Blocks]<Clone (Bad Guy) (10) times in (30)s>[Blocks]


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#13 2008-12-07 14:52:50

maneo9
Scratcher
Registered: 2008-04-17
Posts: 12

Re: Generating Sprites

I love that idea and i was trying to make a club thing but i needed to clone one sprite over and over again like clubpenguin when you are new it make's a new penguin.


Mac rules  smile

Offline

 

#14 2008-12-07 17:24:04

MartinWollenweber
Scratcher
Registered: 2007-04-10
Posts: 100+

Re: Generating Sprites

The Scratch "cloning-feature" discussion is a very old one. It's starting again and again here in the forum.

I also like cloning because doing lots of programs with multiple copied sprites. The "shift" cut/copy method helps, but with cloning I would have needed half the time for e.g. following programs:
http://scratch.mit.edu/projects/MartinWollenweber/1570
http://scratch.mit.edu/projects/MartinWollenweber/1848
http://scratch.mit.edu/projects/MartinWollenweber/1848
http://scratch.mit.edu/projects/MartinWollenweber/8708
http://scratch.mit.edu/projects/MartinWollenweber/20407
http://scratch.mit.edu/projects/MartinWollenweber/339425

John Malony told me, that cloning was already implemented in an older Prototype-Version of Scratch: The Scratch Team put it away because they thought  it would lead to many problems (infinity cloning, difficulty for Scratch-Starters to understand the concept...). I hope someday they find a good user interface for cloning so that it fits to the targets of Scratch: Easy to learn, powerful and fun to use.


Martin
...mitmachen beim  DACH-Scratch-Wiki und Scratch-Wiki-Autor werden!

Offline

 

#15 2008-12-07 20:02:52

TheSaint
Scratcher
Registered: 2008-11-04
Posts: 1000+

Re: Generating Sprites

What they could do is have a limit on the number of clones to like twenty per sprite. That way it would limit the infintie cloneing and yet give plenty of sprites.

Offline

 

#16 2008-12-09 10:13:07

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: Generating Sprites

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"


Check out my flash game site at http://subgaming.net/

Offline

 

#17 2008-12-09 10:28:02

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Generating Sprites

hmmm, i like TheSaint's idea, a limit of how many clones is possible per project

Offline

 

#18 2008-12-09 15:23:28

Buddy_ca111
Scratcher
Registered: 2008-08-30
Posts: 100+

Re: Generating Sprites

jamie wrote:

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"

Jamie is right that would happen alot with newbie scratchers. and they will all think they thought of it first and post their own. :| So mabye make a scratch version for only members that have earned there right to use a cloning tool. (people like the scratch team and Jamie and such.)


By reading this you agree to giving me your soul, money, passwords, projects, abiltys and your bases

Offline

 

#19 2008-12-09 15:26:52

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: Generating Sprites

Buddy_ca111 wrote:

jamie wrote:

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"

Jamie is right that would happen alot with newbie scratchers. and they will all think they thought of it first and post their own.  neutral  So mabye make a scratch version for only members that have earned there right to use a cloning tool. (people like the scratch team and Jamie and such.)

Hmm... Good, but I like TheSaint's idea better.


Check out my flash game site at http://subgaming.net/

Offline

 

#20 2008-12-09 15:28:39

jamie
Scratcher
Registered: 2007-03-28
Posts: 100+

Re: Generating Sprites

If newbie Scratchers are have limited features, how will they learn?

Like with unnecessary remixes, just don't do it  tongue   tongue


Check out my flash game site at http://subgaming.net/

Offline

 

#21 2008-12-09 16:23:10

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Generating Sprites

jamie wrote:

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"

You can do that in any language. For example.

while (1=1){
system.out.println("CRASH!");
}

This will freeze your PC.

If people submit projects that crash your pc onto the website you can just flag it. This would help people learn how to use their resources properly.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#22 2009-05-25 15:17:20

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Generating Sprites

Buddy_ca111 wrote:

jamie wrote:

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"

Jamie is right that would happen alot with newbie scratchers. and they will all think they thought of it first and post their own.  neutral  So mabye make a scratch version for only members that have earned there right to use a cloning tool. (people like the scratch team and Jamie and such.)

TheSaint has a point, but that would defeat the purpose of have the clone block in the first place! And i'm sure a noob could find a way around the limit per sprite, example:

             clone.
             broadcast: activate clone
             when i recieve: activate clone,
             clone.

and so on... i was thinking, maybe the script could turn red, as if there was some sort of error when you directly place a clone block into the forever block, and then the project would stop working.  wink

I really don't know.


http://i.imgur.com/8LX1NrV.png

Offline

 

#23 2009-05-25 15:21:02

illusionist
Retired Community Moderator
Registered: 2008-07-02
Posts: 1000+

Re: Generating Sprites

archmage wrote:

jamie wrote:

This sounds like a good idea, but one issue:

Name of project: "Computer Crasher"
Repeat Forever
Every 0.000000001 seconds
Generate 999999999999999 sprites. Name: "HAHAHAHA #"

You can do that in any language. For example.

while (1=1){
system.out.println("CRASH!");
}

This will freeze your PC.

If people submit projects that crash your pc onto the website you can just flag it. This would help people learn how to use their resources properly.

I'm sure they wouldn't do that on their own account, people are always creating junk accounts like hye76di7bcgu just to go insult someone or spam. They would never learn because they would never look at that account again.

I am very suprised that you overlooked that possibility archmage.  tongue


http://i.imgur.com/8LX1NrV.png

Offline

 

#24 2009-05-26 21:19:06

Leepurslow
Scratcher
Registered: 2009-05-26
Posts: 2

Re: Generating Sprites

Hey guys, so am I correct in thinking that my shoot-em-up game (ala Smash Tv) will have to use a new sprite example for every enemy onscreen?

No generating the same sprite over and over?

Offline

 

#25 2009-05-26 21:35:28

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Generating Sprites

When you generate a sprite you should be able to decide what scripts it has in it. Otherwise that script won't work.

When I receive "create enemy" generate sprite "enemy one"
[Add Script to : "enemy one"]
| Script
| Script
|----------|
If total enemies is < "your choice  (number)"
Change enemies(variable) by 1
Change total enemies by 1
ELSE
Set Enemy Max to 1

(variable) If "enemy one" 's health <1 delete sprite
change enemies by -1
broadcast "enemy died"

When I receive "enemy died"
If enemy max=0
broadcast create enemy

This Topic = Old  hmm

Last edited by Magnie (2009-05-26 21:36:08)

Offline

 

Board footer