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

#1 2012-05-13 16:18:15

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Help me, AT!

If you were writing a 2 player mesh pong game, would you draw 1 ball for each computer/program?


Get ready for domination of:  tongue

Offline

 

#2 2012-05-13 16:26:10

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Help me, AT!

Sort of. There would be one ball sprite in each client (but there would be two clients, because it would be two player)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#3 2012-05-13 16:37:48

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Help me, AT!

and how would you program it?


Get ready for domination of:  tongue

Offline

 

#4 2012-05-13 16:38:35

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Help me, AT!

Can you upload what you have so far? 'Cause it's kind of hard to explain out of nothing.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#5 2012-05-13 16:39:50

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: Help me, AT!

Oh, it's for a tutorial...


Get ready for domination of:  tongue

Offline

 

#6 2012-05-13 16:50:54

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Help me, AT!

Well, you have a ball. It puts its position in a variable called Ball Position. Then it goes to the sensor Ball Position. Does this make any sense?


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#7 2012-05-13 17:19:22

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Help me, AT!

Well, you would have a ball for each enemy plus a definite one for yourself. Yourself sends data to the other program, which sets that value as the enemy data, and vice versa.

I think that should have cleared up on what bobbybee said, but I can't think of any better way to say it  tongue

Offline

 

#8 2012-05-13 17:25:02

G0D_M0D3
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Help me, AT!

I know mesh. I'm actually planning on releasing a pong game.

You need one ball on each program. In both sprites, make 2 local (sprite-only) variables. X and Y (both vars for both sprites) Using the sensor connections block, make the ball in one program go to the X and Y of the other program's.


I made a MC texture pack! Get it at planetminecraft!
http://i.imgur.com/0EG0u.png

Offline

 

#9 2012-05-14 23:52:48

GeonoTRON2000
Scratcher
Registered: 2009-12-24
Posts: 1000+

Re: Help me, AT!

Try looking at this (it's a little complicated cuz its 1s1s, but it still helps): http://scratch.mit.edu/projects/GeonoTRON2000/2535353


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

Offline

 

Board footer