This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Show and tell
  •  » It's April 29th! My last day on scratch! Get Involved with events!

#1 2012-03-25 15:15:54

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

It's April 29th! My last day on scratch! Get Involved with events!

IT'S THE BIG DAY  big_smile

I hope everyone has a brilliant time today!

This is not only the big day where me and other scratchers will be running contests and releasing projects, but also I'll be giving the results of Scratcher Buddies Competition and I'll also would have left scratch by the end of the day.

Sponsered by:
Scratch Cat's Hideout

Get your project advertised on the advert thread! With over 260 projects and the thread being guaranteed to get 1000 views per week, why not add your projects?

Today's Events:
The Debate Show!
-Debate with other scratchers about quite topical issues. A new question added every so often!
Rayman 4
Play here!
An epic platformer with fighting, adventure and requires a lot of skills!
Are you stuck? Read the walk-through guide: Click Here!

bobbybee wrote:

DragonThunder, a REAL MMO (massively multiplayer online) game is being released today. To play:

1) Download the Scratch project at http://scratch.mit.edu/projects/DragonThunder/2473759

2) Prepping Scratch

2a) Go to sensing in Scratch (with the DragonThunder project open)

2b) Right-click the slider sensor-value box.

 ([slider v] sensor value)
2c) Click "enable remote sensor connections"

3) Download the mirror
ON WINDOWS:
http://dl.dropbox.com/u/32942793/DTMirror.zip Open the exe.

ON MAC:
3a) Make a file on your desktop. Call it mirror.py. Make it's contents:

Code:

# Scratch Mirror
# Version 1.5.0
# Originally by: Magnie. Modified by bobbybee for use in FireMMO

import socket # Network base
import time # For delaying purposes mostly.
import threading # So it can send and receive at the same time anytime.
import array

# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# CHOST is the IP Scratch is running on, if you are running it    #
# on this computer, then the IP is 127.0.0.1                      #
# Theoretically you could run this Mirror on another computer.    #
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# CPOST is the port Scratch is listening on, the default is       #
# 42001. Usually this is only change by a Scratcher who knows a   #
# about Squeak and networking with sockets.                       #
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
CHOST = '127.0.0.1'
CPORT = 42001

# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# SHOST is the IP the server is running on.                       #
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# SPORT is the port that the server is using. 42002 is the        #
# unofficial port for Scratch Servers. The host will need to make #
# sure to port-forward the port so people can connect from the    #
# internet.                                                       #
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
SHOST = 'firechat.servequake.com'
SPORT = 8089

# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
# Some extra settings that are more for advanced users are below. #
# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #

# Time between checking the threads for broken ones.
THREADCHECK = 5



class Client(threading.Thread): # This class listens for messages sent from Scratch and sends it to the Server.
    def parse_message(self, message):
        if message:
            sensors = {}
            broadcasts = []

            commands = []
            i = 0
            while True:
                length = ord(message[i]) + ord(message[i+1]) + ord(message[i+2]) + ord(message[i+3])
            
                command = message[i + 4:i + length + 4]
                commands.append(command)
                if (i + length + 4) < len(message):
                    i = (i+4) + length
                else:
                    del command
                    break
            
            for command in commands:
        print command
                if command[0] == 'b':
                    command = command.split('"')
                    command.pop(0)
                    broadcasts.append(command[0])
                
                elif command[0] == 's':
                    command = command.split('"')
                    command.pop(0)
            print(command);
                    try:
                command.remove(' ')
            except ValueError:
                     pass
                    sensors[command[0]] = command[1]
        
            return dict([('sensor-update', sensors), ('broadcast', broadcasts)])
        else: 
            return None
    def sendScratchCommand(self, cmd):
        n = len(cmd)
        a = array('c')
        a.append(chr((n >> 24) & 0xFF))
        a.append(chr((n >> 16) & 0xFF))
        a.append(chr((n >>  8) & 0xFF))
        a.append(chr(n & 0xFF))
        server.sock.send(a.tostring() + cmd)
    
    def __init__(self, CHOST, CPORT):
        threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread.
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 )
        print("Connecting to Scratch...")
        self.sock.connect((CHOST, CPORT)) # Connect to Scratch
        print("Connected to Scratch!")
        
    def run(self):
        global running
        print "Listening for Scratch messages."
        while running:
            data = self.sock.recv(1024) # Wait for something to be sent to the mirror
            
            data = self.parse_message(data)
            for sensor in data['sensor-update']:
                if sensor == "packet":
                    self.send(data['sensor-update'][sensor])

    
    def send(self, message):
        server.sock.send(message) # Send the data to the server.

