Each game world has certain properties: the level, the score, players and enemies, position and speed of objects and characters, inventories and skills, maybe a countdown timer, and so on. These properties together are the game state.
Each game world also offers some actions: the player can decide to walk, jump, drive, fight, use equipment, take or drop items, change game options, and so on. There are also events that happen without user input: traps are reset, power-ups respawn, automatic doors open or close, and so on. We call these incidents game actions. Game actions are triggered either by the player (in response to input), or by NPCs and objects, as part of the main loop.
Let's zoom in on one day in the life of the average event-driven video game:
The player's input triggers a game action. For example, the user clicks to attack an enemy, the user presses the W, A, S, and D keys to walk, and so on.
The game action updates the game...