2 registered members (TipmyPip, AndrewAMD),
1,151
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Client<->database multiplayer
#308895
02/05/10 17:27
02/05/10 17:27
|
Joined: Oct 2004
Posts: 4,134 Netherlands
Joozey
OP
Expert
|
OP
Expert
Joined: Oct 2004
Posts: 4,134
Netherlands
|
Hello,
I've been working on a MUD game since november, and so far the programming goes pretty well. I have a small chat and can throw in basic commands to perform an action.
But this MUD isn't a multiplayer game how you would normally make one; I decided to make an attempt making a multiplayer game without host application. Instead, all data; that is: The world, players, chatting, gameplay, stories; all of it is stored in a database. The clients just throw queries at it and get data back. E.g. player types "walk west", a query to the commands table is thrown to see if "walk" exists. It does, a reference to what action needs to be performed is thrown back, and then a query to the "rooms" table is made to see if the player can walk west.
As for chatting, the client keeps querying the database every half a second to look for new chat messages. This causes the most wear on bandwidth but that's a small price. For this way I only need a cheap webserver to apply my game online, and not some expensive virtual server that needs to run an application all the time.
However, I have one issue now. How is hack-safety using this method? Can players easily alter the client/outgoing query to hack the game? I have no clue whatsoever on those networking issues, but I hope it's not too easy to hack a client application.
Thanks, Joozey
Click and join the 3dgs irc community! Room: #3dgs
|
|
|
Re: Client<->database multiplayer
[Re: lostclimate]
#308944
02/05/10 23:03
02/05/10 23:03
|
Joined: Nov 2002
Posts: 913 Berlin, Germany
SchokoKeks
User
|
User
Joined: Nov 2002
Posts: 913
Berlin, Germany
|
when people figure out the user name and password of your database, which has to be stored somewhere in your application files, they can do almost everything to the tables available, it depends on what rights you give the user. you can set these options in mySQL: http://www.debiantutorials.org/images/user-privileges-phpmyadmin.pngbut adding 1000 gold coins instead of 1 can not be disabled this way. there is no way to secure a direct connection to the database. what you should do is to wrap all queries into php files and access them via a http-get plugin. in that php files, you could do the checks if the query is valid. btw: I'm also working on an mmorpg
|
|
|
|