Yay! Very cool. The Scratch website layout makes it look like part of the websitte... anyways, great job on this!
Offline
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
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)
Offline
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 !
Offline
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)
Offline
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
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.
Offline
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!
Offline
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
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.
Offline
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
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.
Offline
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?
Offline
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.
Offline
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?
Offline
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.
Offline
I have version 1.2 (not 1.2.1) but I downloaded one of the songs.
Offline