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

#1 2007-12-20 11:03:09

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

ScratchResources.tk available in beta!

This topic is closed. The new thread is:

http://scratch.mit.edu/forums/viewtopic.php?id=3217

Last edited by JSO (2008-01-30 12:39:04)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#2 2007-12-20 11:05:47

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: ScratchResources.tk available in beta!

Wow, that's impressive, Joren. I like the idea of a Scratch resources site!


Jens Mönig

Offline

 

#3 2007-12-20 11:59:54

MyRedNeptune
Community Moderator
Registered: 2007-05-07
Posts: 1000+

Re: ScratchResources.tk available in beta!

Yay! Very cool.  smile  The Scratch website layout makes it look like part of the websitte... anyways, great job on this!  big_smile


http://i52.tinypic.com/5es7t0.png I know what you're thinking! "Neptune! Get rid of those filthy advertisements and give us back the Zarathustra siggy, you horrible person!" Well, don't worry about it, the Zara siggy will be back soon, new and improved! ^^ Meanwhile, just do what the sig tells you to. >.>

Offline

 

#4 2007-12-20 12:16:44

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: ScratchResources.tk available in beta!

Very nice.  Keeping it organized by category will make it useful to sprite hunters.  (But a lot of work for you...)

Feel free to post any of my sprites that are of interest, all of mine are done in the Scratch editor.  I had some comments on the sprites in:

http://scratch.mit.edu/projects/EdnaC/52985

There is a nice "Tie-Fighter" with a bunch of costumes that let it "roll". 

It would be nice to be able to export sprites without their scripts (which may not be useful and could be very confusing to new users if there are a lot of them).  I'm not sure if there is a way to export the sprite less its scripts?

-Mr Ed

Offline

 

#5 2007-12-20 13:04:07

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

Thats why I like my own scripts... I have to type one rule of text, and my scripts do the rest (putting them into the right categories, replacing homepage, refreshing stats,...)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#6 2007-12-20 13:05:25

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

All scripts are changed before uploading, espacially to make them usefull/easy for new users. And you can delete scripts before uploading (all sprites containing the message "no script").

Joren

Last edited by JSO (2007-12-20 13:09:52)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#7 2007-12-20 14:27:11

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: ScratchResources.tk available in beta!

Amazing work JSO! I am very impressed. We have been meaning to implement a section on the website like that but we never did it. You have made it! How does it work? How much of it is automated? It would be cool to use your ResDaP platform on ScratchR !  big_smile


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#8 2007-12-20 15:16:46

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

I would like to offer the scripts, but i think it's some kind of... "ugly" scripted.

The spritedata is stored in one big array. This is a part of ResDaP.js, where the sprites array is generated:

//define sprites array

sprites = new Array()
//sprites[id] = new Array("previewName","creatorName","filename","category")

example wrote:

sprites[0] = new Array("Linebot","JSO","linebot","tech")
sprites[1] = new Array("Drawing pencil","JSO","pencil","things")
sprites[2] = new Array("3D Rallycar red","JSO","3Dredcar","transportation")
sprites[3] = new Array("Round preloader","JSO","preloader","tech")
sprites[4] = new Array("Earth melting (ani)","MyRedNeptune","earthmelting","fantasy")
sprites[5] = new Array("Flying dragon","MyRedNeptune","flyingdragon","fantasy")
sprites[6] = new Array("Girl","angelical","girl1","people")
sprites[7] = new Array("Walking boy","MyRedNeptune","walkingboy1","people")
sprites[8] = new Array("3D Mario running","Mick","3dmariorunning","fantasy")
sprites[9] = new Array("3D airplane","Mick","3dairplane","transportation")
sprites[10] = new Array("Flightsim control","JSO","realisticplane","tech")
sprites[11] = new Array("Neo","kuri","neo","fantasy")
sprites[12] = new Array("ABC dotted","JSO","ABC_dotted","letters")
sprites[13] = new Array("Horse gallop","MyRedNeptune","horsegallop1","animals")
sprites[14] = new Array("Button","JSO","button1","things")
sprites[15] = new Array("Button","JSO","button2","things")
sprites[16] = new Array("Button","JSO","button3","things")
sprites[17] = new Array("Spaceship +thrust","EdnaC","ship1","fantasy")
sprites[18] = new Array("Controlled bus +snd","JSO","bus1","transportation")
sprites[19] = new Array("Eye","JSO","eye","fantasy")

