The release day is unknown, because of all the preparing and planning I have to do. I'm also coding the server so I don't have to reset it after each update (this is only for this server, not for Chat.PY).
To help with the planning, it would be nice if you could make a list of what you want in the game. My current plans:
- Player Spaceships
- Upgrade-able ships and weapons
- Planets where you can upgrade
- PvP ( Player vs Player )
- PvAI ( Player vs AIs )
- Multiple "universes"
- Max players per universe is 12
- Multiple Solar-Systems
- Max Ships/Objects per Solar-System is 18
- Weapon will be a basic laser
Now most of the limits are due to Scratch's limited speeds, so some of the limits may even be lowered. The release of this may even come after Scratch 2.0 or after Remote Sensors is added to the current Flash Player ( that way you can connect through your browser! ) because of how slow Scratch is. I'll need to do some testing though.
Offline
- A space-station hub.
- Mini-games (Repearing, controlling etc. etc.) to help advance the game.
- Tycoon-eque customization. (£1000 to upgrade cannons etc. etc.)
- Power-ups to temporarily upgrade spaceship parts.
- Difficulty
- Personality (When making decisions, people will judge you by your decisions and your decisions effect the game's plot).
- Slow Motion at fatal kills.
- Persistant Data (If this is after Scratch 2.0)
Well? I tried not to be too vague when suggesting ideas.
Offline
NeilWest wrote:
- A space-station hub.
- Mini-games (Repearing, controlling etc. etc.) to help advance the game.
- Tycoon-eque customization. (£1000 to upgrade cannons etc. etc.)
- Power-ups to temporarily upgrade spaceship parts.
- Difficulty
- Personality (When making decisions, people will judge you by your decisions and your decisions effect the game's plot).
- Slow Motion at fatal kills.
- Persistant Data (If this is after Scratch 2.0)
Well? I tried not to be too vague when suggesting ideas.
Most of those are mainly for a single-player game. So I won't be able to do some of them cause they are kind of complicated for multiplayer games.
Offline
Before adding all that stuff, just make a plain simple game with multiplayer
oh, and chat!!
Offline
FreshStudios wrote:
Before adding all that stuff, just make a plain simple game with multiplayer
![]()
oh, and chat!!
Yeah, currently I'm trying to implement pquiza's Python module ( http://scratch.mit.edu/forums/viewtopic.php?id=84927 ) into the mirror, but for some reason the mirror isn't sending messages to or from the server. If you want, you can look at my mirror and server.
Mirror:
from scratch import *
import threading
import socket
import json
SHOST = raw_input('Host IP: ')
SPORT = int( raw_input('Host Port: ') )
if not SHOST:
print('You must enter a host.')
exit(1)
if not SPORT:
print('You must enter a port.')
exit(1)
class Client(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
try:
self.s = Scratch()
except ScratchConnectionError, e:
print(e)
exit(1)
def run(self):
s = self.s
while True:
try:
message = s.receive(0)
except s.ScratchConnectionError, e:
print(e)
exit(1)
print 'Scratch:',message
server.send( json.dumps(message) )
def send(self, message):
s = self.s
message = s.parse_message(message)
print message
if len( message['broadcast'] ) == 1:
s.broadcast( message['broadcast'][0] )
elif len( message['sensor-update'] ) == 1:
s.sensorupdate( message['sensor-update'] )
class Server(threading.Thread):
def __init__(self, ip, port):
threading.Thread.__init__(self)
self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.s.connect((ip, port))
def run(self):
s = self.s
while True:
try:
message = s.recv(1024)
except:
exit(1)
print 'Server:',message
scratch.send(message)
def send(self, message):
self.s.send(message)
server = Server(SHOST, SPORT) # Start up the class for Server
server.start() # This starts the 'run' function on the class as well.
scratch = Client() # Start up the class for Scratch
scratch.start() # This starts the 'run' function.Server:
#!/usr/bin/env python
"""
An echo server that uses threads to handle multiple clients at a time.
Entering any line of input at the terminal will exit the server.
"""
import select
import socket
import sys
import threading
import json
class Server:
def __init__(self):
self.host = ''
self.port = int( raw_input("Port: ") )
self.backlog = 5
self.size = 1024
self.server = None
self.threads = []
self.plugins = ['test']
for plugin in self.plugins:
exec( 'import '+plugin )
def open_socket(self):
try:
self.server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.server.bind((self.host,self.port))
self.server.listen(5)
except socket.error, (value,message):
if self.server:
self.server.close()
print "Could not open socket: " + message
sys.exit(1)
def run(self):
self.open_socket() # Open a socket so people can connect.
running = 1
id = 0 # To define each client.
while running:
id += 1 # Increase so no client has the same ID.
c = Client(self.server.accept()) # Waits for a client then accepts it.
print c.address[0], 'has connected.'
c.start() # Starts it.
self.threads.append(c) # Adds it to a list so the variable c and be used for the next client.
# Disconnect all clients.
self.server.close() # Disconnect socket.
for c in self.threads: # For each thread
c.join() # End that thread.
class Client(threading.Thread):
def __init__(self,(client,address)):
threading.Thread.__init__(self)
self.client = client
self.address = address
self.size = 1024
self.plugins = {}
def run(self):
running = 1
while running:
try:
data = self.client.recv(self.size) # Wait and receive data from client
data = self.parse(data) # Parse it
except:
data = ''
print data
if data:
for broadcast in data['broadcast']: # For every broadcast, do_broadcast('broadcast')
self.do_broadcast( broadcast )
for sensor in data['sensor-update']: # For every sensor-update, do_sensor('sensor', 'value')
self.do_sensor( sensor, data['sensor-update'][sensor] )
else:
print self.address[0], 'has disconnected.'
self.client.close()
running = 0
def parse(self, data): # Parse data
data = json.loads( data )
def load_plugin(self, plugin): # Load plugin into server plugins
if plugin not in s.plugins:
s.plugins.append( plugin )
try:
reload( plugin )
except NameError:
exec( 'import '+plugin )
def unload_plugin(self, plugin): # Unload plugin from server plugins
if plugin in s.plugins:
s.plugins.remove( plugin )
#exec( 'del '+plugin )
def use_plugin(self, plugin): # Add plugin to client
if plugin in s.plugins: # If it exists
s.plugins.append( plugin ) # Add it
exec( '''
self.plugins[plugin] = '''+plugin+'''.Plugin(self) # Create the class
'''
)
return 'Added plugin.'
else: # Else, do nothing
return 'No such plugin.'
def not_plugin(self, plugin):
if plugin in self.plugins:
self.plugins.remove( plugin )
return 'Plugin removed.'
else:
return 'No such plugin.'
def do_broadcast(self, broadcast):
if broadcast:
if broadcast[0] == '<':
self.use_plugin( broadcast[1:-1] )
elif broadcast[0] == '>':
self.not_plugin( broadcast[1:-1] )
elif broadcast[0] == '|':
self.send_broadcast( broadcast[1:-1] )
elif broadcast[0] == ':':
for plugin in self.plugins:
try:
self.plugins[plugin].broadcast( broadcast[1:-1] )
except:
pass
else:
self.client.close()
return False
return True
def do_sensor(self, name, value):
return True
def send_broadcast(self, value):
broadcast = sendScratchCommand( 'broadcast "'+value+'"' )
self.client.send( broadcast )
def send_sensor(self, name, value):
sensor = sendScratchCommand( 'sensor-update "'+name+'" "'+value+'"' )
self.client.send( sensor )
def sendScratchCommand(cmd): # I was never sure what this did, but it's required.
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))
return (a.tostring() + cmd)
if __name__ == "__main__":
s = Server()
s.run()The 'test' plugin:
# Test Plugin
class Plugin(object):
def __init__(self, owner):
self.owner = owner
def broadcast(self, message):
owner = self.owner
if message == 'test':
owner.send_broadcast( "test" )
def sensor(self, name, value):
passI'm trying to broadcast '|test' ( the | tells the server to "reflect" or "echo" the message back, so sending '|test' should reply 'test' ). But for some reason, when I send it, the server receives None and then replies with nothing, which crashes the mirror (because it expects a Scratch "encoded" message, which the server sends).
Last edited by Magnie (2012-01-07 16:48:21)
Offline
Space. I can't wait to join when it's up! Can you please tell me when it's done? I wish I knew how to make an MMO. What language? Maybe I would like to learn.
Last edited by ImagineIt (2012-01-08 16:37:29)
Offline
ImagineIt wrote:
Space. I can't wait to join when it's up! Can you please tell me when it's done? I wish I knew how to make an MMO. What language? Maybe I would like to learn.
The server-language is going to be Python. Currently, the mirror is also in Python, but hopefully, I will be able to get MathWizz to create a Java one too so that you can just open the mirror in your browser.
Offline
Magnie wrote:
The server-language is going to be Python. Currently, the mirror is also in Python, but hopefully, I will be able to get MathWizz to create a Java one too so that you can just open the mirror in your browser.
If you want I can create a Java mirror for you...
Offline
Magnie wrote:
ImagineIt wrote:
Space. I can't wait to join when it's up! Can you please tell me when it's done? I wish I knew how to make an MMO. What language? Maybe I would like to learn.
The server-language is going to be Python. Currently, the mirror is also in Python, but hopefully, I will be able to get MathWizz to create a Java one too so that you can just open the mirror in your browser.
Don't you already have a mirror?
Offline
MathWizz wrote:
Magnie wrote:
ImagineIt wrote:
Space. I can't wait to join when it's up! Can you please tell me when it's done? I wish I knew how to make an MMO. What language? Maybe I would like to learn.
The server-language is going to be Python. Currently, the mirror is also in Python, but hopefully, I will be able to get MathWizz to create a Java one too so that you can just open the mirror in your browser.
Don't you already have a mirror?
I'm creating a new one that uses pquiza's Python module ( http://scratch.mit.edu/forums/viewtopic.php?id=84927 ), though I am thinking of changing it so that the parser is on the server instead.
Zero: Maybe.
Last edited by Magnie (2012-01-09 10:03:53)
Offline
Magnie wrote:
I need skilled Python and Scratch programmers that know how to connect Python and Scratch together.
(STATUS:Skilled scratch skilled python next week (estimate)
Hey there,
I'm good with scratch so I can lend a hand if you want, however could you please tell me haw to make a game multiplayer, I already have a game and it would be awesome if I could make it multiplayer.
I've been on scratch for about 2 years, read most of the furum know how to add a project to a website without adding to scratch and more, if you want to take a look at my game visit it's special website it's still under construction as we are waiting on the idea team to give us more ideas for buildings.
I can make pretty much anything on scratch so don't hesitate to ask, also I love space so I would love to help!
website: http://www.monkeybanana.co.uk
I am also quite good with a bit of Html if it's relevant but not a clue even what python is I will read up on it and learn it and I probably will be able to do pretty much anything on that next week so I will add another relpy saying if I am.
PLEASE LET ME HELP!
P110 at your service!
Thanks
P110
---------------------------------------------------
Head of the Monkey Banana team
Offline
P110 wrote:
Magnie wrote:
I need skilled Python and Scratch programmers that know how to connect Python and Scratch together.
(STATUS:Skilled scratch skilled python next week (estimate)
Hey there,
I'm good with scratch so I can lend a hand if you want, however could you please tell me haw to make a game multiplayer, I already have a game and it would be awesome if I could make it multiplayer.
I've been on scratch for about 2 years, read most of the furum know how to add a project to a website without adding to scratch and more, if you want to take a look at my game visit it's special website it's still under construction as we are waiting on the idea team to give us more ideas for buildings.
I can make pretty much anything on scratch so don't hesitate to ask, also I love space so I would love to help!
website: http://www.monkeybanana.co.uk
I am also quite good with a bit of Html if it's relevant but not a clue even what python is I will read up on it and learn it and I probably will be able to do pretty much anything on that next week so I will add another relpy saying if I am.
PLEASE LET ME HELP!
P110 at your service!
Thanks
P110
---------------------------------------------------
Head of the Monkey Banana team
Thank you for offering. Currently, I need to get an actual start on the project before real work will be done. The most anyone can do right now is making graphics ( preferably space-ships ) and give suggestions/ideas.
Offline
Magnie wrote:
This is the discussion of the Virtual World I am going to make.
Type of virtual world: Space or Ground?
Votes:
Space 7
Ground 5
Awesome. Ground.
Offline
Ground, Stellar Dawn is coming out soon so we don't need another Space game.

Offline
Space!
Offline
How about every player has a planet for them self to live on?
Offline
Offline
Offline
Space! Btw, I wish I could help but I don't know anything about Python. And my username's PYTHONdreamer. Ugh, I'm a failure. x3
Offline
SPACE! And I'd be glad to help
I know the very very basics of python, but that's about it. On the other hand, I consider myself very proficient at Scratch. Any ways you could use me? (Testing, scripting, etc.?)
Offline
ImagineIt: I'm sure later in development I can add the feature to conquer planets. But each player starting with their own planet would be complicated to code. For the galaxies... I'm not sure. It would require adding more solar-systems and planets, AIs... etc.
Offline
Ground!

Offline