# Mugen (game engine)

Mugen (stylized as M.U.G.E.N) is a freeware 2D fighting game engine designed by Elecbyte. Content is created by the community, and thousands of fighters, both original and from popular fiction, have been created. It is written in C and originally used the Allegro library. The latest versions of the engine use the SDL library. The engine takes its name from the Japanese word 無限 (lit. 'limitless' or 'infinity').

## Gameplay

The engine uses four directional keys along with seven buttons for gameplay (A, B, C, X, Y, Z and Start), in order to accommodate six-button fighters which use three punches, three kicks and a start button which is often a taunt. However, characters do not necessarily use all seven buttons, nor need to follow a traditional six or four-button format. At most, two players can control characters, with others being controlled by the engine's AI (including Watch Mode, a demo mode where the computer controls all characters). AIs can be brutal, strong or even weak. The default AI for the engine however, can walk around and jump, and rarely attacks or guards the player's attacks when the AI Level is set to Hard. In addition, several gameplay modes are available via the main menu.
The first gameplay mode is the Arcade mode, where a player controlled character encounters CPU controlled characters in a random or set order which can be entirely customized. There are also three different kinds of Team modes: Single, Simul, and Turns. A fourth mode, Tag, is listed in the .exe along with two related script controllers, but was never used. In Team mode, either side can use any of the team modes. Single is identical to not having a team, Simul gives that side a computer-controlled partner who fights simultaneously, and Turns uses a different character for each round of play, varying through a set number (usually from 2 to 4) of different characters in a row. If set, the characters' starting life will be adjusted according to the number of players on each side. If one side has two characters and the other has only one in one of the Team modes, the two characters that are on the same side will each have half their respective normal maximum life values. Early versions of the engine could have this feature adjusted or disabled via the options screen or the config file. Team Co-op is similar to Simul, except that both human players fight on the same side and at the same time.
In Survival mode, there is an endless stream of opponents, fighting either one by one or two in a Simul match. The objective is to beat as many opponents as possible, with the game ending when the player's character or team is defeated, depending on the number of combatants that the player encounters in that custom version of the game. The player can choose to play alone or in Simul or Turns mode, though Single Player mode gives the highest life and life recovered at the end of each round won. Survival mode was the last addition done to the engine. As such, it is not present in any of the DOS versions of M.U.G.E.N.

## Development

M.U.G.E.N was initially created for MS-DOS by a group of students from the Electrical Engineering and Computer Science department of the University of Michigan, Ann Arbor, including Darren Lo, Jim Simpson, and Krian Upatkoon. The first public beta release launched on July 27, 1999. Development of the DOS version ceased when Elecbyte switched to the Linux platform in November 2001.
For a time, Elecbyte had posted a request for donations on their site to legally obtain a Windows compiler to make a Windows version of M.U.G.E.N. However, the development group discontinued the project in 2003 and shut down their site. Later speculation pointed at leaks made public of a private Windows-based M.U.G.E.N beta that was provided to a small quantity of donors; a later investigation in 2022 stated that the original developers originally created M.U.G.E.N as a college project and stopped development after the original developers graduated.

### WinM.U.G.E.N

The private WinM.U.G.E.N. beta contained a two-character roster limit, locked game modes and nag screens. With the beta leaked and Elecbyte gone, a "no limit" hack that removed most of these limitations was made available in 2004 followed by subsequent updates to deal with bugs and other issues. This version of M.U.G.E.N is functionally the same as the last Linux release, though with subtle differences and unique issues mostly revolving around proper music and music plugin support. Because of the changes between the DOS and Linux versions of M.U.G.E.N however, many older characters required at least the SFF files to be modified to show palettes correctly (notably on portraits) as well as some changes in how certain CNS script controllers functioned, causing some minor upset and those that could still run the DOS version in some form sticking to that, as well as DOS patches to downgrade characters to be compatible with the older version of the engine.
In May 2007, a hacked version of WinM.U.G.E.N was released by a third-party that added support for high resolution stages at the cost of losing support of standard resolution M.U.G.E.N. stages. Later that month, another hack added support for high-res select screens. In July 2007 another hack based on the last high-res hack allowed for only the select screen to be high-res and not the stages. In December 2007, a hack from an anonymous source allowed both low-res and hi-res stages to be functional in the same build. As of June 2007, an unofficial WinM.U.G.E.N was also made available on a Japanese website. In mid 2007, Elecbyte's site returned, though not without some controversy as to the legitimacy of it, as it only showed a single logo with Google ads on the side. On July 26 a FAQ was added to the site, which went on to claim that they would release a fixed version of WinM.U.G.E.N before major format changes in the next version, and noted the formatting changes would remove compatibility in regards to older works: "Do not expect old characters to work. At all".

