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

#1 2010-04-13 19:39:15

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Mesh Blox

Hey! I was expierementing with the source code today, and I tried to make some blocks:
[start hosting mesh]
[join mesh at I.P (  )]

I can't figure out how to make them though. I tried a code for the first one:

Code:

('start hosting mesh' #- #startHostingScratchSession)

but it didn't work.

Anybody know how I could make it work?

(and I have no idea how to make the second one.)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#2 2010-04-13 19:43:04

gershmer
Scratcher
Registered: 2009-02-12
Posts: 1000+

Re: Mesh Blox

Is the command startHostingScratchSession defined anywhere in the source code. You have to actually define it.


Visit my site, Gershmer.net
Leave me a voicemail at my Google Voice number, [removed]

Offline

 

#3 2010-04-13 20:17:46

somelia
Scratcher
Registered: 2009-09-13
Posts: 1000+

Re: Mesh Blox

Yes, somewhere it is.

Offline

 

#4 2010-04-14 03:31:42

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Mesh Blox

I have it I can post my image if you want


You can now reach me on Twitter @johnnydean1_

Offline

 

#5 2010-04-15 07:16:58

TheGameMaster1231
Scratcher
Registered: 2009-07-24
Posts: 1000+

Re: Mesh Blox

johnnydean1 wrote:

I have it I can post my image if you want

How Did You Make Them? I'd Really Like To Know How So I Can Add It To My Mod.

Offline

 

#6 2010-04-15 07:25:41

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Mesh Blox

Ok, since panther is open source im allowed to this:

Code for host mesh block

Code:

hostMesh
    "Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely."

    | sFrame server |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
    sFrame workPane scratchServer ifNil: [
        server _ ScratchServer new.
        server stage: (sFrame workPane).
        sFrame workPane scratchServer: server].

    sFrame workPane scratchServer startHosting.

Code for stop hosting mesh

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

And Join IP

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

Thanks to NxIII for all this.

Hope this helps.  smile

Last edited by markyparky56 (2010-04-15 07:25:59)


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#7 2010-04-15 07:25:50

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: Mesh Blox

TheGameMaster1231 wrote:

johnnydean1 wrote:

I have it I can post my image if you want

How Did You Make Them? I'd Really Like To Know How So I Can Add It To My Mod.

There is a topic about programming with mesh look here:
http://scratch.mit.edu/forums/viewtopic.php?id=32046


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#8 2010-04-15 09:09:57

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Mesh Blox

johnnydean1 wrote:

I have it I can post my image if you want

Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

Last edited by nXIII (2010-04-15 09:10:14)


nXIII

Offline

 

#9 2010-04-15 09:11:14

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Mesh Blox

nXIII wrote:

johnnydean1 wrote:

I have it I can post my image if you want

Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#10 2010-04-15 09:33:00

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Mesh Blox

markyparky56 wrote:

nXIII wrote:

johnnydean1 wrote:

I have it I can post my image if you want

Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...

It's not....
It's the most recently UPLOADED version.

Last edited by nXIII (2010-04-15 09:34:37)


nXIII

Offline

 

#11 2010-04-15 09:45:16

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Mesh Blox

nXIII wrote:

markyparky56 wrote:

nXIII wrote:


Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...

It's not....
It's the most recently UPLOADED version.

So your keeping things back from the rest of the team... -_-


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#12 2010-04-15 09:52:09

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Mesh Blox

nXIII wrote:

johnnydean1 wrote:

I have it I can post my image if you want

Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

I KNOW HOW TO DO IT TOO!!!!!!!


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#13 2010-04-15 11:49:46

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: Mesh Blox

MathWizz wrote:

nXIII wrote:

johnnydean1 wrote:

I have it I can post my image if you want

Are you talking about MY image, perchance?

Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!

I KNOW HOW TO DO IT TOO!!!!!!!

You do?

OK. Isn't it annoying? Try middle-clicking on a sprite in pres mode: it has a nonexistent owner!

I'm tying to get sprite exporting with custom blocks to work. I just finished fixing the tuples and adding a new option to show the code.


nXIII

Offline

 

#14 2010-04-16 21:26:43

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: Mesh Blox

markyparky56 wrote:

Ok, since panther is open source im allowed to this:

Code for host mesh block

Code:

hostMesh
    "Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely."

    | sFrame server |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
    sFrame workPane scratchServer ifNil: [
        server _ ScratchServer new.
        server stage: (sFrame workPane).
        sFrame workPane scratchServer: server].

    sFrame workPane scratchServer startHosting.

Code for stop hosting mesh

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

your join IP is the same as your leave mesh
And Join IP

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

Thanks to NxIII for all this.

Hope this helps.  smile

Your join IP is the same as your leave mesh. Could you post the real code?

Last edited by midnightleopard (2010-04-16 21:27:35)


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#15 2010-04-17 08:24:32

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: Mesh Blox

midnightleopard wrote:

markyparky56 wrote:

Ok, since panther is open source im allowed to this:

Code for host mesh block

Code:

hostMesh
    "Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely."

    | sFrame server |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
    sFrame workPane scratchServer ifNil: [
        server _ ScratchServer new.
        server stage: (sFrame workPane).
        sFrame workPane scratchServer: server].

    sFrame workPane scratchServer startHosting.

Code for stop hosting mesh

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

your join IP is the same as your leave mesh
And Join IP

Code:

leaveMesh
    
    | sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].

Thanks to NxIII for all this.

Hope this helps.  smile

Your join IP is the same as your leave mesh. Could you post the real code?

Oh, must have not copied properly. sorry, ill fix that.

Code:

joinMesh: addrString
    "Join another Scratch user or a Scratch-compatible remote application."

    | server ok sFrame |
    (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ ''].
    server _ ScratchServer new.
    server stage: (sFrame workPane).
    sFrame workPane scratchServer: server.

    addrString size = 0 ifTrue: [^ ''].

    ok _ sFrame workPane scratchServer joinSessionAt: addrString.
    "ok ifFalse: [DialogBoxMorph warn: 'Could not connect to ', addrString]."

Thats it.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

Board footer