One example of an event-driven language is C++ with MFC. Here, there is no visible main() function or global variables; instead, a program consists of methods and fields in a so-called "document" class. The class's constructor connects window system events to methods that will be called on said events.

Program code in an event-driven language only executes when it receives an event. This means that your language must provide a periodic timer event for it to be useful in making games more useful than solitaire, minesweeper, or other similar board games; in particular, such a language without a timer event is not Tetris complete.