I have to write this array myself, and i have to upload a "(filename).sprite" file and a (filename).PNG file.

All of the project-pages are partly generated automatically. The header, footer,... are designed in html. All other stuff (table, sprite thumbnails, download links, user page link, category) is generated by document.write()

Starting from the sprites array, newest projects can be defined, because I always add a new line to the array. last element is last added.
This is an example of how the "newest" sprites are writen

example wrote:

function writeNewest() {
    var cell = 1
    document.write('<table width=540 border="0">')
    for (row=1;row<4;row=row+1) {
        document.write('<tr>')
        for (column=1;column<4;column=column+1) {
            document.write('<td width="180">')
            document.write('<font face="Arial" size="3" color="black">')
            document.write('<a href="files/sprites/data/' + sprites[sprites.length-cell][2] + '.sprite"><img src="files/sprites/preview/' + sprites[sprites.length-cell][2] + '.PNG" border="1" width="120" height="120"></img><br>')
            document.write(sprites[sprites.length-cell][0] + '</a><br>')
            document.write('by: <a href="http://scratch.mit.edu/users/' + sprites[sprites.length-cell][1] + '">' + sprites[sprites.length-cell][1] + '</a><br>')
            document.write('Cat: ' + sprites[sprites.length-cell][3])
            document.write('</font>')           
            document.write('</td>')
            cell = cell + 1
        }
        document.write('</tr>')
    }
    document.write('</table>')
}

Spotlights are three variables containing the ID in the sprites array.

for the Categories, a new array is created containing

catagoryData[catagoryNumber] = new Array(spriteID,spriteID etc.)

using for loops.

This is not everything, but it is enough to show you how ugly it's scripted
But it works, that's the most important to me...

You can download the script file here
remove the .txtdocument, i've added it so it won't show up in the browser himself.

Thanks,
Joren Lauwers

Last edited by JSO (2007-12-20 15:17:46)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#9 2007-12-20 21:03:07

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: ScratchResources.tk available in beta!

Absolutely  brilliant.!!!!!  :-)

I downloaded the FlightSim sprite and was amazed how simple the code was for it.

Please work with Scratch team and get this incorporated into the "official" website!

regards

Simon

PS Great work!!!!!!

Offline

 

#10 2007-12-21 04:36:00

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: ScratchResources.tk available in beta!

This is really great!  I tried the Flightsim sprite as well, pulled it down, double-clicked on it and there I was, in Scratch with a working sprite.  Wonderful!  Thank you so much for putting this together.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#11 2007-12-21 05:37:55

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

Thanks a lot!


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#12 2007-12-22 09:16:22

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

I've added the sounds section. Please report bugs in ResDaP, when i think it's bug-less,  I will take it out off beta.

I've added something "new" to scratch, in the sounds section. you can download MIDI sprites (they are listed as sounds, with size and length): these MIDI-sprites are normal sprites containing a few scripts with MIDI commands (play note__ for __ secs). Complete with bass, drum, melody, 2nd melody,...
You can implement them in your projects very easy, they have a very small filesize (3KB for 40sec of sound!). You can also modify the melody if you want to.

NOTE: sprites does not contain a creator-history, like scratch projects. So the message "based on ___ work" will not appear. Every creator of ScratchResources sprites/sounds has worked hard on it. please put the name of the creator, and "scratchresources" in you projects' tags if you upload it to the website. Thanks!


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#13 2007-12-22 13:18:28

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: ScratchResources.tk available in beta!

JSO, how are you creating the MIDI sprites?  Are you dragging lots of blocks and typing in notes, or do you have an automatic converter from MIDI files? 

If the Scratch team would release the documentation for the format for sprites, it might not be too hard for someone to write a converter from one of the standard MIDI file formats to MIDI scripts.

Offline

 

#14 2007-12-23 02:59:12

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

