Re: [Flashcoders] PHP Socket Question
Er, doesn't Flash Media Server do exactly what you want to do? I recommend Influxis hosting, pretty cheap FMS hosting and they're super developer friendly. You have to learn a bit of arcane server-side actionscript. It's actionscript 1, yurrk, with a weird API for manipulating sockets and server stuff, but it's fine once you get your head around it. hah just realised this was posted months ago. how helpful of me! 2009/7/22 John McCormack j...@easypeasy.co.uk http://www.tufat.com/s_flash_chat_chatroom.htm Thanks for that Glen, That looks really interesting. John Glen Pike wrote: You can use a database to store data in for a chat server, but you will need to have some kind of server side maintenance script to weed out the database. With a socket server system, you usually have to have a dedicated server, or at least one which lets you log into the shell and create scripts - most hosting does not let you run stuff like socket servers easily - which is why the database version may be used, because most hosting comes with this as standard. To test if your system could use a socket server, grab a free script and try exec()'ing it from a webserver PHP script to see if you could theoretically start and stop your server. I would guess most hosting locks this down and it may violate your TOS. Alternatively, look at hosted systems - Electrotank used to do a socket server and possibly provide hosting for that, it's in Java, but you would not have to write all that stuff... Also look at Moock's Multi-user Unity system - can't remember if that's useful or not. There is a program called Flash Chat for $5 which is probably worth looking at - http://www.tufat.com/s_flash_chat_chatroom.htm - there used to be a version called AMFIChat, but it has been discontinued (possibly because the guy was violating the terms of the AMF license) Anyway, in terms of time vs money $5 to spend looking at someone elses ready made system could be very cheap and you can see what server side stuff it does too. Omar Fouad wrote: hey, My boss asked me to develop a Cards Game called Estimation (I don't know if you heard about it). It is a Cards game similar to spades, where there are tricks, bids, etc. The game is going to be a Facebook application, so it is required a multi-player option (real time). At first I thought I would create a database and continuously let the client send queries using AMF, to check for changes and update the display. But a friend of mine told me this is insane. The data on the database he would buge, and I have to take in mind, that anyone could leave the game at anytime, so the data will remain in the database uselessly. He told me to use sockets, and store the variables I need, such as the rooms, the player nickname, the bids, the calls, the tricks, the scores, the rounds, the hands, and all the crap that I would need in the server side script (PHP). Is this true? If I will have to use sockets, should I store the data as variables in the server side script? I really need to figure out how to start. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] PHP Socket Question
hey, My boss asked me to develop a Cards Game called Estimation (I don't know if you heard about it). It is a Cards game similar to spades, where there are tricks, bids, etc. The game is going to be a Facebook application, so it is required a multi-player option (real time). At first I thought I would create a database and continuously let the client send queries using AMF, to check for changes and update the display. But a friend of mine told me this is insane. The data on the database he would buge, and I have to take in mind, that anyone could leave the game at anytime, so the data will remain in the database uselessly. He told me to use sockets, and store the variables I need, such as the rooms, the player nickname, the bids, the calls, the tricks, the scores, the rounds, the hands, and all the crap that I would need in the server side script (PHP). Is this true? If I will have to use sockets, should I store the data as variables in the server side script? I really need to figure out how to start. Thanks. -- Omar M. Fouad - Adobe™ Flash© Platform Developer www.omar-fouad.net Cellular: (+20) 1011.88.534 / (+20) 1444.37.175 This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP Socket Question
You can use a database to store data in for a chat server, but you will need to have some kind of server side maintenance script to weed out the database. With a socket server system, you usually have to have a dedicated server, or at least one which lets you log into the shell and create scripts - most hosting does not let you run stuff like socket servers easily - which is why the database version may be used, because most hosting comes with this as standard. To test if your system could use a socket server, grab a free script and try exec()'ing it from a webserver PHP script to see if you could theoretically start and stop your server. I would guess most hosting locks this down and it may violate your TOS. Alternatively, look at hosted systems - Electrotank used to do a socket server and possibly provide hosting for that, it's in Java, but you would not have to write all that stuff... Also look at Moock's Multi-user Unity system - can't remember if that's useful or not. There is a program called Flash Chat for $5 which is probably worth looking at - http://www.tufat.com/s_flash_chat_chatroom.htm - there used to be a version called AMFIChat, but it has been discontinued (possibly because the guy was violating the terms of the AMF license) Anyway, in terms of time vs money $5 to spend looking at someone elses ready made system could be very cheap and you can see what server side stuff it does too. Omar Fouad wrote: hey, My boss asked me to develop a Cards Game called Estimation (I don't know if you heard about it). It is a Cards game similar to spades, where there are tricks, bids, etc. The game is going to be a Facebook application, so it is required a multi-player option (real time). At first I thought I would create a database and continuously let the client send queries using AMF, to check for changes and update the display. But a friend of mine told me this is insane. The data on the database he would buge, and I have to take in mind, that anyone could leave the game at anytime, so the data will remain in the database uselessly. He told me to use sockets, and store the variables I need, such as the rooms, the player nickname, the bids, the calls, the tricks, the scores, the rounds, the hands, and all the crap that I would need in the server side script (PHP). Is this true? If I will have to use sockets, should I store the data as variables in the server side script? I really need to figure out how to start. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] PHP Socket Question
http://www.tufat.com/s_flash_chat_chatroom.htm Thanks for that Glen, That looks really interesting. John Glen Pike wrote: You can use a database to store data in for a chat server, but you will need to have some kind of server side maintenance script to weed out the database. With a socket server system, you usually have to have a dedicated server, or at least one which lets you log into the shell and create scripts - most hosting does not let you run stuff like socket servers easily - which is why the database version may be used, because most hosting comes with this as standard. To test if your system could use a socket server, grab a free script and try exec()'ing it from a webserver PHP script to see if you could theoretically start and stop your server. I would guess most hosting locks this down and it may violate your TOS. Alternatively, look at hosted systems - Electrotank used to do a socket server and possibly provide hosting for that, it's in Java, but you would not have to write all that stuff... Also look at Moock's Multi-user Unity system - can't remember if that's useful or not. There is a program called Flash Chat for $5 which is probably worth looking at - http://www.tufat.com/s_flash_chat_chatroom.htm - there used to be a version called AMFIChat, but it has been discontinued (possibly because the guy was violating the terms of the AMF license) Anyway, in terms of time vs money $5 to spend looking at someone elses ready made system could be very cheap and you can see what server side stuff it does too. Omar Fouad wrote: hey, My boss asked me to develop a Cards Game called Estimation (I don't know if you heard about it). It is a Cards game similar to spades, where there are tricks, bids, etc. The game is going to be a Facebook application, so it is required a multi-player option (real time). At first I thought I would create a database and continuously let the client send queries using AMF, to check for changes and update the display. But a friend of mine told me this is insane. The data on the database he would buge, and I have to take in mind, that anyone could leave the game at anytime, so the data will remain in the database uselessly. He told me to use sockets, and store the variables I need, such as the rooms, the player nickname, the bids, the calls, the tricks, the scores, the rounds, the hands, and all the crap that I would need in the server side script (PHP). Is this true? If I will have to use sockets, should I store the data as variables in the server side script? I really need to figure out how to start. Thanks. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders