PDA

View Full Version : Flash socket server for multiplayer?



Alphabet
December 28th, 2006, 02:14 AM
I'm trying to create a simple multiplayer game, but got a little confused on the whole flash server part. What I'm confused on are:

1) Is flash remoting the same as using a flash socket server?
2) What are the good open source(and non cpu intensive) available ways of doing it? I need one that uses php, so I can add stuff to it. Or should I just try to create my own socket server? I saw osflash.org and they contain a pretty big list of them. Link here. http://osflash.org/open_source_flash_projects/#servers_and_remoting
Which ones are good and which ones should I avoid? Does anyone have experience with them? (I read amfphp's guide/tutorial, but they keep talking about a "service browser". WTF is that.)


This is what I'm trying to do.
--A) Someone logs in to server.
--B) They can then select where they want to go with a button.
--C) On button click, connect to server to retrieve environment data. When connected, it places them in a room, with maybe 16 people. If a room's full, create another room.
--D) User is then connected, and enemy AI and interactions are done server side to prevent cheating.
I know how to do B) and D), but I'm stuck on A) and C). And yes, I know making a multiplayer game is hard to do, even for a simple one. But I'm pretty determined to do this.

bombsledder
December 28th, 2006, 12:15 PM
im not sure what flash remoting is but you can create a socket handler in c++ it doesnt have to be in php and you can also add your own code to it, and im pretty sure c++ > php in speed, more functionality which c++, and what you are asking is to pretty much create the networking part for you...

Alphabet
December 28th, 2006, 02:38 PM
thanks for the reply. Looks like I'll have to write the socket handler then

bombsledder
December 29th, 2006, 09:16 AM
need any more on the sockets help just post =O

Alphabet
December 29th, 2006, 10:59 PM
thanks. I've been reading and looks like php isn't suited for a large scale socket server. So I'll use Red5. All of the other ones I saw have problems like 1) rarely worked on with no new updates recently, or 2) cost money. I don't know java, so I have to learn it as I go along.

bombsledder
December 30th, 2006, 04:21 PM
post a link to red5 so i can check it out and see if it whats you need
:hitman:

Alphabet
December 30th, 2006, 07:18 PM
http://osflash.org/red5
What they've done and what they eventually plan to do. Current release is .6
http://osflash.org/red5/roadmap

Hey bombsledder, I read you were helping write the socket server for the zombie multiplayer game. A quick question about it, how are you planning to handle all the connections? I mean, from what I read, if a connected client sends info to the server, the server then sends info to all connected clients. That's great for chat, but isn't that really inefficient for a multiplayer game where the majority of the people will never see each other? How are you planning to group people together so that your server will send information if, and only if, the people are within range of each other?

I've been thinking about it and couldn't come up with a good solution to the problem. But that may be because I don't have any experience working on socket servers and what they're capable of.

Edit: I remember something from CS. Maybe breadth first search? I don't have much experience with it though.
http://www.google.com/search?hl=en&q=breadth+first+search+multiplayer+game&btnG=Google+Search

bombsledder
December 30th, 2006, 07:39 PM
well a simple iterator would determine which people would be located within the radius, in a simple tile based game

X= Client Player
1 = Connected Player
0 = empty space

1,1,1,1,1,1,1
0,0,0,1,1,0,0
1,1,1,X,1,1,1
1,1,1,1,1,1,1
0,0,0,0,0,0,0
i will iterate from my position and the tiles would tell me if i decided to to put a bubble on my player (for text or what not) i would make sure that everyone with in this range can see the bubble, now when a player walks i will make sure that they are updated with this information too, at the moment im working on a solo project since i left the project zombies (lack of development) im going to create a simple game on here that is going to be tile based, i know this explanation is not too good maybe i can post some code for ya later, i would like to help

Alphabet
December 31st, 2006, 12:04 AM
Neat, that'd help a lot.