You don't need frames to view this website. Flash communication server. Flash mx xml socket server.
Home
Main Menu
Home
- - - - - - -
What is Palabre ?
Features
News
FAQ
Forum
DEMO
- - - - - - -
Downloads !
Browse SVN
- - - - - - -
Search
Contact Us
- - - - - - -
Sourceforge Project Page
Python
Links
Palabre on Facebook






Actionscript for Multiplayer games
 
Download Palabre Flash Xml Socket Server DOWNLOAD Download Palabre Flash Xml Socket Server FORUM Download Palabre Flash Xml Socket Server FAQ Download Palabre Flash Xml Socket Server WHAT IS IT
 



Using Palabre ? Coming here for Support ? Please consider making an (even small) donation :)
Palabre Forum  


::post new topic::
server side processing - 2006/09/11 19:55 hi there

i have a simple flash game whcih multiple users will play. It is a simple car racing game. What i would like to happen, is on your screen you see player a and b

player a is controlled by yourself, and player b by another client. in the flash client, you have a throttle which will determine your speed.

is this possible to create in palabre?

is it possible for me to send information to the server, and have a program on the server side use the data for some processing, then return the answer to multiple clients?

what a cool little program, well dne ;-)

|Jamie
  reply | quote
Re:server side processing - 2006/09/11 20:19 i have just had a thought!

if i have client a and b playing the game

i could have a master client which recieves the data frm a and b, does the calculations, then returns the data to a and b

am i on the right track here?

jamie
  reply | quote
Re:server side processing - 2006/09/12 09:10 Hi

Well what you want to do is what Palabre is meant for. (I meant reallly at very first, I started it for a Car game :) )

So Yes Palabre can do that,
And you don't need a Master client, client A cans end datas to client B and B can send datas to A ( <m toclient="B"><pos><x>12</x><y>15</y></pos></m> for example ) ...
You may even have a C and D (and E and F ...) car :)

Have fun !
  reply | quote
Re:server side processing - 2006/09/12 13:29 what i have done so far is this.

Because i want a variable number of players, i have a server application

This has an array of avilable slots. Clients send a connect request, the server then adds them to the array, and lets the client knows it is connected. The client then goes to the ready state.

The server then begins the game, and the clients play away. The game is then ended by the server, and the users stats are saved to a database.

I did have another question but you have answered it in your previous answer. I was oging to ask how i can pass variables, i didnt realise you could pass an xml packet, how silly i am, i thought you could only send text.

I do have another question though. I would like the server to braodcast when someone leaves the game, and have their car crash or something, though for obvious reasons, a client cant always tell the server when it is or has left. How owuld you suggest i handle this? Should i have the server send pings to the clients at regular intervals and catch when not recieved a response? if so, how often do i ping?

what an excellent, powerful yet frightfully simple thing to use!

I was very worried about having to do this, not anymore

keep up the good work

Jamie
  reply | quote
Re:server side processing - 2006/09/12 15:41 Yep you can pass xml packets but it's only fixed in SVN version, will be good for 0.5 (in the mean time you could also pass :<msg toroom="cargame">pos|X|10|y|12</msg> and parse it for example ... )

For broadcasting, you have nothing to do, as soon as a client leaves a room (you have to make all the clients join the same room) all the clients of this room are notified

And when a client sends a message to a romm every one receives this message too

Have fun
  reply | quote
Re:server side processing - 2006/09/15 14:42 Hi there

Ok, i made my game server out of flash and my client in flash also

Setup was as follows

My game server (flash movie, not the palabre server) has slots, and clients then connected to the slots in this server. When they connect, the game server notifies the room. Each client then adds a new movie clip per each new player that gets added, and also removes it if someone leaves.

Then , once the game is started, each client enters there speed, every 1 second, each client sends a message to the game server like the following

<m c="gameserver">UpdateProgress|speed, distanceTravelled</m>

The game server then broadcasts to all members in the room

<m r="currentGame">Update|client,speed,distanceTravelled</m>

*What i have done, is for the game server and client is added a switch to the onrecievexml event in flash. Basically i take the first part of the string, and carry out a switch to determine what processing occurs. *

Anyhow, the client then takes the params, and moves the appropriate movie clip. The client alos works out who is leading, shows the current distance covered and speed of the other cars.

But, with more than two clients, everything freezes up :-(. It starts ok, but then after half way, it all slows and blows up. boom!

The problem that i have i think is that there has to be a game server involved, which can handle who is in a game, and determine who wins, and saves a users stats to the db.

So what are my options?

I think the bottle neck is occurring at the game server side, 5 clients sending request to palabre, these then go to game server, it then responds to each client, poor little game server cant handle it.

Am i doing something wrong here?

Is it possible to edit the palabre server itself to handle slots and games?

Good fun though

Jamie
  reply | quote
Re:server side processing - 2006/09/16 13:38 Hi

I don't know what's going wrong here
What is "freezing" ? the Palabre server ? or the flash clients ?
I had experiences with Flash clients filling up memory when stocking to much informations (ex: a variable, or textfield with the historic of all XML nodes received)


Am i doing something wrong here?

Maybe creating a "flash game server " and sending twice every informations. when I was developping the same kind of game, I had no "Flash game server"
The client player creating the Palabre Room for a new game was the one deciding "when the game start", "who wins" ... And every flash client was sending the informations directly to the current game room
(when loading swf everyone joins the "lobby" room , and then everyon can start a new game by creating a "sub room" and establishing via room params if the game was started, enough player ...


Is it possible to edit the palabre server itself to handle slots and games?

I'm not quite sure to understand what you mean by games and slots, but isn't it rooms and players joining rooms ?

Have fun !
  reply | quote
::post new topic::
SORRY, website is currently mostly broken due to software changes on the server.
Hope to fix it soon ...

In the meantime you may still download palabre or use the forum