-
Flash Developer on a break
PHPgateway
I was asked a while back to make a few PHP scripts so you guys can easily put things together for turn-based or a (slow) realtime multiplayer games.
Sounds like a good idea, right?
So.. will this be like a low-end, soft version of Flash Remoting and/or FlashComm?
Well, first we should know then what those two things are:
What is Flash Remoting?
Flash Remoting is a Flash MX specific feature which allows you to execute Remote Procedural Calls (RPCs) via Flash MX and transfer serialized, type-persistent objects directly between the server and a Flash MX client.
In more simple terms, Flash Remoting allows your Flash MX movie to exchanged typed data directly with a server-side language, allowing for increased and more easy integration between the front-end and backend of your site. For example, you can send an array from your server-side language into Flash as an array, instead of as an XML object or a String representing an array (which you process within Flash to turn back into an actual, Flash readable array).
The major use for Flash Remoting is in creating Rich Internet Applications (RIAs). In other words, using Flash not just as an animation tool, or even a jazzy HTML interface, but as the GUI and Client for a full-scale, service providing, Internet application.
What is Flash Communication Server?
It is basically a server you can connect to with your Flash applications to develop the next generation of online communications:
Deliver multi-way audio, video, and real-time data in your websites and Rich Internet Applications. Create engaging pre-sales applications that integrate audio, video, text, chat, and enterprise data. Develop powerful corporate presentations with streaming video and synchronized multimedia content that are deployed seamlessly within the context and branding of your site. Or build collaborative meeting applications that bring people together in real-time-connecting them to each other, to live data sources, and to back-end services for a significantly more compelling online experience.
My idea was first to create a small easy script that lets you send some variables to a MySQL database and someone else to retrieve it. But now I'm thinking about something better.
It won't be exactly like Flash Remoting, since I won't use the AMF(ActionScript Message Format) protocol to send objects and the like over the net. Instead simple objects that are converted into strings can be send.
It won't be exactly like FlashComm. PHP don let you stream things, and without some rare PHP-server settings, you won't be able to send anything in realtime using socket technology. Instead data, it doesnt matter if it is for a chat, simple text or arrays will be transferred with a small delay.
So I will make a full component with new actionscript functions, reference, etc. (So no digging yourself in PHP scripts..) However, I'd like to ask you guys if you like some feature I might be able to implement. Or just feedback.
Features I want to implement for sure:
- LoadAndSend refresh rate
- Able to send and load simple Objects made with new Object()
- Able to send and load arrays
- Able to send and load variables
What do you guys think?
Jeroen
| "Keep Flashing!"-Jeroen
PHP multiplayer? Check this thread: PHPgateway
-
Phantom Flasher...
Sounds good... so this would be great for an online game of chess, or turn based game.
Is it going to connect to a database at all?
-
Flash Developer on a break
You will need a server that supports PHP and MySQL(database).
The only time you'll have to mess with the PHP scripts is when you upload them and run them the first time manually to setup the tables in your MySQL database.
| "Keep Flashing!"-Jeroen
PHP multiplayer? Check this thread: PHPgateway
-
Phantom Flasher...
Ok cool... will it have an install script for setting up the mysql database/tables etc...
-
Senior Member
cant wait
-
Senior Member
Sounds very interesting.
I am concern about one thing regarding multiplayer applications with php and mysql: what happens with the performance of the overall system when you have many players? Is there a way to check how the system is performing?
A couple of suggestions for your tools:
How will work matching players, getting them together, etc.?
It will be good to be able to see how many players are using the system.
I´ll keep thinking.
-
Hype over content...
What a fantastic idea / offer
Squize.
-
Flash Developer on a break
Markp.com
Ok cool... will it have an install script for setting up the mysql database/tables etc...
Yes, it will.
martin47
I am concern about one thing regarding multiplayer applications with php and mysql: what happens with the performance of the overall system when you have many players? Is there a way to check how the system is performing?
A normal server can handle douzens of simultaneous users. A MySQL database can have thousands of simultaneous requests at the same time. The lag will lay with the server bandwidth and the client bandwidth.
How will work matching players, getting them together, etc.?
It will be good to be able to see how many players are using the system.
I will make a way so you can add players in a game list who use the same game variables. (So the flash app sends a playerid, the script checks in what game the player is and stores the players data in the database while retrieving the data from the players who are in that same game.)
What about a setting so the administrator(You, with ftp access) can set a max amount of players for the whole server? And a que(sp?) list so players can wait in turn untill there's a spot free?
That way you can see for yourself if the server gets bogged down and set the max amount lower.
| "Keep Flashing!"-Jeroen
PHP multiplayer? Check this thread: PHPgateway
-
Phantom Flasher...
Originally posted by jeroen84
What about a setting so the administrator(You, with ftp access) can set a max amount of players for the whole server? And a que(sp?) list so players can wait in turn untill there's a spot free?
That way you can see for yourself if the server gets bogged down and set the max amount lower.
Yup... good ideas about the login etc... I think it needs an administration panel anyway.
Is there a way to limit the bandwidth... just if your game turns out to be popular, this might be a good feature
Limiting it to run on the one server, so you can't get someone poaching your files/bandwidth.
Also I'm sure I don't need to tell you but no passwords in the SWFs I am so dissapointed when I get a great php/swf app and some dumbass has included passwords in the swf
I hope this isn't spiralling out into something you are going to have to take a year out of life to write
-
Can't wait 'til you release this.
I have a question. I was wondering if you can post as much as you have as you go along creating this. The reason being is that I know a little bit of PHP and MySQL, I just really need a base to start on. From there, I think I can go in and modify it.
Thanks
-
Flash Developer on a break
-
Thanks jeroen84, I will take a look at your php scripts and see what I can get out of it.
Can't wait to see your final products in a few weeks.
Good luck
-
-= phil =-
may I ask you expect to tell flash that it need to load new data?
The only way I can think of is loading something every few seconds, no?
-
Senior Member
sounds very interesting jeroen84,
I'd like to get involved. I'm a flash developer and a PHP programmer. If theres anything you want help with, let me know.
nice one
-
Senior Member
-
Senior Member
Originally posted by jeroen84
And I hope to be ready in a few weeks.
jeroen, how are you doing?
Can the scripts be downloaded now?
-
"Bandwidth"
Haha, lucky me, i'm a webhost :-)
Aha this is exactly what we all needed!
Thank you Jeroen :-)
-
Heli Attack!
=) Im doing something similar atm now you mention it.
You can replace:
$sql1 = "UPDATE $db_table SET flashvarX='$x' WHERE game='$gameName'";
$result1 = mysql_query($sql1);
$sql2 = "UPDATE $db_table SET flashvarY='$y' WHERE game='$gameName'";
$result2 = mysql_query($sql2);
with:
$sql = "UPDATE $db_table SET flashvarX='$x',flashvarY='$y' WHERE game='$gameName'";
$result = mysql_query($sql);
stops multiple requests..
Im working on a similar thing, but including level saving for users, so a user can log in and create say, a racetrack. Then anyone can load up their map.. should be awesome.
Last edited by iopred; 06-27-2003 at 06:32 PM.
-
Senior Member
Im just kicking this back upto the top because it is interesting and will be very helpful to a lot of us. Have you done any work on it jeroen?
fracture2 - the sequel
fracture - retro shooter
blog - games, design and the rest
"2D is a format, not a limitation" -Luis Barriga
-
Senior Member
Sorry to bring this back (again)
I was just wondering, when you say 'slow' realtime games what does this constitue? Because i would probably be interested in using this in a project that im just beginning.
fracture2 - the sequel
fracture - retro shooter
blog - games, design and the rest
"2D is a format, not a limitation" -Luis Barriga
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|