Skip to main content
GameDev.net gamedev.net
🔒 Locked

Programming a game server

Started by lime Mar 20, 2005 at 11:03 PM 5 replies 700+ views
Original Post
lime
lime
Hello everyone, I'm a first timer here so just saying hello to everyone before I get down to my question =) Ok, that done, I'm trying to develop a multiplayer game that has a flash interface and using an xml socket server. I bought a book on using xml with flash and it gives a simple example of a flash chat. They gave an example of a simple socket server written in java and the way it transmits data to/from clients is a line of xml that contains the message and the user's name. I'm trying to figure out how to extend this to a more complex use. For example if the user has more attributes than just a name (ie, gender, amount of money, items carried), would I have to append all attibutes to the xml tag or would it be more efficient to append a user id and connect to a database to read all the attributes? A problem I see with this method is that each of the other clients would have to make a call to the database so maybe the first method of appending all the user's attributes at once is a better method. I guess my main question is how is this actually done with the more complex MPORPGs or MMPORPGs or what is the best way to handle it? I'm trying to understand the simple chat example and expand it to characters and items and more than just chatting. Any comments or direction (ie tips, hints, tutorials, or good books) would be greatly appreciated. Thanks a lot everyone, Lime
Brice Lambson
Brice Lambson
When it comes to networking, I find that the smaller the car, the more traffic you can have, or in other words, the less data you're sending to each user, the more users your server can handle.

If you don't have to send ALL the information about the user, don't.

When you first meet a user, all you need to know is what they look like, where thy are, their name, etc. You only need to know how much money they have if you plan on taking some of it.

I think that either sending all the data through sockets, or sending a user id via sockets, and retrieving other info via a database connection would work; however, if you want to display user info on a webpage also, a database would make things easier.

Anyway, I hope you got something out of all that BS :).

-Brice

"Blessed are The Geek; for they shall inherit the Earth." --Matghew 5:5
--Brice Lambson
lime
lime
Thanks for the reply. Do you know of any sources where I can read up on or look at examples of how others actually mangaged to transmit the data? I think I might append the location and appearance attributes and then leave the rest in the database, like you suggested.
Brice Lambson
Brice Lambson
[google]...other than that, no.

Altough, I will tell you that you need three things: A Flash Client that connects to your Game Server which connects to a Database.
--Brice Lambson
lime
lime
Quote:
Original post by Brice Lambson
Altough, I will tell you that you need three things: A Flash Client that connects to your Game Server which connects to a Database.


Yup, that I was pretty clear on. But I'm going one step at a time =) and decided to get the server part done first cause it seems the most important right now. Since I'm still only in planning stage, I'll keep researching.

Thanks for your suggestions
graveyard filla
graveyard filla
can you give more info? what kind of game is it? how many players do you want to handle at once? is the server trusted and dedicated? why are you using XML?
FTA, my 2D futuristic action MMORPG
lime
lime
The game is a multiplayer rpg. It will more like a community site but with cartoony characters who walk around and chat with each other. There will also be an economy and minigames to play, also multiplayer.

The server will be dedicated or at the very least virtually dedicated but in development it's running off my own computer. I don't expect it to have that many players, it's just something I thought I'd try making for fun. I don't know if others will find it fun or exciting but I'd like to think so.

I chose XML because I've read that transmitting information to and from Flash applications is best done with XML or is the quickest way at least.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.