This is the development thread for the new JavaScript / HTML5 Cavnas scratch viewer known as JsScratch.
The aim of this application is to provide a more stable, more browser compatible, and more modern way to view scratch projects on devices ranging from iPods, Cell Phones, Game consoles, and of course computers.
The current staff consists of:
Project Managers / Main Programmers:
MidnightLeopard
MathWizz
Secondary Programmers:
ProgrammingFreak
*You must have an advanced knowledge of JavaScript and HTML to join*
Application progress:
Checklist:
Reading SB files Check.
Translating into morphs
Last edited by midnightleopard (2011-12-06 20:18:01)
Offline
Yay! I will upload what I have so far to http://jsscratch.site50.net/
Offline
My JS is okay, and so is my HTML5. I don't think I'll be able to help with the app, but maybe I can help with the website's other pages? Like contact us, report bugs maybe?
Or maybe I can test? I have an iPod touch, and I also have access to an iPad and iPhone. Although I think iPhone and iPod touch have the same screen size.
Remember, it's extremely hard to do it on iOS devices. First, you have to disable scrolling so it won't scroll while you try to press it. I suggest you have different sections, or at least be able to detect the device being used.
Offline
I'm with kayybee. I'm decent at both, and I can help some with the main app (such as developing the blocks and such, and maybe a possible way to deal with embedded blocks).
Offline
Wow! Two responses already! I personally think we should not have anymore than two or three developers because projects with more than that amount seem to die off and not get completed (like the old HTML viewer.) We could use testers for mobile devices for sure because we may not have all the devices we want to test on. I will have wait for midnightleopard to give his/her opinion before anything it official.
Offline
I can make several of the blocks already... like the "distance to [sprite]" block and such.
function distanceto(sprite1, sprite2) { (We want to assign X and Y positions for each sprite before blocks are executed in a class most likely, and then once after. I'll handle that later.) return sqrt((sprite2.y - sprite1.y)^2 - (sprite2.x - sprite1.x)^2); } (provided i got the functions right :P)
Hold on, are we using jQuery or no? If we are, a lot of the blocks should be simple...
I.e.
function clicked() { if $().clicked { report true; } else { report false; } }
It may take me a bit to catch up though, I'm sort of trying to remember... lol..
How would you put a variable in JS in the $().clicked function? (Lol, nevermind. Time to figure this out with JS. )
Last edited by bbbeb (2011-10-28 15:40:24)
Offline
No, we're not using jQuery. The hard parts are not the blocks at all. They are reading the file, creating all the Morph classes, and making a VM for the scripts.
EDIT: If you didn't notice, above I said I was using Jens morphic.js.
Last edited by MathWizz (2011-10-28 00:22:50)
Offline
We're not? Oh. Okay.
That solves a lot of things. And yeah, that's a pain.
Gonna take me a long while to even get anywhere with this..
Offline
Check out the current viewer at http://jsscratch.site50.net/.
We need a chat...
Last edited by MathWizz (2011-10-28 00:27:29)
Offline
I see it.
Technically, I should be in bed, but w.e. I'll see what I can figure out at the moment. That morphic is going to be a pain to figure out.
Offline
http://webchat.esper.net/ chanel: #jsscratch
Lol, I should be too.
Last edited by MathWizz (2011-10-28 00:27:50)
Offline
Your distance formula is wrong. You've got to square the differences and add them together:
sqrt( (x1-x2)^2 + (y1-y2)^2 )
And on the other forum Midnightleopard said you were only going to use one canvas. Are you going to buffer your images on separate canvases? This makes it faster to render images. If you're not familiar with the method, you can find it here. Basically, it is called "off-screen rendering". You make the image on an invisible canvas and put your images (costumes?) on it. Then, instead of rendering the image onto the visible canvas, you "paste" the invisible canvas on your "real" canvas. It doesn't make much of a difference in some browsers, but it helps tremendously on others.
Last edited by MoreGamesNow (2011-10-28 09:55:38)
Offline
MoreGamesNow wrote:
And on the other forum Midnightleopard said you were only going to use one canvas. Are you going to buffer your images on separate canvases? This makes it faster to render images. If you're not familiar with the method, you can find it here. Basically, it is called "off-screen rendering". You make the image on an invisible canvas and put your images (costumes?) on it. Then, instead of rendering the image onto the visible canvas, you "paste" the invisible canvas on your "real" canvas. It doesn't make much of a difference in some browsers, but it helps tremendously on others.
I don't know for sure, but I think morphic already supports this, so yes, we will be using it.
Offline
I'll join.
Offline
MathWizz wrote:
ProgrammingFreak wrote:
I'll join.
![]()
Hey PF! As I said above, I'll have to wait until midnightleopard comes on to confirm before anyone joins.
Thats fine.
Offline
Can I join too? I know lots of JS canvas.
Offline
MoreGamesNow wrote:
Your distance formula is wrong. You've got to square the differences and add them together:
sqrt( (x1-x2)^2 + (y1-y2)^2 )
My bad.
Offline
Yeah.
I have been looking around on the forums a lot (i just got back from a scratch break) and I have noticed some projects with giant amounts of people working on them. I can almost guarantee the failure of all of them.
We are going to absolutely keep it small, and we just started so I don't think we are ready to accept applicants yet.
Kayybee:
No thank you, we do not need any help with the website, but thanks anyways!
ProgrammingFreak:
What sort of things can you help with? We could use some help with reading sprites from the files.
HardMath123:
We don't need help with canvas at all right now, but we'll talk to you if your services are needed later.
bbbeb:
I know you are talented at this sort of thing, but did you seriously think jQuery could be used in Canvas???
I have ported lots of blocks into canvas before, and we don't really need help in that area at all. Thank you.
MathWizz:
We could use some testers, but we can just message them and ask if it works instead of adding them to the team. A lot of names on the staff board makes things slow down it seems to be. Also I am a boy, and I don't stay up till midnight.
Offline
I think that I might be able to do such a thing. I am pretty good with Javascript and PHP.
Offline
midnightleopard wrote:
We could use some testers, but we can just message them and ask if it works instead of adding them to the team. A lot of names on the staff board makes things slow down it seems to be. Also I am a boy, and I don't stay up till midnight.
I was thinking we would have a list of 10 or so testers with what device they had. Not high-priority, but may come in handy. I don't even know if what I have made so works on, say Android.
Offline
midnightleopard wrote:
bbbeb:
I know you are talented at this sort of thing, but did you seriously think jQuery could be used in Canvas???
I have ported lots of blocks into canvas before, and we don't really need help in that area at all. Thank you.
That was my bad, .
Well, I was thinking about trying to work on the coding for an execution engine using the pre-placed Morphic that Jens made and MathWizz had brought with him.
Problem is, there aren't any blocks or anything yet. So I'm sort of thinking how to parse the massive array MathWizz made.
Offline