class Server(threading.Thread): # This class listens for messages from the Server and sends it to Scratch.
    def sendScratchCommand(self, cmd):
        n = len(cmd)
        a = []
        a.append(chr((n >> 24) & 0xFF))
        a.append(chr((n >> 16) & 0xFF))
        a.append(chr((n >>  8) & 0xFF))
        a.append(chr(n & 0xFF))
        scratch.sock.send(''.join(a) + cmd)
    def __init__(self, SHOST, SPORT):
        threading.Thread.__init__(self) # Initialize it, basically just separate it from the main thread.
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Defines the type of connection ( UPD, TCP on IPv4 or IPv6 )
        print("Connecting to Scratch Server...")
        self.sock.connect((SHOST, SPORT)) # Connect to the Server.
        print("Connected to Server!")
        
    def run(self):   
        global running
        print "Listening for Server messages."
        while running:    
            data = self.sock.recv(1024) # Listens for messages sent from the Server.
        print(data);
            self.sendScratchCommand("sensor-update packet \""+data+"\"");
            self.sendScratchCommand("broadcast dataready")
    
    def send(self, message):
        scratch.sock.send(message) # Sends messages to Scratch.

running = 1
scratch = Client(CHOST, CPORT) # Start up the class for Scratch
scratch.start() # This starts the 'run' function.

server = Server(SHOST, SPORT) # Start up the class for Server
server.start() # This starts the 'run' function on the class as well.

while running:
    time.sleep(THREADCHECK) # The longer the wait time, the less CPU is used I think.
    try: # Check if the either thread died ( or exists anymore ).
        if scratch: pass
        if server: pass
    except: # If either are dead, end the program.
        running = 0
        print "Finished running."

3b) Go to Applications in Finder, scroll down to Utillities, and open Terminal.app from there
3c) Type "cd Desktop; python mirror.py <enter>" (no quotes, replace <enter> with the enter/return key

4) FUN! The Guest account is:
Username: Guest
Password: DragonThunder123

Thanks to Magnie, this project would've never worked.

CREDITS:
Programming:
bobbybee
Magnie
Art:
trinary
Ideas:
coolhogs
TorbyFork234
Special Thanks to:
Magnie
Mom & Dad

Last edited by Borrego6165 (2012-04-29 16:50:20)


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#2 2012-03-26 11:24:12

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

bump


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#3 2012-03-26 16:23:59

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

I added it to my sig.


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

Offline

 

#4 2012-03-26 16:34:51

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

yay!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#5 2012-03-26 16:37:41

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

Borrego6165 wrote:

yay!

What should I do to advertise? Make a project about it.  tongue


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

Offline

 

#6 2012-03-26 16:37:57

FreshStudios
Scratcher
Registered: 2011-04-11
Posts: 500+

Re: It's April 29th! My last day on scratch! Get Involved with events!

What is the point of this celebration?


http://i43.tinypic.com/24ymnbn.png

Offline

 

#7 2012-03-26 16:51:35

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

bobbybee wrote:

Borrego6165 wrote:

yay!

What should I do to advertise? Make a project about it.  tongue

of course!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#8 2012-03-26 16:53:11

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

