Can games be considered real-time systems?

I read about real-time systems and how they work, etc. I also looked at the wikipedia article which said that playing chess with a timer per move can be considered a real-time system, because the program MUST calculate the move during this time. What about other games? As we know, games usually try and run at a frequency of 25+ FPS, can it be considered a soft real-time system, because if it falls below 25 (I use 25 as a predefined threshold btw), this is not the end of the world, just a hit on performance what do we want?

In addition, there are events in games that they must handle. The user uses the keyboard / mouse, and the system must respond to these events appropriately (again) a predetermined time before the game is considered “unsuccessful”.

Oh, and I'm talking about a single player now, to keep things simple.

It seems that the games meet soft system criteria in real time, but I would like to know if I am missing something ... thanks.

+7
architecture real-time soft-real-time
source share
9 answers

From Wikipedia ,

A system is called real if the complete correctness of the operation depends not only on its logical correctness, but also on the time of its execution. The classic concept is that in a rigid real-time or real-time system, the completion of an operation after its term is considered useless - ultimately this can lead to a critical failure of the entire system. On the other hand, a soft real-time system will suffer such a delay and may respond to a decrease in the quality of service (for example, in the absence of frames in the absence of video).

Thus, I would say that these FPS games are certainly examples of soft real-time systems. This is normal if some frames are dropped. However, Wikipedia also points out that a chess engine that cannot move in a dedicated timeframe is considered a critical failure and, therefore, is a tough real-time system.

Another thought about AI in FPS-es. It is likely that AI can be regarded as a “failed system” if it fails to return the results in sufficient time and, therefore, complete the freeze.

+15
source share

Yes, but with a lot of emphasis on soft in real time.

Being real-time is not very much of being fast - simply because getting the result “soon enough” is part of determining the right outcome.

+5
source share

You could call them like that, but I think that will stretch the definition of "real time." As understood by the industry, “real-time” usually implies that events will be serviced for the maximum time, when this time is usually milliseconds, sometimes even microseconds. For comparison, a chess program moves at glacial speeds (at least as far as interaction is concerned). None of the special programming constraints required to meet the tight real-time constraints apply to the programming of "slow" interactive games like this.

Interactive would be a good word. As far as video games are concerned, "FPS" has actually become a term used to classify such programs, which are characterized by a cycle that repeatedly updates the graphics and calculates the game mechanics.

+1
source share

Actually, I don’t think that games are really real-time systems. In fact, most of them are quite planned-invariant at times, especially at boot time.

When you sit and look at your loading bar, the system is tied to cache misses and is usually associated with I / O. And everyone considers this quite acceptable.

In fact, of course, you can view the game in real time. But if a game becomes attached to I / O due to loading a new texture on the fly, people again find this acceptable if this rarely happens. The same for turn-based games, when you were waiting for the computer to turn.

Things get even more messy when you think of multiplayer games. Especially MMOs that run "in the past" to mask latency issues. Everything that it does disguises itself as a non-real-time game really.

edit: my real-time system definition is a system that uses every processor cycle for meaningful work. If the system is planned due to I / O binding, for example, this is not a real-time system.

0
source share

Prince of Persia, working on my x386, seemed to me in real time without noticeable delays. However, if the conditions were not ideal, the performance would certainly have deteriorated with visible delays, and, of course, the game had no performance guarantees for such cases.

For a real-time game, this is not just a game. He must take over the management of equipment, operating systems, available resources and determine the conditions under which these guarantees are valid. I do not think that there are any games that go to this site.

Although I would partially agree with the soft definition in real time. Do not think that SLA is published in any games with any performance, but make every effort to be in real time in most cases - this is in their interest. However, most game consoles are XBox, PS [x], Wii, etc. Highly optimized for real time and provide this. There may be very few cases where it falls on productivity, for example, when the room temperature approaches a boiling point, but this applies to most so-called real-time systems. For them, it is necessary to fulfill a certain set of conditions for optimal operation in real time, otherwise the situation will worsen.

0
source share

"Real time" is a fuzzy category. More precisely, talk about real-time systems on the scale of "hardness". Features that make a real-time system more difficult:

  • Limited latency (timing)
  • Limited jitter (i.e. changing response time)
  • The consequences of failure to meet deadlines and the ability of the system to "fail safety" if the deadlines are missed or the system does not fully work.
  • Brevity of terms. Real-time systems typically need to respond in less than a second, and most within 100 ms.

Therefore, while a game of chess technically meets the definition of "real time", in practice it is so soft that this term does not really apply. On the other hand, it will be avionics "fly by wire" in the fighter, where non-compliance with the requirements of the time can lead to the failure of the aircraft.

0
source share

I would describe games as hard real-time systems. Take the arrow - if you do not shoot at the enemy before he shoots at you, the ability to shoot at him is useless, and you will lose. You can make similar analogues for many other types of games. Any game in which a player plays it in real time can be described as follows.

Perhaps their implementation is not rigid in real time, but, of course, they are sure.

0
source share

While I think we like to believe that our systems are (soft) in real time, one thing that I'm not interested in is the aspect of fidelity of modeling in work.

In order for everything to be at 16.6 ms, we often do a lower fidelity job in places where, apparently, this does not change the result, but gives the result (as measured by “flashing images on the screen”,) which are subtly different from what they would be if we took fewer shortcuts. The obvious top-level labels are smoothing and depth of field, more subtle and less obvious to the observer changes in the “lo-fi” of the intellectuals of the enemies, if we have a lot of them on the screen. For example. some of the first games that I worked on we didn’t have time to update all the “world views”, so we cut off the enemies and we also alternated the player’s character with the enemies. So, if there were five enemies, it would take ten frames to update everyone (since the player was updated every other frame). This did not make the animation volatile or anything else, since we were still performing the correct animations, but the decision-making by the opponents would probably be based on old or otherwise invalid data now.

As it turned out, this had an interesting effect when the enemies did everything as if it took them some time to handle what was happening. For example. they will shoot the player even if he was dead, or they may take some time before they noticed that their compatriots were killed, causing their frightened state of flight some time after they decided to run if we were to run "full" sim every update.

So, are you doing low-coefficient calculations to fit into your time with an acceptable compromise for real-time nicknames?

0
source share

Wikipedia says (and this is what I was taught in college):

A system is called real if the complete correctness of the operation depends not only on its logical correctness, but also on the time of its execution. Real-time systems, as well as their deadlines, are classified due to the lack of a deadline.

In general, most games are soft in real time, because while the target frame rate (e.g. 30 frames per second) determines the deadline, accidental failure to complete this deadline does not make basic calculations useless. Failures reduce the usefulness of computing because they degrade the quality of the gameplay.

As you mentioned, the chess engine is an example of a real-time system. However, this is often a tough application in real time, since exceeding the time control leads to automatic losses, and the calculation result is useless.

0
source share

All Articles