0

I try to search on the Google about "Online multiplayer game" by using AS3 with PHP,because I'm going to develop Flash game that all the user can login and create his/her own character that they can walk around and Chat in the living room.

My Plan is

MySql sent User_Information to PHP then sent data to Flash (AS3) for display the information

(I try to use PHP because now I'm using PHP sever and I don't want to change it,Sorry for that)

MSQL > PHP > FLASH

I did some result from Google but I got AS3 with C#

https://playerio.com/documentation/tutorials/building-flash-multiplayer-games-tutorial/

and AS3 with JAVA

http://techylib.com/en/view/hihatclover/free_ebook_actionscript_3.0_for_multiplayer_game_and_virtual

so there are any way that I can use AS3 with PHP then MYSQL

5 Answers 5

2

I use AMFPHP (http://www.silexlabs.org/amfphp/) to talk to a remote server. It's free and super easy to install. Check out the documentation here (http://www.silexlabs.org/amfphp/documentation/)

Sign up to request clarification or add additional context in comments.

2 Comments

Thank Ronnie for your help ^~^ but I still have some doubt you said "Install" it mean I have to install on my server?? suppose I'm using Free Hosting,what should I do?? (I'm very new in web programmer and buy a server is very expensive right now (But I try to do everything that flash can because I really love it)).
the "install" for amfphp simply consists of downloading it to your computer, unzipping it and uploading the folder to your server. It will still work on a shared host server
2

There exist other MMO technologies for flash that scale much better than AMFPHP.

When building an MMO, consider how the backend will handle failure. Some level of failure from a really busy service is inevitable. The question is how many users are affected by a failure.

Scalability issues differ if the server side is a 'stateless' REST based protocol, or you are building a server that keeps state within server memory.

If you really put a load on AMFPHP, the AMF Serializer will drag the server's performance exponentially. It is simply not a linearly scalable algorithm to convert from Java to AMF serverside.

I've found that SmartFox Server (http://www.smartfoxserver.com/) is a good alternative (written in java) for multiplayer games. Its also extensible, using java. It works using Sockets, and the AMF serialization is done Client Side with the provided SmartFox ActionScript Library.

From a "quality of service" perspective, it would be intelligent to run multiple SmartFox processes on the server (running on different ports) and have each process only manage a few users. This way if a SmartFox process dies, the whole server ins't affected, only the few users being managed by that process.

A safe limit is < 15 users per process. In theory if your goal is to support 10000 simultaneous users on a server, you would have 667 SmartFox processes running on 667 different ports.

Of course this depends on the server side setup/logic, but in the simplest case, real-time MMO data from a client is simply replicated by SmartFox and broadcast to all the players connected to that process instance.

Remember, if you require further server logic, you can extend the SmartFox server with Java. But remember, the more you extend the Server, the more work is being done, and the less connections you can ultimately support (per server).

1 Comment

just about scaling AmfPHP: It's possible to use it with JSON, and you keep the ease of use of AmfPHP. Or else use a PHP extension for the AMF serialization. For example baguetteamf.com (disclaimer, I run both projects)
0

You can program Actionscript 3 in Flash Builder and it provides more advanced tools to consume PHP services, also Flash Builder is capable of generate the basic CRUD to consume these services using the Zend Framework, here is a basic tutorial for PHP programmers : http://corlan.org/flex-related/flex-for-php-developers/ also take a look here http://www.adobe.com/es/products/flash-builder-php.html

Comments

0

I am working on a similar kind of game and I am using php to communicate with mysql as well.

The tutorial I am using is:

http://active.tutsplus.com/tutorials/actionscript/create-a-flash-login-system-using-php-and-mysql-part-1/

As for the playerio, I am also a bit confused.

4 Comments

thank Ankur Sharma U should try this website also developphp.com/list_flash_video.php they give tutorial about AS3 with PHP and Mysql,they teach by using Youtube video
Hello, I was looking for more alternatives and I think this question might interest you - stackoverflow.com/questions/190802/…
Thank u So much Now I got want I want
I added another question which is a bit more specific to me but you might want to have a look anywways- stackoverflow.com/questions/14693968/…
0

There is a couple of multi player gaming servers are available.. my favorite one is SmartFoxServer 2x http://smartfoxserver.com/

however, you can develop a multiplayer game by using php and Flash as3 for that you have to create a PHP socket server program to handle Actionscript request. This can be achieved after you done creating PHP socket Server and you have to create socket connection from flash and connect to php socket server.

Kindly see this link for creating socket program in php :http://www.christophh.net/2012/07/24/php-socket-programming/

kindly refer this link for creating actionscript socket programming http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cfb.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.