Alright, I know I'm going to sound a little like I'm crazy, but please don't stop reading this post. For those of you that have ever read the pages on the scratch wiki about communicating to scratch with other programs, this will make a little more sense.
Basically, I've written a special client program in flash, which is based on the actionscript remote sensors tutorial (see http://wiki.scratch.mit.edu/wiki/Commun … tionscript). You'll need to understand network programming first, though. The client has special code written on it which connects to scratch and a server at a specific IP and port. It forwards all packets coming from the server to the sensor variable, packet, and anything scratch puts in the variable packet, gets sent to the server as a packet.
The server is written in C and the client and the server will be open-sourced. The server has a very specific format on how to write handler functions, but if you write them correctly, you can extend the capabilities of my server that are already written, to make an even better MMORPG. However, you will need to have some C knowledge to write code for it. (get a book. look up online tutorials, whatever) You will also need to know about MySQL, as my MMO uses it.
Enough with the chit chat. Let me explain how MMO writing would work.
First, you would make your project. (duh) You would make two variables called packet, and inpacket. Also, create a when I receive block whose message would be dataready. Inside of it you would set inpacket to the packet sensor value.
Now that you got your MMO specific stuff ready, it's time to start coding your game. First, we need to be able to parse the message. Below is a reference of the different handlers and the packets to which they can send and receive.
All packets except for one packet follows a specific pattern. Category / Function / Arguments /. Each argument it followed by a slash. Let me explain a little more, if that didn't make sense to you. For example, let's say you want to login with the username scratch and the password cat. First, you need to look for handleLogin in the lists below. Go look for it now. Then, you'll find out that it is a general function, whose identifier is l. If you look in the categories list, you'll find out the general functions have the identifier s. If you go back to handleLogin, you'll find out that it's arguments are username and password. If you put this all together, the packet to login with the username scratch and the password cat would be s/l/scratch/cat/ If you look back, you can also find out that it will give you s/l/1 if it was successful, and s/l/0 if it wasn't. Does that make any sense to you? I hope so.
BETA TESTING
For those of you who would like to beta test, I have a requirement for you. Post here all of the programming languages (scratch counts) that you are very, very good in. If I think you qualify, I'll get you a download link.
Once it is fully stable and complete, I'll open-source it to the public.
EDIT: Open Sourced, see below.
Progress
Client - 5%
Server - 100%
Examples - 30%
Categories
General - Identifier s
General functions
handleLogin - Identifier l - arguments: username, password - s/l/1/ on success, s/l/0 on failure - stable
handleJoinRoom - Identifier jr - arguments: room id - no return - stable
handleGetRoom - Identifier gr - arguments: none - ret/roomid/ - stable
handleGetPlayersInRoom - Identifier gpr - arguments: room id - ret/numberOfPlayersInRoom/playerIdsSeperatedBySlashes - stable
Staff List (in list of importance/seniority)
Owners
bobbybee
Programmers
bobbybee
Necromaster
cocolover76
Testing
bobbybee
Zeusking19
midnightleopard
Magnie
Dinoclor
cocolover76
OPEN SOURCED
Click on the website above for more info, source code, and installation instructions, for both Windows and Mac.
Installation Methods
I am a..... a game developer who is willing to spend a fortune.
1) Download Adobe Flash Professional from the Adobe website.
2) Download the non-mysql version from the site above.
3) Open terminal/cygwin and cd into the directory that you extracted FireMMO into.
4) Type gcc -pthread -o server handlers.c main.c
5) Type ./server
6) Open the .fla file in FireMMO with Adobe Flash Professional.
7) Change the server variable to your ip address.
8) Change the serverport variable to 7070.
9) Press Control (command for mac) and enter at the same time.
10) Run an example located on the website.
11) Have Fun! (and make an MMO, of course)
I am a..... a game developer who does not want to spend a penny
1) Download Adobe Flex SDK from the Adobe website.
2) Download the non-mysql version from the site above.
3) Open terminal/cygwin, and cd into the directory that you extracted FireMMO into.
4) Type gcc -pthread -o server handlers.c main.c
5) Type ./server
6) Download the Flex Client from the site above.
7) Move the flex client to the location that you extracted flex into, then to sdks, then to 3.*.*, then to bin.
8) Open clientmmo.as in a text editor of your choice.
9) Change the server variable to your ip address.
10) Change the serverport variable to 7070.
11) Type ./mxmlc clientmmo.as
12) Open clientmmo.swf
13) Run an example located on the website.
14) Have Fun! (and make an MMO, of course)
I am a..... a player who would like to compile my own client.
1) Download Adobe Flex SDK from the Adobe website.
2) Download the Flex Client from the site above.
3) Move the flex client to the location that you extracted flex into, then to sdks, then to 3.*.*, then to bin.
4) Open clientmmo.as in a text editor of your choice.
5) Change the server variable to your ip address.
6) Change the serverport variable to 7070.
7) Type ./mxmlc clientmmo.as
8) Open clientmmo.swf
9) Have Fun! (and play an MMO, of course)
Last edited by bobbybee (2012-04-12 17:19:29)
Offline
bump
Offline
GREAT IDEA! Would you be able to send sounds and pictures to the other network? That would be cool!
Offline
I guess you could, Pecola. I'm currently working on a handler which sends a packet to another player, so if you write a sound/picture format, and you know how to interpret it, you could send just about whatever you want. But what I really need is some more programmers to help get it done quicker. It is written in C, so you would need to know C and Scratch for that matter. Sorry pythoners.
Offline
This would be awesome! Are you making a MMO game?
Someone should make a mod for servers.
Offline
I am not making an MMO currently. I am making code that would allow others to make code. I am also working on creating some examples, but those would be useless until we get some coders to help with making the server. As with the moderators, you could easily make them in your own MMO's, but I am not willing to be the one patrolling peoples games. You would need to do that part yourself. (or get friends to help you) You would also need to have a computer that would have to be 24/7 to host the game. Anyways, I need beta testers.
Offline
Do you need to know C to use this? I know VERY LITTLE, VERY BASIC, C. However, I'm still interested in making an MMO with this. Is it possible?
[EDIT]
The only language I'm good at is Scratch.
Last edited by Dinoclor (2011-07-13 12:41:33)
Offline
Great, Dinoclor. You don't need to know any advanced C at this point. If you know datatypes, variables, functions, if/else/elseif, loops, and perhaps printf, you'll be able to make it. I'll need to get you a private link, though.
Tell me a time and date you'll be on and I'll tell you if I can be there.
Last edited by bobbybee (2011-07-13 13:01:39)
Offline
bobbybee wrote:
Great, Dinoclor. You don't need to know any advanced C at this point. If you know datatypes, variables, functions, if/else/elseif, loops, and perhaps printf, you'll be able to make it. I'll need to get you a private link, though.
Tell me a time and date you'll be on and I'll tell you if I can be there.
It's been a really long time since I used C last. I know I used to be able to do all those things, but I don't know about now. I'm not really sure I I'm a good candidate to be a beta tester. I meant when it's done, will it be possible to use it without knowing much real programming language at all?
Offline
Once it is done, will set up I library so you can copy paste to get all of the you addons you want. If you are rusty with your C you can probably look at some of the online tutorials. By the way, a lot of beta testing is making example MMO's for tutorials. (and perhaps write your own in the process
). Once again, I need a time so I can get you a link to the current code.
Offline
Hey, you've already lost me (this doesn't happen often). But I'm good in Python 3.1 (3.2.1 seems to be the same syntax if it's easier for you) and Actionscript 3.0. Just don't confuse Python with Pygame.
Offline
If you read the above posts, I know no python whatsoever, and the client (in actionscript 3.0) is at an acceptable stage, so it does not need help right now.
As python is a bit similar to C, you could read some c tutorials, they shouldn't be too weird for you, but I do not know, as I know no python.
If you start to get could at making command line applications in C, (well doesn't matter if they are command line), feel free to become a beta tester. But without any C experience, I'm afraid for right now you're a no.
Offline
Sure, I'll be there.
Offline
Alright, Dinoclor. I'm 2 minutes late, so please respond quickly, so I can get you the code.
Offline
Alright, you have skype. Or do you prefer email?
Offline
Alright, I sent you a test email, check it now, and be sure to delete your post with your email.
Offline
Allright, delete the post with your email. I'll send you code and compiling/running instructions, okay. By the way, what operating system are you running?
Offline
bobbybee wrote:
Allright, delete the post with your email. I'll send you code and compiling/running instructions, okay. By the way, what operating system are you running?
Windows Vista Premium
Offline
Do you have Visual Studios/cygwin installed on your machine. I don't have windows binaries.
Offline
It will work perfect if you have the gnu toolchain installed on it. In order to install on linux you'll need gcc, ld, and gas. If you are running ubuntu in you're virtual machine, you can type in the command line (apt-get install gcc) okay (no parentheses)
Offline