1

I'm planning on creating a browser based RTS game using ASP.NET and MySQL.

I was wondering if there is a way to do this without having a central server running all the time - i.e. if all commands can be completed client side when a player logs on and performs an action, and then the database keeps a record of this.

Thanks

jdtaylor
  • 334
  • 2
  • 5
  • 20
  • 1
    I assume you mean without coding your own game server. Unless you want the MySQL running locally on the client pc as well? – William Oct 07 '11 at 15:45
  • It's unclear what you mean by "without a server". ASP.NET and MySQL would have to be running on a server unless you're having every player be part of a decentralized server which would be both complex and inconvenient. – Davy8 Oct 07 '11 at 15:56
  • I basicly mean that everything would be controlled on the webpage instead of another application running all the time on the server (of course the asp.net and mysql would be on a server hosting them) hope that makes more sense. If you think i should have something else running do you have any advice as to how to get started with that? or any links that would help? – jdtaylor Oct 07 '11 at 18:17

1 Answers1

2

Simply put, no, it's a bad idea. Mostly for one of the main rules of creating an online game: Never trust the client.

Now, there's nothing technical to prevent you from doing this, but plenty of limitations you'd have to work around, and because of the aforementioned rule, it wouldn't be worth it.

thedaian
  • 1,313
  • 9
  • 11
  • ok thanks - i'll have to look into how to make a server for it then. know any good websites with tutorials/help for that? – jdtaylor Oct 07 '11 at 18:14
  • ASP.NET and MySQL run on "a server". It might help to clarify what you mean by "a server", and what sort of game you're hoping to make. You're going to have a hard time making a browser based version of Starcraft II – thedaian Oct 07 '11 at 18:36
  • reading back over that i can see it wouldn't make much sense! I'm hoping to make a game like [link](http://www.travian.com). and by "server" i mean a VB.NET file which continues running while the user is offline - any attacks and interactions between players would be dealt with on this VB.NET file so that the game does not rely on a player being online all the time! – jdtaylor Oct 07 '11 at 19:14
  • Ah, there we go. Travian (probably) doesn't use that sort of server you're thinking of, it would increase server load with little actual benefit. They most likely calculate battles and such when one of the users involved refreshes the page (and the calculation is done serverside). This allows for instant results if either user is logged in, and if both users are logged out, then whoever logs in first "triggers" the battle calculation. At least, this is how I'd do something like that. Cron jobs could also work, depending on a few factors. – thedaian Oct 07 '11 at 19:39
  • thanks, has helped alot - alot of people have said i need something running in the background doing that, but what you said would work as well – jdtaylor Oct 07 '11 at 19:45