I have a database with game data (map, players, etc.), and I have kernel mechanics written in a T-SQL stored procedure.
I need a gameplay loop (through a stored procedure) every "X" seconds.
I tried using SQL Job, but when I set the interval in seconds, the SQL server stops responding. If I set the interval for more than one minute, everything was fine.
I need a game cycle accurate in time, for example. the game loop will only start once and each "X" will be executed exactly (tolerance should be less than one second).
Can I do this using SQL Server features? Or should I create a Windows service that will repeat the game loop procedure? Or should I go the other way?
Thank!
EDIT:
The game loop stored procedure takes less than an interval.
source
share