Worldbuilding is the process of constructing a world, originally an imaginary one, sometimes associated with a fictional universe.  Developing an imaginary setting with coherent qualities such as a history, geography, and ecology is a key task for many science fiction or fantasy writers.  Worldbuilding often involves the creation of geography, a backstory, flora, fauna, inhabitants, technology and often if writing speculative fiction, different races. This may include social customs as well as invented languages for the world.    : PT103
The world could encompass different planets spanning vast distances of space or be limited in scope to a single small village. : 104 World building exists in novels, tabletop role-playing games, and visual media such as films, video games and comics.      Prior to 1900 most worldbuilding was conducted by novelists, who could leave imagination of the fictional setting in part to the reader. : 106 Some authors of fiction set multiple works in the same world. This is known as a fictional universe.  For example, science fiction writer Jack Vance set a number of his novels in the Gaean Reach, a fictional region of space.  A fictional universe with works by multiple authors is known as a shared world. One example of such is the Star Wars Expanded Universe. 
The term "world-building" was first used in the Edinburgh Review in December 1820  and appeared in A.S. Eddington's Space Time and Gravitation: An Outline of the General Relativity Theory (1920) to describe the thinking out of hypothetical worlds with different physical laws. : 160 The term has been used in science fiction and fantasy criticism since appearing in R.A. Lupoff's Edgar Rice Burroughs: Master of Adventure (1965). : 270
The creation of literary fictional worlds was first examined by fantasy authors such as George MacDonald, J. R. R. Tolkien, Lord Dunsany, Dorothy L. Sayers, and C. S. Lewis.  Tolkien addressed the issue in his essay On Fairy Stories, where he stated that the "Secondary World" or "Sub-Creation" (the constructed world) is substantially different from the art of play-writing: "Very little about trees as trees can be got into a play."  Constructed worlds may sometimes shift away from storytelling, narrative, characters and figures, and may explore "trees as trees" or aspects of the world in-and-of-themselves. Tolkien sought to make his constructed world seem real by paying careful attention to framing his world with narrators and versions of stories, like a real mythology. 
Later analysis of fantasy worlds in the 1960s contextualized them in the medium or the narrative of the works, offering an analysis of the stories in the world, but not the world itself. Media franchises are similar to constructed worlds but do not necessarily rely on them; for example a media franchise such as Star Wars has a constructed world, while The Beatles, as a franchise, does not. In the 2000s, worldbuilding in film has increased in popularity. When before, writers sought to create a character that could sustain multiple stories, now they create a world that can sustain multiple characters and stories. [ page needed][ example needed]
Worldbuilding can be designed from the top down or the bottom up, or by a combination of these approaches. The official worldbuilding guidelines for Dungeons and Dragons refer to these terms as "outside-in" and "inside-out", respectively. [ page needed] In the top-down approach, the designer first creates a general overview of the world, determining broad characteristics such as the world's inhabitants, technology level, major geographic features, climate, and history. From there, they develop the rest of the world in increasing detail. This approach might involve creation of the world's basics, followed by levels such as continents, civilizations, nations, cities, and towns. A world constructed from the top down tends to be well-integrated, with individual components fitting together appropriately. It can, however, require considerable work before enough detail is completed for the setting to be useful, such as in the setting of a story.
With the bottom-up approach, the designer focuses on a small part of the world needed for their purposes. This location is given considerable detail, such as local geography, culture, social structure, government, politics, commerce, and history. Prominent local individuals may be described, including their relationships to each other. The surrounding areas are then described in a lower level of detail, with description growing more general with increasing distance from the initial location. The designer can subsequently enhance the description of other areas in the world. For example, an author may create fictional currencies and refer to fictional books to add detail to their world. Terry Pratchett says "You had to start wondering how the fresh water got in and the sewage got out... World building from the bottom up, to use a happy phrase, is more fruitful than world building from top-down." 
This approach provides for almost immediate applicability of the setting, with details pertinent to a certain story or situation. The approach can yield a world plagued with inconsistencies, however. By combining the top-down and bottom-up approaches, a designer can enjoy the benefits of both. This is very hard to accomplish, however, because the need to start from both sides creates twice as much work, which may delay the desired product.
Despite requiring considerable work to develop enough detail for a setting to be useful, not every aspect of a setting can be explored, and instead an approach called inferred worldbuilding is often used. Inferred worldbuilding is when the author provides enough detail about the various parts of a setting that readers can extrapolate on what is written to come to their own conclusions regarding specific details that weren't provided. This is especially useful for roleplaying game settings, as individual games may require certain details to be created on a case-by-case basis for the RPG's story to function.
From a game-design perspective, the goal of worldbuilding is to create the context for a story. Consistency is an important element, since the world provides a foundation for the action of a story.  However, J. R. R. Tolkien described the goal of worldbuilding as creating immersion, or "enchantment" as he put it, and descriptions of the world can be wholly disconnected from the story and narrative.  Writers must also make the world building make sense for the story on hands-on matters concerning plot devices such as what equipment, nourishment, and modes of transportation characters use. : PT110
An uninhabited world can be useful for certain purposes, especially in science fiction, but the majority of constructed worlds have one or more sentient species. These species can have constructed cultures and constructed languages. Designers in hard science fiction may design flora and fauna towards the end of the worldbuilding process, thus creating lifeforms with environmental adaptations to scientifically novel situations.
Perhaps the most basic consideration of worldbuilding is to what degree a fictional world will be based on real-world physics compared to magic.  While magic is a more common element of fantasy settings, science fiction worlds can contain magic or technological equivalents of it. For example, the Biotics in the science fiction video game series Mass Effect have abilities, described scientifically in-game, which mirror those of mages in fantasy games. In the science fiction novel Midnight at the Well of Souls, magic exists, but is explained scientifically.
Some fictional worlds modify the real-world laws of physics; faster-than-light travel is a common factor in much science fiction. Worldbuilding may combine physics and magic, such as in the Dark Tower series and the Star Wars franchise. One subgenre of science fiction, mundane science fiction, calls for writers to depict only scientifically plausible technology; as such, fictional faster-than-light travel is not depicted in these works.
Constructed worlds often have cosmologies, both in the scientific and metaphysical senses of the word. Design of science fiction worlds, especially those with spacefaring societies, usually entails creation of a star system and planets. If the designer wishes to apply real-life principles of astronomy, they may develop detailed astronomical measures for the orbit of the world, and to define the physical characteristics of the other bodies in the same system; this establishes chronological parameters, such as the length of a day and the durations of seasons.  Some systems are intentionally bizarre. For Larry Niven's novels The Integral Trees and The Smoke Ring, Niven designed a "freefall" environment, a gas torus ring of habitable pressure, temperature, and composition, around a neutron star.
Fantasy worlds can also involve unique cosmologies. In Dungeons and Dragons, the physical world is referred to as the Prime Material Plane, but other planes of existence devoted to moral or elemental concepts are available for play, such as the Spelljammer setting, which provides an entirely novel fantasy astrophysical system. Some fantasy worlds feature religions. The Elder Scrolls series, for example, contains a variety of religions practiced by its world's various races. The world of the 2000 video game Summoner has a well-developed cosmology, including a creation myth.
Construction of a fictional map is often one of the first tasks of worldbuilding. Maps can lay out a world's basic terrain features and significant civilizations present. A clear, concise map that displays the locations of key points in the story can be a helpful tool for developers and audiences alike. Finished creative products, such as books, may contain published versions of development maps; many editions of The Lord of the Rings, for example, include maps of Middle-earth. Cartography of fictional worlds is sometimes called geofiction. 
The physical geography of a fictional world is important in designing weather patterns and biomes such as deserts, wetlands, mountains, and forests. These physical features also affect the growth and interaction of the various societies, such as the establishment of trade routes and locations of important cities.  Desire for control of natural resources in a fictional world may lead to war among its people. Geography can also define ecosystems for each biome. Often, Earth-like ecology is assumed, but designers can vary drastically from this trend. For example, Isaac Asimov's short story " The Talking Stone" features a life form based on silicon, rather than carbon. 
Some software programs can create random terrain using fractal algorithms. Sophisticated programs can apply geologic effects such as tectonic plate movement and erosion; the resulting world can be rendered in great detail, providing a degree of realism to the result.
Constructed cultures, or concultures, are a typical element of worldbuilding. Worldbuilders sometimes employ past human civilizations as a model for fictional societies. The 1990 video game Worlds of Ultima: The Savage Empire, for example, takes place in a world full of tribes based on civilizations in early Mesoamerica and Africa. This method can make a fictional world more accessible for an audience. Simon Provencher has stated as a 'Golden Rule' of worldbuilding that "... unless specified otherwise, everything inside your world is assumed to behave exactly as it would in the real world."  Another example is Steven S. Long, a representative of the Champions role-playing game, who stated that "Everything that happened in the real world has also unfolded in the exact same way in the Champions Universe." This means any past wars, elections, and technological advancements in our world occurred the same way in the Champions Universe unless explained otherwise.
Creating a cohesive alien culture can be a distinct challenge. Some designers have also looked to human civilizations for inspiration in doing so, such as Star Trek's Romulans, whose society resembles that of ancient Rome. The fictional world's history can explain past and present relationships between different societies, which can introduce a story's action. A past war, for example, functions as a key plot point in the Shannara and Belgariad series.
Examples of constructed worlds include Terry Pratchett's Discworld, the pseudo-Earth Hyborian Age in the Conan series, the planet Arrakis in the Dune series, the continent of Tamriel in the Elder Scrolls series of games, Ursula K. Le Guin's Earthsea universe and Hainish worlds, the Subcontinent of Hayao Miyazaki's Nausicaä of the Valley of the Wind, and Arda, the location of J. R. R. Tolkien's Middle-earth, in The Lord of the Rings.
Constructed worlds are not always limited to one type of story. Lawrence Watt-Evans and Steven Brust created Ethshar and Dragaera, respectively, for role-playing games before using them as settings for novels. M. A. R. Barker originally designed Tékumel well before the advent of role-playing games, but many gamers, including Barker himself, have used it as a setting for such games.
A shared universe is a fictional universe that can be used by different authors. Examples of shared universes include the Star Wars expanded universe, the Arrowverse and campaign settings developed specifically for role-playing games. One of the oldest of these is Oerth, developed for the Dungeons and Dragons Greyhawk setting. Forgotten Realms is another such D&D setting, originally a homebrew campaign world by Ed Greenwood.
- Hamilton, John (2009). You Write It: Science Fiction. Edina, Minn.: ABDO. pp. 8–9. ISBN 978-1-61714-655-8. OCLC 767670861.
- Stableford, Brian M. (2004). Historical Dictionary of Science Fiction Literature. Lanham, Md.: Scarecrow Press. ISBN 0-8108-4938-0. OCLC 54416073.
- Hergenrader, Trent (2019). Collaborative Worldbuilding for Writers and Gamers. London, UK. ISBN 978-1-350-01666-8. OCLC 1009182095.
- Wolf, Mark J. P. (2020). World-builders on World-building: An Exploration of Subcreation. New York, NY. ISBN 978-0-429-24286-1. OCLC 1151513107.
- Lawrence, Kelly (2014). Building Your Story: A Guide to Structure and Plot. Ropley. ISBN 978-1-78279-607-7. OCLC 883432427.
- Wolf, Mark J. P. (2018). The Routledge Companion to Imaginary Worlds. New York. ISBN 978-1-317-26828-4. OCLC 1004848638.
- Gavins, Joanna; Lahey, Ernestine (2016). World Building: Discourse in the Mind. London. ISBN 978-1-4725-8655-1. OCLC 950613576.
- Wolf, Mark J. P. (2012). Building Imaginary Worlds: The Theory and History of Subcreation. Hoboken: Taylor and Francis. ISBN 978-1-136-22081-4. OCLC 851971993.
- Johnson, Derek (2013). Media Franchising: Creative License and Collaboration in the Culture Industries. New York: New York University Press. ISBN 978-0-8147-4349-2. OCLC 830164533.
- Letizia, Angelo (2020). Graphic Novels as Pedagogy in Social Studies: How to Draw Citizenship. Cham, Switzerland. ISBN 978-3-030-44252-1. OCLC 1153082894.
- Paterson, Eddie; Simpson-Williams, Timothy; Cordner, Will (2020). Once Upon a Pixel: Storytelling and Worldbuilding in Video Games. Boca Raton, FL. ISBN 978-1-351-01427-4. OCLC 1127387835.
- Brooker, Joseph (2020). Jonathan Lethem and the Galaxy of Writing. London. ISBN 978-1-350-00376-7. OCLC 1089274366.
- Prucher, Jeff (2007). Brave New Words: The Oxford Dictionary of Science Fiction. Oxford: Oxford University Press. ISBN 978-0-19-989140-5. OCLC 608415902.
- "World". Oxford English Dictionary (Online ed.). Oxford University Press. (Subscription or participating institution membership required.)
- Eddington, Arthur Stanley (2014). Space, Time, and Gravitation: An Outline of the General Relativity Theory. Wildside Press. ISBN 978-1-4344-0450-3. OCLC 905652391.
- Tolkien, J. R. R. (1983), Tolkien, Christopher (ed.), "On Fairy Stories", The Monsters and the Critics and Other Essays, pp. 109–161
- Letter #131 to Milton Waldman in Tolkien, J. R. R. (1981). Letters of J.R.R. Tolkien : a selection. Humphrey Carpenter, Christopher Tolkien. London: Allen & Unwin. ISBN 0-04-826005-3. OCLC 8628512.
- Cook, Monte; Tweet, Jonathan; Williams, Skip (2003). Dungeon Master's Guide. revised by David Noonan and Rich Redman. Wizards of the Coast. ISBN 0-7869-2889-1.
- Lenz, Millicent (2001). Alternative Worlds in Fantasy Fiction. London: Continuum. ISBN 0-8264-4936-0. OCLC 46649829.
- Laramee, Francois Dominic (2002). Game design perspectives. Charles River Media. ISBN 1-58450-090-5.
- Schult, Stefanie (2017). Subcreation: Fictional-World Construction from J.R.R. Tolkien to Terry Pratchett and Tad Williams. Berlin: Logos Verlag Berlin. ISBN 978-3-8325-9320-9. OCLC 1021810749.
- Anderson, Poul (1991). "The Creation of Imaginary Worlds". Writing Science Fiction and Fantasy. New York: St. Martin's Press. ISBN 0-312-06003-3.
- Erle, Schuyler (2005). Mapping Hacks: Tips & Tools for Electronic Cartography. Rich Gibson, Jo Walsh (1st ed.). Sebastopol, CA: O'Reilly Media. ISBN 0-596-00703-5. OCLC 60860826.
- Long, Steven S. (2002). Fantasy HERO ( Hero System Fifth ed.). San Francisco: DOJ. pp. 290–294. ISBN 1-58366-016-X.
- Clement, Hal (1991). "The Creation of Imaginary Beings". Writing Science Fiction and Fantasy. New York: St. Martin's Press. ISBN 0-312-06003-3.
- Provencher, Simon. "The Golden Rule of Worldbuilding". Worldbuilder. Simon Provencher. Retrieved 6 November 2013.