Skip to main content
Removing update meta-tag, as discussed here https://gamedev.meta.stackexchange.com/a/2510/39518
Link
DMGregory
  • 136.3k
  • 22
  • 247
  • 373
Source Link

ASP.NET Browser game Timers

I am developing a simple browser game, using ASP.NET, C# and SQL Server 2012. I need to implement build time of some unit or building. One way would be storing finish date to database and just fetch remaining time on refresh, but there is one problem. If user doesn't refresh in a long time and building finished days before, the dependent records in database won't get updated (e.g. I have finished building Iron Mine 3 days ago, but the production per hour wont get updated until user refreshes). How would you approach this problem ? Is there some sort of timed event in database, that will not ruin database server performance when there will be a lot of timers ?