### M.U.G.E.N 1.0 and subsequent versions

On September 19, 2009, Elecbyte made an unexpected comeback, updating their website with various features — including a forum and a downloads section, where a new build of M.U.G.E.N was available. In September 2009, a full release of M.U.G.E.N (M.U.G.E.N 1.0 Release Candidate) that includes various new features — most notably official support for HD resolutions, victory screens, and language localisation — was made available through the Elecbyte website. Although this build had various visual glitches and required a fair amount of adjustments to the previously made content in order to be fully compatible with the new engine, Elecbyte has stated that it is their goal to have the new M.U.G.E.N fully compatible with previously designed content. On January 18, 2011, Elecbyte released a 1.0 version only for Windows, ironing out most bugs that were featured in the release candidates. It was compatible with almost all, if not all, of the previously made content. After the 1.0 release, Elecbyte again ceased public activity for an extended time. In late April/early May 2013, a leaked copy of M.U.G.E.N 1.1 alpha 4 hit the Internet. This version added stage-zooming capabilities and some other features, although as expected with an alpha, it had numerous bugs. A post was made on the website on May 11, 2013, regarding the forums having problems before going back online by May 28.
In August 2013, M.U.G.E.N 1.1 beta 1 was released to the public, which fixes many of the bugs from the 1.1 alpha versions. Additional releases for 1.1 were planned and being worked on. These releases were planned to include significant engine changes that would remove certain character development constraints that existed due to limitations of the old code. On July 8, 2014, a fan-made port of Mugen 1.0 for Mac OS X was released by Mugenformac, built using the "Wineskin Winery" wrapper. It ran with few to no port-related issues. Version 1.1 beta 1 of the Mac port was then released on January 3, 2015.
Elecbyte's site has been offline since 2015 for unknown reasons, displaying a 403 message, except for pages pertaining to official documentation; Elecbyte's last activity was in 2016, promoting a crowdfunding campaign for Rotten Core, a commercial fighting game that was approved to use the engine (the engine's license typically prohibited commercial usage). An open-source reimplementation project called I.K.E.M.E.N began development in 2010, adding additional features such as online play. I.K.E.M.E.N Go, a remake of the I.K.E.M.E.N. engine written in Google's Go language, is designed to be compatible with assets from M.U.G.E.N and incorporates rollback netcode.

## Customization

Users who develop content for the game engine are commonly referred to as authors. These authors create customized content such as characters, stages and screen packs/skins. Often authors will port popular characters from 2D fighting engines such as the Street Fighter series, or from TV, book, and game series such as Teenage Mutant Ninja Turtles, The Simpsons, Family Guy, Pingu, Super Mario, Sonic the Hedgehog, Pokémon, Dragon Ball, Sailor Moon, Touhou, and others. Many authors will also create original content. Many websites exist to showcase and disperse the developed content and forms in what is often referred to as the "Mugen Community". Games that are built using the M.U.G.E.N engine often focus around a single franchise, such as Dragon Ball Z.
Due to the customizable nature of the game engine, no two versions of M.U.G.E.N are the same. Each person is encouraged to download their own copy of the game engine and to create or add content to match their personal preference. Groups of M.U.G.E.N authors will often collaborate to produce a full game using the engine. These full games are available at a variety of quality levels and are released under the general M.U.G.E.N license. "Under this license, permission is granted to use the M.U.G.E.N Environment free of charge for non-commercial purposes... Elecbyte provides a M.U.G.E.N redistributable package, containing a minimal M.U.G.E.N Environment, that may be included with third party content for redistribution."

## Reception

M.U.G.E.N later expanded into a wide variety of teams and communities such as Mugen Fighters Guild, Mugen Infantry, Infinity Mugen Team, RandomSelect, TheHiddenElect, Mugen Free For All, Unleaded Mugen, Mugen Archive, MugenBR, and Pao de Mugen, among many others. Community in-groups and out-groups formed, with websites often being categorized into factions of "creators" who made content for the engine as artists and programmers, and "warehousers" who sought instead to redistribute others' content for the sake of archival and fair use. M.U.G.E.N also gained more mainstream press with the creation of the Twitch live stream called Salty's Dream Cast Casino (SaltyBet), where viewers can bet with fake money on CPU matches played using the engine.
With the dual status as a development tool and as a game itself, M.U.G.E.N has often been reviewed in periodicals and magazines, usually exhibiting a large variety of works from various authors. GamesRadar named M.U.G.E.N as one of the "12 weirdest fighting games ever". In April 2017, Geek.com selected M.U.G.E.N as the "Game of the Year for 2017".