Avalon (Japanese: アヴァロン, Hepburn: Avaron), also known as Gate to Avalon, is a 2001 Polish-language science fiction drama film directed by Mamoru Oshii and written by Kazunori Itō. An international co-production of Japan and Poland, the film stars Małgorzata Foremniak as Ash, a player in an illegal virtual reality video game whose sense of reality is challenged as she attempts to unravel the true nature and purpose of the game. 
 Avalon was filmed in Wrocław, Nowa Huta, the Modlin Fortress and Warsaw. The 2009 film Assault Girls that was written and directed by Oshii, is a stand-alone sequel set in the same fictional universe as Avalon.
 In a near future, many people are addicted to Avalon, a military-themed virtual reality shooter. In the game, solo players or parties raid levels populated with AI-controlled enemies and opposing players. Winners are rewarded with experience points and in-game money, which can be exchanged for cash, allowing skilled players to make a living. As their brains interact with the game directly, Avalon places significant mental strains on players, and has rendered players catatonic in many cases.
 Ash is a famously skilled player, who only plays solo after her party Team Wizard was disbanded. After a Class A mission, the GM (Game Master) warns her of the next level's danger, and suggests she joins a party. The next day, Ash watches a Bishop-class character break her record time on the same mission. Intrigued, Ash tries but fails to learn about him or his avatar. As she leaves the game terminal, the Bishop player watches her.
 Ash runs into a former teammate, Stunner, who mentions Murphy, her former team leader. As the two visit Murphy at a hospital, Stunner tells her Murphy went after a hidden NPC in Avalon, a young girl nicknamed "ghost". The girl is allegedly the only gateway into the rumored Special A, an extremely rewarding but incredibly challenging mission where players cannot "reset" (a mechanic allowing players to abort mission without their avatars being killed). Players who went after "ghost" never wake up from the game and became "Unreturned". As Ash walks through the corridor, a girl looking similar to "ghost" watches her. Ash looks at Murphy, who has now become comatose.
 At home, Ash searches for words regarding Avalon, Unreturned, and the ghost. The search leads her to the "Nine Sisters", another Arthurian legend reference. Further researching and questioning the GM proves fruitless. Upon entering the game, Ash receives an invitation to a meeting, and is ambushed by a group of griefers, who lured her there to rob her equipment. After she overpowers a player, the group leader reveals that only the real Nine Sisters – Avalon's creators – know how to access Special A. They are interrupted by an attack helicopter which kills most of the players. Due to a lag, the helicopter's missiles teleport in front of Ash. She "resets" and leaves the game, narrowly avoiding losing her avatar. On the way home, Ash notices people around her are immobile, with the exception of a dog. At home, after she finishes preparing a meal for her dog, she realizes that it has disappeared. She hears the helicopter from the game flying pass.
 The next day, Stunner meets Ash. He tells her of a high-level Bishop player who can make the ghost appear, and is sought out by parties seeking to enter Special A. Before becoming an Unreturned, Murphy himself was a Bishop player. At her house, Ash is visited by the Bishop player. He offers to form a party with her and she accepts. Ash arrives at the game terminal and tells the receptionist that she plans to enter Special A to look for Murphy. She enters the game, despite warnings from the receptionist and the GM.
 In the game, Ash meets the Bishop player, whom she suspects is working for the Nine Sisters. Stunner arrives, revealing he has been helping Bishop recruit Ash all along. The party confronts the Citadel, an enormous boss. Stunner, Bishop and his summoned dummy players distract the giant, while Ash attacks its weak point. After the Citadel is destroyed, Stunner spots the ghost. He is then shot by an enemy. Before being forced out of the game, Stunner tells Ash of the only way to kill the ghost. Ash goes after the ghost and manages to kill it, turning it into a gateway. Ash steps into the gateway and disappears.
 Ash "wakes up" from the game booth, which is put in her apartment, wearing civilian clothing and without equipment. Bishop contacts her and tells her she is in Class Real. The only way to exit the game is to complete the objective: defeat the Unreturned staying here. Ash takes the provided gun and proceeds to her destination, an Avalon-themed concert by the Warsaw Philharmonic Orchestra. On the way, she is stunned by the vibrant and bustling world, which is in stark contrast to the previous levels and to the world outside the game. At the concert hall, Ash sees Murphy, and they walk outside to talk. As she confronts Murphy about his decision to stay in the game, he states he prefers the "reality" within Avalon. Ash mortally wounds Murphy, who urges her to stay, then disappears. Ash enters the now empty concert hall, and sees the ghost on the stage. Ash trains her gun on the ghost, who flashes a smile. The text "Welcome to Avalon" is blended in.
 Even though the film was produced and directed by a Japanese crew, it is a half European, half Asian work since Avalon was co-produced by a Polish film company, starred Polish actors and was filmed mostly in Warsaw and Modlin Fortress, Poland with Polish dialogue. A Japanese dub was created, however, for the film's original Japanese release and is available on the Japanese region 2 DVD.
 "Shooting it in Japan was impossible," Oshii advised interviewer Andrez Bergen in a major article that appeared in Japan's Daily Yomiuri newspaper in 2004. "I didn't think of using a Japanese cast. I considered shooting in the UK or Ireland, but the towns and scenery in Poland matched my image for the movie."
 According to Oshii, one of the advantages of shooting the film in Poland was that Polish Armed Forces were willing to lend their equipment (T-72 tanks and Mi-24 attack helicopters, among others) to the film makers without any additional fees.
 In Europe, Avalon was screened out of competition at the 2001 Cannes Film Festival and won awards at other European festivals: in Spain, it was awarded "Best Cinematography" at the Catalan International Film Festival (2001), and in the United Kingdom, it won the "Best Film" award at Sci-Fi-London (2002).
 However, the film received only limited release in North America (with most of its fanbase created via the circulation of bootleg DVDs imported from Asia) until Miramax released it on DVD in late 2003. The North American version has added narration to make it easier for the audience to understand the plot; although the option to view the film without the English overdubbing is provided, the subtitles still display the added dialogue. The British region-free DVD has literal English subtitles which explain the King Arthur connection better and does not display added dialogue.
 Such viewer help was not used in European countries, like France, where local editions only feature optional subtitles about the Polish sung opera piece, in the Polish spoken original version only.
 In an unspecified era there is a forbidden online virtual reality video game. Players fight with modern, medieval and fantasy weapons in a world marked by war. In-game earned credits can be exchanged in real life for currency. Sometimes, usually with higher level players, a player's spirit may stay inside the game, and the body stays vegetating in hospitals in the real world.
 Oshii describes his game as a "military RPG". However, it mixes elements of role-playing games (such as character classes and experience points) and first-person shooters (FPS) (utilizing real firearms such as semi-auto pistols (Walther PPK and Mauser C96), sniper rifle (Dragunov SVD) and rocket launcher (RPG-7)); and it also borrows from the Wizardry series Oshii played extensively during three years in which he was unemployed in the 1980s.
 With these two genres, it shares the common principle of player hierarchy. In Avalon, players are ranked after three levels, Class C, Class B, Class A. Elite Class A players are rumored to be able to play a hidden extra mode featuring different rules and named Class SA (for "Special A").
 To complete levels within the game, players must defeat powerful end-of-level bosses similar to those found in classic video games.
 Players wear headsets which immerse their senses in the game world. The design of the headset and chair installation are influenced by the cult French science fiction short film La jetée. The headless statues also appear in this 1962 film.
 As an interesting first, this film features the appearance of lag, a gameplay error due to network transfer slowdown often encountered in online games. Oshii displays lag as an ailment that causes physical convulsions in the player during these slowdowns.
 The scene with Ash in the tramway is a live action recreation of a similar scene appearing in the 1999 anime feature film Jin-Roh, which Oshii wrote but did not direct. This scene is based on Oshii's own teenage experience, when he used to spend entire days spinning in loop in the Yamanote Line.