Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can games be considered real-time systems?

I've been reading up on real-time systems and how they work etc. I was looking at the wikipedia article as well that said a game of Chess with a timer per move can be considered a real-time system because the program MUST compute a move in that time. What about other games? As we know, games generally try and run at 25+ FPS, could it be considered a soft real-time system since if it falls under 25 (I'm using 25 as a pre-defined threshold btw) it's not the end of the world, just a hit to the performance that we wanted?

Also - games have events they must handle as well. The user uses the keyboard/mouse and the system must answer those events accordingly within (again) a pre-defined time, before the game is considered to have "failed".

Oh, and I'm talking single-player for now to keep things simple.

It sounds like games fit the soft real-time system criteria, but I'd like to know if I'm missing anything... thanks.

like image 912
Harry Avatar asked Apr 26 '10 18:04

Harry


1 Answers

From Wikipedia,

A system is said to be real-time if the total correctness of an operation depends not only upon its logical correctness, but also upon the time in which it is performed. The classical conception is that in a hard real-time or immediate real-time system, the completion of an operation after its deadline is considered useless - ultimately, this may cause a critical failure of the complete system. A soft real-time system on the other hand will tolerate such lateness, and may respond with decreased service quality (e.g., omitting frames while displaying a video).

Thus, I'd say that these FPS games are definitely examples of soft real-time systems. It's ok if some frames are dropped. That said, Wikipedia also points out that a chess engine which fails to give a move in the timeframe allocated is considered a critical failure, and hence, it's a hard real time system.

Another thought is about AI in FPS-es. One could probably consider the AI as a "failed system" if it doesn't manage to return results in enough time and consequently ends up freezing.

like image 90
Jean Azzopardi Avatar answered Oct 14 '22 17:10

Jean Azzopardi