this seems very interesting.would this work with an internet mmo (programmed in flash pro) and not scratch? If so, this will be excellent for a project i am working on with a friend.
Last edited by Zeusking19 (2011-12-04 05:30:51)
Offline
I can host my own MySQL, but could i put the client .swf onto my website with the host on my computer?
(BTW:
Flash Pro CS5
Dreamweaver CS5 (For my website)
And i have a MySQL host already running.
Last edited by Zeusking19 (2011-12-04 05:36:20)
Offline
That would be fantastic. I haven't tried setting up FireMMO with Flash, but I have written programs that used servers I wrote based off of FireMMO with Flash Professional CS4. You wouldn't use client.swf, instead you would take the client.as Flex code from the website and modify that piece of code to be an extension of your application, (so basically make it so it's class that is not inherited from any other class [it's currently inherited from Sprite]) so you would use the class in another piece of code to actually use FireMMO. You would have to make some modifications to the client source code because normally in FireMMO, the layers would be FireMMO->Flash->Scratch->Flash->FireMMO, but in a real MMO in Flash, the layers would be FireMMO->Flash->Flash->Flash->FireMMO, thus getting rid of the need for Scratch specific code anywhere. If you want me to, I'll write a quick and dirty mod of the client so it can be used as I mentioned above, or if you want, you can do it yourself.
The big problem with all of is that FireMMO's latest version, FireMMOv2, doesn't yet support all of the fancy levers and knobs of the original FireMMO, and one of those is database integration. I can quickly whip up some code for MySQL if you want, or I could get you some of the documentation for the MySQL API in C, as well as answer your questions about the codebase. Another, more minor issue of the new FireMMOv2, being so new and advanced and all, is that the data's protocol has been changed and I have been too lazy to write up documentation. If you want me to make a formal specification because you want to stick to your game, (and Flash for that matter) I can do that, or if you want to start coding immediately, you can look through the source code and/or ask me questions on usage. Also, the server (old or new) was written for Linux-based machines, so your VPS/host must be a Unix, Linux, Mac, BSD, or anything in that family. (basically no Windows for the server [but you can make/play the game on Windows)
Sorry about the longness, but there was so much to say, so here was a summary.
-You're encouraged strongly to use FireMMOv2 (the new one)
-FireMMOv2 doesn't yet support MySQL (I'll add that if you want me to)
-FireMMOv2 isn't well documented (I can do that if you want me to)
-You'll need a Linux-based host/VPS (so no Windows [I can fix that if you need Windows support])
-You'll need to do some extra coding to integrate Flash with FireMMO (again, I can do that if you need me to)
*****Important***** On the final, please put Powered by FireMMO (with a link to this forum topic) ******Important*******
Thank you for your patience and interest in FireMMO,
-bobbybee (FireMMO Founder, FireMMO Owner, and FIreMMO Lead Programmer)
Offline
If you could mod the client that would be awesome. Could you also code the MySQL, and comment where i need to put login details. About the linux server, I will setup Ubuntu Desktop. Do i need to enter in a Sudo command at some point? BTW: I will setup 10.4 LTS, So i can switch back to ubuntu classic. I hate unity.
bobbybee wrote:
That would be fantastic. I haven't tried setting up FireMMO with Flash, but I have written programs that used servers I wrote based off of FireMMO with Flash Professional CS4. You wouldn't use client.swf, instead you would take the client.as Flex code from the website and modify that piece of code to be an extension of your application, (so basically make it so it's class that is not inherited from any other class [it's currently inherited from Sprite]) so you would use the class in another piece of code to actually use FireMMO. You would have to make some modifications to the client source code because normally in FireMMO, the layers would be FireMMO->Flash->Scratch->Flash->FireMMO, but in a real MMO in Flash, the layers would be FireMMO->Flash->Flash->Flash->FireMMO, thus getting rid of the need for Scratch specific code anywhere. If you want me to, I'll write a quick and dirty mod of the client so it can be used as I mentioned above, or if you want, you can do it yourself.
The big problem with all of is that FireMMO's latest version, FireMMOv2, doesn't yet support all of the fancy levers and knobs of the original FireMMO, and one of those is database integration. I can quickly whip up some code for MySQL if you want, or I could get you some of the documentation for the MySQL API in C, as well as answer your questions about the codebase. Another, more minor issue of the new FireMMOv2, being so new and advanced and all, is that the data's protocol has been changed and I have been too lazy to write up documentation. If you want me to make a formal specification because you want to stick to your game, (and Flash for that matter) I can do that, or if you want to start coding immediately, you can look through the source code and/or ask me questions on usage. Also, the server (old or new) was written for Linux-based machines, so your VPS/host must be a Unix, Linux, Mac, BSD, or anything in that family. (basically no Windows for the server [but you can make/play the game on Windows)
Sorry about the longness, but there was so much to say, so here was a summary.
-You're encouraged strongly to use FireMMOv2 (the new one)
-FireMMOv2 doesn't yet support MySQL (I'll add that if you want me to)
-FireMMOv2 isn't well documented (I can do that if you want me to)
-You'll need a Linux-based host/VPS (so no Windows [I can fix that if you need Windows support])
-You'll need to do some extra coding to integrate Flash with FireMMO (again, I can do that if you need me to)
*****Important***** On the final, please put Powered by FireMMO (with a link to this forum topic) ******Important*******
Thank you for your patience and interest in FireMMO,
-bobbybee (FireMMO Founder, FireMMO Owner, and FIreMMO Lead Programmer)
Last edited by Zeusking19 (2011-12-04 09:34:08)
Offline
-MySQL Easy
-Client Moderate
-Sudo Yes/No. (it completely depends on the application, but it's more likely yes than no)
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Offline
bobbybee wrote:
Try downgrading your python.
-bobbybee (FireMMO Owner, FireMMO Founder, and FireMMO Lead Programmer)
EDIT: FIREMMO 150th POST!! WOOT WOOT!! :0
And how exactly do you think I could do that?
EDIT: I found out how.
I currently have 2.6, and I'm about to downgrade.
EDIT2: Or, rather, install 2.5 without getting rid of 2.6.
EDIT3: Not in Synaptic Package Manager anymore. Back to Google.
Last edited by cocolover76 (2011-12-04 09:58:37)


Offline
@cocolover76
I was never good at python. Don't ask me questions about that. Sorry.
Offline
bobbybee wrote:
@cocolover76
I was never good at python. Don't ask me questions about that. Sorry.
I GOT IT WORKING!!!!!!!


Offline
I mean, will i need any packages from sudo apt-get?
Offline
I think I've done enough Python for AM.
Time to take a break.


Offline
@Zeusking19
Just one - the MySQL API for C. Other than that, you won't need any
@cocolover76
Nice.
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Offline
Here. I finished the client for you.
package{
import flash.display.*;
import flash.net.*;
import flash.utils.*;
import flash.events.*;
public class clientmmo{
private var server:String = "localhost";
private var serverport:int = 7070;
private var sock:Socket = new Socket();
private function onConnect(e:Event):void
{
trace("Connected!")
}
private function onClose(e:Event):void
{
trace("Socket has been closed.")
}
private function onError(e:IOErrorEvent):void
{
trace("Oh no! Trouble connecting!")
}
private function onDataIn(e:ProgressEvent):void
{
getData()
}
public function clientmmo(){
sock.connect(server,serverport)
sock.addEventListener(Event.CONNECT,onConnect)
sock.addEventListener(Event.CLOSE,onClose)
sock.addEventListener(IOErrorEvent.IO_ERROR,onError)
sock.addEventListener(ProgressEvent.SOCKET_DATA,onDataIn)
}
private function getData():void
{
var data:String="";
while (sock.bytesAvailable)
{
data+=sock.readUTF();
}
trace(data)
// ***************** //
// parsing code here //
// ***************** //
}
}
}I marked off the area where the parsing code goes. You would call functions from there to execute application logic.
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Offline
That goes as client.as in my root project?
I dont get the parsing code bit either..
Oh, i think parsing code activates and connects my game. Is it possible to integrate this with a login system in mysql, since i have a login/register on my website.
I noticed a localhost bit. I will change that to my ubuntu dist IP
Last edited by Zeusking19 (2011-12-05 02:21:20)
Offline
I am confused.
What do i enter into terminal?
sudo apt-get ????????????
Last edited by Zeusking19 (2011-12-05 12:00:33)
Offline
-Client.as in root project - Yes
-Parsing Code - Login - No
You would use a chain of if else statements to check what the data is and call functions in the game to make things happen. (Login could be one thing, but that is only one thing)
-Localhost Yes
EDIT: The apt-get stuff will be done at a later stage, you need to make sure the client works first.
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Last edited by bobbybee (2011-12-05 15:45:57)
Offline
Terminal wrote:
- gcc -o server handlers.c main.c
In file included from handlers.c:2:
mysql.h:1:19: error: mysql.h: No such file or directory
In file included from handlers.c:2:
mysql.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
handlers.c: In function ‘handleLogin’:
handlers.c:103: error: ‘MYSQL_RES’ undeclared (first use in this function)
handlers.c:103: error: (Each undeclared identifier is reported only once
handlers.c:103: error: for each function it appears in.)
handlers.c:103: error: ‘result’ undeclared (first use in this function)
handlers.c:104: error: ‘MYSQL_ROW’ undeclared (first use in this function)
handlers.c:104: error: expected ‘;’ before ‘row’
handlers.c:105: error: ‘conn’ undeclared (first use in this function)
handlers.c:112: error: ‘row’ undeclared (first use in this function)
In file included from main.c:12:
mysql.h:1:19: error: mysql.h: No such file or directory
In file included from main.c:12:
mysql.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c: In function ‘main’:
main.c:79: error: ‘SIGTSTP’ undeclared (first use in this function)
main.c:79: error: (Each undeclared identifier is reported only once
main.c:79: error: for each function it appears in.)
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Offline
@Zeusking19
Sorry about the late response. Those errors mostly occur from the lack of MySQL C API code. On top of that, I noticed that you are using the old version of FireMMO. FireMMOv2 is also available for download on the website, but I still need to write a few new functions before you'll be able to have a working MySQL version of FireMMOv2. In the meantime, you may want to search for the MySQL C API on Google for installation and usage tips. All of my MySQL code I had written for FireMMO I had found in documentation/forums online.
@14God
Would you please elaborate more on what you mean by a green programmer. If you would like to offer your knowledge of C and Python to assist FireMMO I would be forever grateful. You may want to read up on some of the earlier discussion in this forum topic to get a better understanding on where FireMMO is at and what needs to be done. (please respond if you think there is something important that is scattered in the documents that you think should be in the first post.
Thanks for your interest in FireMMO,
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
Offline
bobbybee wrote:
@Zeusking19
Sorry about the late response. Those errors mostly occur from the lack of MySQL C API code. On top of that, I noticed that you are using the old version of FireMMO. FireMMOv2 is also available for download on the website, but I still need to write a few new functions before you'll be able to have a working MySQL version of FireMMOv2. In the meantime, you may want to search for the MySQL C API on Google for installation and usage tips. All of my MySQL code I had written for FireMMO I had found in documentation/forums online.
@14God
Would you please elaborate more on what you mean by a green programmer. If you would like to offer your knowledge of C and Python to assist FireMMO I would be forever grateful. You may want to read up on some of the earlier discussion in this forum topic to get a better understanding on where FireMMO is at and what needs to be done. (please respond if you think there is something important that is scattered in the documents that you think should be in the first post.
Thanks for your interest in FireMMO,
-bobbybee (FireMMO Founder, FireMMO Owner, and FireMMO Lead Programmer)
I cant find the appropriate package...
Offline
bobbybee wrote:
First of all, download the appropriate download from http://dev.mysql.com/downloads/mysql/. Install as according to the text files. Also, I gave you the wrong command to compile. You should use: gcc -o server $(mysql_config --cflags) mysql.c handlers.c main.c $(mysql_config --libs) Also, you'll need to have a database setup using this SQL:
-- phpMyAdmin SQL Dump
-- version 3.2.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 14, 2011 at 08:15 AM
-- Server version: 5.1.44
-- PHP Version: 5.3.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `scratchmmorpg`
--
CREATE DATABASE `scratchmmorpg` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `scratchmmorpg`;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`username` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`id` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
That should be enough to get you started. Tell me if you continue to get errors and post which ones.
This was earlier, but it is slightly outdated information.
Offline
Any luck with this?
Offline
bobbybee wrote:
Any luck with this?
I am hosting the sql server on the internet. Ok?
Offline
It should work fine.
Offline
Hmm. Where do I put the database name, username and password?
Offline
In the mysql.h file.
Offline