3 Replies - 1477 Views - Last Post: 31 May 2008 - 08:31 PM Rate Topic: -----

#1 pwee167   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 31-May 08

Models for a Web-based Game

Post icon  Posted 31 May 2008 - 01:53 AM

Hi,

I am new to this forum, but not new to coding. Im thinking of making a simple web-based multiplayer card game. I am thinking of doing it using php/ajax and mssql, but i wanna get an overall idea of how a web game is built.

My idea (which im sure is novice) is to store each move in a game in the mssql database, matching userids to a gameid, and of course the move made by a player. Then have some javascript on the players' page check at very small intervals, if there is any new moves added for the specific gameid in the database, if so update the page with the new moves.

Im sure the game would work, but it might not be efficient, or scale very well if there are multiple games being played on the same database. If everyone is making calls to the database to check if there is any new moves made, would this not slow/clog up the database.

Can someone give me a better model for multiplayer web games?

Any ideas are appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Models for a Web-based Game

#2 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3202
  • View blog
  • Posts: 19,235
  • Joined: 14-September 07

Re: Models for a Web-based Game

Posted 31 May 2008 - 06:49 AM

Multiple instances of the game being played would utilize their own mini database. You could have one "main" DB for the storage of top scores or such.
Was This Post Helpful? 0
  • +
  • -

#3 pwee167   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 31-May 08

Re: Models for a Web-based Game

Posted 31 May 2008 - 08:22 PM

View PostKYA, on 31 May, 2008 - 06:49 AM, said:

Multiple instances of the game being played would utilize their own mini database. You could have one "main" DB for the storage of top scores or such.


OK, so i have to create a new mini-db on starting of a new instance of a game. But is the general concept i explained before the usual model for a web-based game?
Was This Post Helpful? 0
  • +
  • -

#4 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3202
  • View blog
  • Posts: 19,235
  • Joined: 14-September 07

Re: Models for a Web-based Game

Posted 31 May 2008 - 08:31 PM

I have never made one, but I would say your theory is right on, if a bit simplistic (i.e. it gives an overview, no gritty details).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1