FreshStudios wrote:

What is the point of this celebration?

well it's a random celebration to help bring peace between the indexes after some rows before. It's also an oppurtunity for me to promote my projects, as well as start some new activities like the Debate Show. The reason for it being April 29th is because I couldn;t think of a better date than 6 months after the release of my advert thread.


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#9 2012-03-26 16:56:58

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

Added to my sig!

Offline

 

#10 2012-03-27 02:19:39

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

thanks everyone!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#11 2012-03-27 02:40:38

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

bump


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#12 2012-03-27 21:39:54

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

bump

Offline

 

#13 2012-03-28 13:38:16

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

joletole wrote:

bump

thanks!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#14 2012-03-28 15:52:41

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

Borrego6165 wrote:

joletole wrote:

bump

thanks!

Can you link to my project on the official thread/official project notes?


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

Offline

 

#15 2012-03-28 16:52:56

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

bump.


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

Offline

 

#16 2012-03-28 18:08:15

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

Anybody have any ideas for my project?

Last edited by bobbybee (2012-03-28 18:08:25)


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

Offline

 

#17 2012-03-29 02:35:55

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

aren't you realising that MMO?


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#18 2012-03-29 13:05:37

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

One month exactly!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#19 2012-03-29 19:40:57

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

Borrego6165 wrote:

aren't you realising that MMO?

...and your point is?


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

Offline

 

#20 2012-03-29 22:07:00

Sausagefanclub
Scratcher
Registered: 2011-08-31
Posts: 500+

Re: It's April 29th! My last day on scratch! Get Involved with events!

Maybe I should create a test account and release a glitch-filled demo of World of Weird I: Fusion.

What do you guys think? Should I do it?


http://sausagepages1185.weebly.com/uploads/1/4/1/5/14153465/446452.png?525

Offline

 

#21 2012-03-30 02:39:53

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

bobbybee wrote:

Borrego6165 wrote:

aren't you realising that MMO?

...and your point is?

well you said "have any ideas for my project?" (something like that) so i thought well aren't you already making one? sorry, i might of thought you meant "have any ideas for what i should make?"

Last edited by Borrego6165 (2012-03-30 02:44:05)


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#22 2012-03-30 02:42:43

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

Sausagefanclub wrote:

Maybe I should create a test account and release a glitch-filled demo of World of Weird I: Fusion.

What do you guys think? Should I do it?

Just make a smaller game! or a sequel to something that's quick to make! (You can re-use most of it. just give the sprites and background a repaint to make it look different from the prequel) otherwise you will waste what could be a great opportunity to get more views on your projects, if you make a glitchy game instead, you may lose respect from other scratchers. you have an ENTIRE month left. Good Luck!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#23 2012-03-30 14:29:14

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

please keep all April 29th info on here!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 

#24 2012-03-30 15:57:46

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

Re: It's April 29th! My last day on scratch! Get Involved with events!

Borrego6165 wrote:

bobbybee wrote:

Borrego6165 wrote:

aren't you realising that MMO?

...and your point is?

well you said "have any ideas for my project?" (something like that) so i thought well aren't you already making one? sorry, i might of thought you meant "have any ideas for what i should make?"

I meant ideas for a April 29th celebration project. Also, I'm also releasing an online Talk Show (have to talk with some Scratch friends for inspiration, though. still, I have a month to write scripts/get inspiration)


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

Offline

 

#25 2012-04-02 06:27:09

Borrego6165
Scratcher
Registered: 2011-03-10
Posts: 1000+

Re: It's April 29th! My last day on scratch! Get Involved with events!

less than a month!


Generation:4001 Build a beautiful city, with over 50 objects and over 10000 tiles per city! This simulates traffic, pollution, tourism, crime and more!

Offline

 
  • Index
  •  » Show and tell
  •  » It's April 29th! My last day on scratch! Get Involved with events!

Board footer