0

I'm desinging a web based game. In this game almost all actions will take certain amounth of time but i'm not sure about where to store and execute the actions.

For example a character want to go to A to B and let's say this will take 30 secs. In my character table there is a column called Location, witch is storing Id of current place. So i must change this Id after 30 seconds.

The best solution i could me so far is creating SQL jobs. Since i don't have envoirment to test how 100.000 Sql jobs will effect the server performance, i wanted to ask is there any other ways or should i stick to Sql jobs?

PS: Logic is mostly same with other web based games, any direct example from others games about how they handle such things will be appreciated

Sefa
  • 8,865
  • 10
  • 51
  • 82
  • ok vgSefa i just want to know why are you using a database everything that is needed occurs in your javascript files unless you are planning on making the game so that multiple users can login and so on please give me just a little more info on what you wish to accomplish and what type of game it will be example farmville and so on – Wolf Jun 09 '14 at 08:31

3 Answers3

1

Using sql database will cause you alot of pain later on because is not ideal for what you are attempting https://gamedev.stackexchange.com/questions/40215/use-a-sql-database-for-a-desktop-game

only use sql if you want to store vast amount of login details other than that use something similiar to couchbase nosql database

http://www.couchbase.com/why-nosql/nosql-database

just my 2 cents hope i helped

Community
  • 1
  • 1
Wolf
  • 170
  • 1
  • 4
  • 19
0

You don't need any job for this.

If we stay at the example above then we can say that every place where our character is can have additional information (in an extra table where the places and the characters are connected) such as when start the validity of the record:

  1. Player A is at Brighton from 2014-05-01T00:00:00 to NULL
  2. but he is moving to London which takes 30 secs
  3. Player A is at London from 2014-06-09T10:30:30 to NULL and the previous place record will be closed (set the to value) with the current from date (2014-06-09T10:30:30).
Peter Kiss
  • 9,309
  • 2
  • 23
  • 38
0

I implemented a simple scheduling mechanism using only ASP.NET. You can find a proof of concept at http://weblogs.asp.net/ricardoperes/using-the-asp-net-cache-as-a-scheduler.

Ricardo Peres
  • 13,724
  • 5
  • 57
  • 74