A programming language designed for game development.
- Introduction
- State Machines
- Input Handling
- Entity Component Model
- Systems
- Events
- Possible Future Features
GameLang is a high-level domain specific language designed specifically for creating games. The language does this by providing language-level support for a flexible and loosely-coupled architecture based on events, state machines, and entity-component systems. The language additionally provides a flexible system for handling user input and an interpolation/extrapolation fixed-timestep gameloop. The language may later provide ways of doing graphics, resource management, audio, dialog trees, UI, and other features, but these are not being considered at this time.
The language is currently expected to be transpiled to high level general purpose languages. Since GameLang is not general purpose and does not provide mechanisms to perform a variety of tasks that are common in games (such as high-performance graphics), transpiling it to a general purpose language allows the code generated with GameLang to be interfaced with in a relatively simple manner.
Design patterns are essentially a template for solving a problem that occurs in many different programs. The core philosophy of GameLang is that design patterns are consequences of shortcomings in the programming language's ability to solve the problems of a particular domain. For example, consider the Command design pattern from Design Patterns; it is essentially a second-class closure. Another example would be manually pushing parameters to the stack before calling a function in assembly, whereas in C the compiler handles those details for you. Language features can also replace domain-specific architectural design patterns, such as the Model-View-Controller pattern which has been solved in browsers by a combination of HTML, CSS, and JavaScript.