I was exactly thinking the same a few days ago! "Maybe I am able to import MIDI files..." but it doesn't work. Then I was thinking about a program to convert MIDI's to Scratch code, and how it can work.

But i don't think it is possible to create one, because one sprite only can handle one instrument, even with multiple scripts (I've tried this out). And, the new "beat" system of Scratch is pretty buggy,

(play note for (2) beats)
(play note for (2) beats)

has not the same length as

(play note for (1) beats)
(play note for (1) beats)
(play note for (1) beats)
(play note for (1) beats)

So i think the beats per minutes still refers to a length in seconds.
I would suggest a build in "metronome" so the scratch scripts keep at the same rithm.

So, the answer at your question: I'm currently dragging all the blocks together.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#15 2007-12-23 10:53:39

Technic20
Scratcher
Registered: 2007-09-16
Posts: 69

Re: ScratchResources.tk available in beta!

what program did you use to create that site?


~~~Check Out My Projects!~~~

Offline

 

#16 2007-12-23 13:34:58

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: ScratchResources.tk available in beta!

I wrote a little program to check JSO's assertion about the duration of notes.
http://scratch.mit.edu/projects/kevin_karplus/71740

Sure enough, on my machine, notes take about 5-15 milliseconds longer than they ought to.  This is probably the overhead of the scratch interpreter.  Since the extra delay is unpredictable, it makes attempts to translate music automatically from MIDI formats rather difficult.

What real-time programs usually do to avoid this latency is to compute ahead of the clock, and queue up actions that will be started at precise times.  Doing this in scratch would require some pretty big changes to the interpreter, and could be very difficult to get right.

Another approach is to make the interpreter so fast that the delays are negligible (this is the approach of things like the Java byte-code interpreter).

A somewhat klugier approach is to have the interpreter compare how long the previous note was supposed to last and how long it actually lasted, and use a smoothed average of those measurements as an adjustment to the actual durations.  That approach should reduce the error by a factor of 2 or more, and is easier to implement than a properly buffered queue of notes.

Offline

 

#17 2007-12-24 03:13:58

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

Technic20 wrote:

what program did you use to create that site?

Maybe it is stupid, but i created it with wordpad. I've typed every html code on that site. The javascripts are also created with wordpad.

The sprites are created with scratch, ofcourse. And the sounds with Audacity.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#18 2008-01-06 13:12:22

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

I want to add scratch tutorials to scratchresources.tk. What do you think about that?


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#19 2008-01-07 17:28:30

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: ScratchResources.tk available in beta!

When I downloaded some of them, they had a wierd red block that just plainly said "obsolute!". I right clicked on it and clicked help but it did not show anything. What is that block?


http://i.imgur.com/WBkM2QQ.png

Offline

 

#20 2008-01-07 17:32:19

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

Re: ScratchResources.tk available in beta!

Lucario621 wrote:

When I downloaded some of them, they had a wierd red block that just plainly said "obsolute!". I right clicked on it and clicked help but it did not show anything. What is that block?

Obsolete blocks are block that were removed from earlier versions of scratch.


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

 

#21 2008-01-07 19:39:47

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: ScratchResources.tk available in beta!

archmage wrote:

Lucario621 wrote:

When I downloaded some of them, they had a wierd red block that just plainly said "obsolute!". I right clicked on it and clicked help but it did not show anything. What is that block?

Obsolete blocks are block that were removed from earlier versions of scratch.

What did they do and which versions of scratch?


http://i.imgur.com/WBkM2QQ.png

Offline

 

#22 2008-01-07 19:49:32

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: ScratchResources.tk available in beta!

Cool

Offline

 

#23 2008-01-08 14:01:26

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

What sprite have you downloaded?

I've seen that, when they remove blocks from an earlier version, the obsolete will never show - it only colors red. Try to download the newest version of scratch.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#24 2008-01-08 15:26:05

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: ScratchResources.tk available in beta!

I have version 1.2 (not 1.2.1) but I downloaded one of the songs.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#25 2008-01-09 07:48:01

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: ScratchResources.tk available in beta!

Just download 1.2.1, this contains several bug fixes from 1.2


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

Board footer