搜尋此網誌

Glossary script

Computer simulation


                       Computer simulation
Notion and terminologies
category: game systems

Forewords

The development of F.LittleFighter has led to the design of increasingly complex systems. The theoretic justification and implication of subsystems must be well understood in order to build a reliable game system. This article attempts to provide a concrete mental model to align people’s understanding on what game systems are. This article is not yet finalized.

Game systems

This term is hardly academic and the use of this word traditionally refers to a game console as a whole, including the hardware and software. However, the use of the term “game system” in our discussions is on a much higher level than software or hardware. It refers to the design of systems that power a computer game. It is similar to the term “game engine” but restricts to the aspect of simulation. It could be better thought as “operating system for computer games”.

Foundation: computer simulation

Most computer games are computer simulations, with the exception of Q&A games or dialog selection story games. The notion of game systems is built upon the notion of computer simulation and theories in computer simulation can often be applied to computer games.

System

In a computer simulation the system is referred to the computer program that runs the simulation. At the start of a simulation, an initial set of values must be defined. An input signal is supplied to the system to affect the course of simulation. Some systems have no stimulation and is often called autonomous. In this context input and stimulus can be used interchangeably.

State

During the course of simulation some (not all) important variables are generated, and are called state properties. The collection of all properties at any time instant is a state.

Determinism

A state is important in the sense that knowing the current state and the input at the current instant and the simulation logic allows us to completely determine the next state. If this is true then the system is said to be deterministic.

Observable

Not all properties in a state is perceivable by human or other interested parties. In particular, instantaneous speed is not perceivable, and human perceive speed by observing movement over a time interval. The collection of properties that can entertain some interested parties is called observable. Some observable properties may be derived from state properties.

Outcome

A simulation has an outcome. Sometimes the outcome is the most important (42), but sometimes it may not be.

Modelling

A simulation aims to model the physical reality. In computer games, most of the time we do not care the accuracy, and much of the time the inaccuracy is what we enjoy.

Applications

The theory in computer simulation can be used to analyse features in computer games.

Repeatability

In a computer simulation, determinism can be judged by whether repeating with the same input produces the exact same output. If the outputs are different across multiple trials, it means there are some properties not captured by the state of the system. In this case, the system is said to be not deterministic.

Synchronization (multiplayer)

A computer game has to be deterministic in order to exactly reconstruct game states on multiple computers. It can be done by distributing identical copies of input, simulation program and initial state.

Reversibility

Ever thought of pausing a game, step backward (undo) a few frames, and perform the appropriate special move, executing a perfect KO? Sadly no computer games (except turn based) implement this feature. Anyway, this can be done by recording the game states.
Theoretically, reverse execution of computer programs is cumbersome if not impossible. No one does reversible simulation on the system level.

Record and playback

Many AAA titles did implement this feature. They allow you to playback a game, rewind and seek and observe at any angle. This is done through recording the observable states.
In theory, recording can also be done on system states or stimulus. In fact, stimulus is often much smaller than observable states in terms of file size. The problem is, the program itself is also part of the record theoretically. If the program never changes then we can store only the stimulus safely. However the slightest change in source code can possibly lead to drastically different outcomes in redoing simulation on the same input.

0 comments:

Post a Comment