It would be great if objects could be put in groups that we could use to detect collisions for objects of the same type, report variables and much more.
Here's how it would work.
Say we made a group called enemies. There would be "Add me to group ()" and "Remove me from group()" blocks, as well as "Empty group" etc. Now, we make a lot of enemies and add them to the Ememies group. Now - in the unfortunate player who has to face these enemies' scripts we put something like "if touching (Group (enemies)) { Set (Y-velocity) to (Y-velocity of (Trigger If))". Trigger if would refrence to the object from the group that the script interacted with.
An example of this would be the implementation in The Sims Carnival Game Creator. Trust me - it made multiple object collision a LOT easier.
Offline
RHY3756547 wrote:
It would be great if objects could be put in groups that we could use to detect collisions for objects of the same type, report variables and much more.
Here's how it would work.
Say we made a group called enemies. There would be "Add me to group ()" and "Remove me from group()" blocks, as well as "Empty group" etc. Now, we make a lot of enemies and add them to the Ememies group. Now - in the unfortunate player who has to face these enemies' scripts we put something like "if touching (Group (enemies)) { Set (Y-velocity) to (Y-velocity of (Trigger If))". Trigger if would refrence to the object from the group that the script interacted with.
An example of this would be the implementation in The Sims Carnival Game Creator. Trust me - it made multiple object collision a LOT easier.
This idea has been in my head for years. Now somebody agrees with me!
(does victory dance)
Offline
That feature would be helpful! I support as well. :-D
Offline
Woo.
Offline
Support. Definitely support. I NEED THIS!!!
Offline
Yep - this reminds me of the concept of class in object oriented programming. A cool idea - and it would be really useful!
There's always that tension between adding more features and maintaining ease of use. Could this be done in a way that would be easy and intuitive for a new Scratcher? (Or at least not be too confusing). These are the kinds of things we discuss at length in meetings we have about new features for Scratch.
If you like, you could make a mockup of how exactly this feature might look and work - complete with blocks and everything. It's always good to make nice graphics to help flesh out an idea!
Offline
Lightnin wrote:
Yep - this reminds me of the concept of class in object oriented programming. A cool idea - and it would be really useful!
There's always that tension between adding more features and maintaining ease of use. Could this be done in a way that would be easy and intuitive for a new Scratcher? (Or at least not be too confusing). These are the kinds of things we discuss at length in meetings we have about new features for Scratch.
If you like, you could make a mockup of how exactly this feature might look and work - complete with blocks and everything. It's always good to make nice graphics to help flesh out an idea!
OK - I'll make some mockups right now.
Offline
OK - here's a mockup of what the blocks will look like:
Offline
Hmm. We actually got a 'response'. That must be a good thing
Anyway, it seems too much like lists. (not just the color). How about a block so you can add a different sprite to Players or a group (not just yourself). Also make some mock-ups for the sensing blocks and stuff, so you can sense if your touching an enemy or wall etc.
Offline
And then it's hooray for classes, interfaces and strong typing, which will make Scratch another C#, just more blockier. I like this idea BTW, but IMHO - it's kind of too hard for an average scratcher (the mean average was taken down by some people).
Offline
Lucario621 wrote:
Hmm. We actually got a 'response'. That must be a good thing
Anyway, it seems too much like lists. (not just the color). How about a block so you can add a different sprite to Players or a group (not just yourself). Also make some mock-ups for the sensing blocks and stuff, so you can sense if your touching an enemy or wall etc.
For the colour - we can use Dark Brown.
I actually think the similarity to lists is a good thing - because for a start the list blocks are actually really good, and it'll get people familiar with the interface faster if they've already used lists.
I will make the mock-ups for those soon.
Offline
Example of Functionality:
This code would find out if the sprite is touching any member of the "Platforms" group, and if it is then it would change it's own X by the xvelocity of the group member it touched's Xvelocity.
The second code detects whether the sprite is in the group, and if it is the cat simply says something.
Last edited by RHY3756547 (2010-01-23 08:20:34)
Offline
filo5 wrote:
And then it's hooray for classes, interfaces and strong typing, which will make Scratch another C#, just more blockier. I like this idea BTW, but IMHO - it's kind of too hard for an average scratcher (the mean average was taken down by some people).
But the average scratcher can't even implement correct y-velocity anymore...
Offline
Let's make a reporter block (this sprite), which will be used in the <Group contains (Sprite)> -> <Group contains (this sprite)>. It's essential for object-oriented programming. An object must be aware of itself. And this will be still very easy.
Offline
filo5 wrote:
Let's make a reporter block (this sprite), which will be used in the <Group contains (Sprite)> -> <Group contains (this sprite)>. It's essential for object-oriented programming. An object must be aware of itself. And this will be still very easy.
Yeah - objects always need to be aware of themselves. But I'm sure the (if touching(<groupnamehere>) ) will not work with itself, as then it would always report true.
Last edited by RHY3756547 (2010-01-23 17:25:03)
Offline
How is this?
I think its about time we broke up the variables category!
Offline
illusionist wrote:
http://i45.tinypic.com/20rtvmw.png
How is this?
I think its about time we broke up the variables category!
Why not rename it? "Variables" is kind of one way - I didn't know lists existed to start with.
Offline
RHY3756547 wrote:
illusionist wrote:
http://i45.tinypic.com/20rtvmw.png
How is this?
I think its about time we broke up the variables category!Why not rename it? "Variables" is kind of one way - I didn't know lists existed to start with.
Breif history of Lists. One of the members of the Scratch Team is Jens. He lives in Germany. He does many hacks with scratch, and he created BYOB, and many alternate Scratch Elements. One of the things he made was lists. The Scratch Team decided to put it into the next version of scratch. done.
Offline
Lucario621 wrote:
RHY3756547 wrote:
illusionist wrote:
http://i45.tinypic.com/20rtvmw.png
How is this?
I think its about time we broke up the variables category!Why not rename it? "Variables" is kind of one way - I didn't know lists existed to start with.
Breif history of Lists. One of the members of the Scratch Team is Jens. He lives in Germany. He does many hacks with scratch, and he created BYOB, and many alternate Scratch Elements. One of the things he made was lists. The Scratch Team decided to put it into the next version of scratch. done.
Relation to my post = 1%.
Offline
This would be awesome! I don't think it needs to be broken into other categories though.
Offline
greenflash wrote:
This would be awesome! I don't think it needs to be broken into other categories though.
Yeah - I just think they should also rename the "Variables" section to something more general though.
Offline