DEV Community

Cover image for Basic Explanation of Terraria
Peyton Strahan
Peyton Strahan

Posted on

Basic Explanation of Terraria

Intro (What is Terraria?)

Terraria is a 2D indie video game released on May 16, 2011, that utilizes a pixelated art style and fits into the action-adventure and sandbox genres. Terraria was developed by Re-Logic, with the game's publisher being 505 Games. The game has sold millions of copies and can be played both in single player and multi-player. You can build nice structures and contraptions, go on expeditions and mining trips in the open world, go fishing, fight enemies, craft crazy items to increase your strength, fight a list of increasingly stronger bosses, and even just play golf if you feel like it (among many other activities). Let's get into it, shall we?

A Little Technical Background

While the Internet seems to give varying answers, The answer I see most often is that Terraria was written in C# using XNA Game Studio. C# is a Microsoft-made object-oriented programming language made in 2000 and is still used today. XNA Game Studio is also a product of Microsoft and was an old integrated development environment (can also be described as a toolkit) that stopped getting support in 2014. XNA Game Studio is an abandoned software that was meant to help build games on things like the Xbox 360 and the Windows OS, and I, while a little uncertain, am doubtful that Re-Logic even still uses the software after using it to create the earlier versions of the game and its custom engine. Nonetheless, Terraria is unique in that everything was apparently hard coded and put into a single compiled EXE file, which is possibly due to the fact that Terraria was just a passion project that was never intended to get the amount of popularity that it did, though this structure can help with having better control over the code in order to make the code more efficient. Ok, so Terraria was hard coded in C#, but what even is Terraria?

It's Just 2D Minecraft! (Not Really)

Calling Terraria a 2D version of Minecraft is basically an inside joke in the Minecraft and Terraria communities at this point, but it does have some merit to it when it comes to helping people understand what you can do in Terraria (as Minecraft is much more well known than Terraria). Both Minecraft and Terraria involve fantasy enemies, destructible terrain in an open world, random world generation, allowing creativity with no real set goals (other than of course random game achievements as-well-as defeating the final boss and watching the credits roll if you feel like it), the ability to build structures, the ability to craft new items, an underworld area, exploration of the world, having a really good modding scene, and many other similarities. So, if you know what Minecraft is, you can imagine a 2D version of Minecraft and get a vague idea of what Terraria is. Despite this, the two games can feel a good bit different to play according to a few sources. Minecraft can feel like it focuses more on survival, building, and exploration while Terraria can feel like it focuses on becoming more powerful in order to slay the next boss (kind of like an RPG). I think enough comparisons have been made; it's time to actually talk about Terraria in detail.

Starting the Game

First you creat a character. You can customize gender, and the styles and colors of hair, eyes, skin, and clothing. Characters can be in classic (drop some money on death), mediumcore (drop all items on death), hardcore (permanent death), or journey mode (a creative-like mode where you have cheats and can make infinite copies of something after discovering enough of it). After creating your character, you can create and name a new world. The world is a massive 2D grid that will contain everything you see and do in Terraria. Created worlds can either be randomly generated and produce a seed or can have a predetermined generation created from an inputted seed. Seeds follow the format of ..., with each part being replaced with a number. Size determines how big the world will be and ranges from 1 (small) to 2 (medium) to 3 (large), with a world being able to contain up to 20,160,000 individual tiles with the largest world setting (8,400 x 2,400). Difficulty options include 1 for classic mode (default experience), 2 for expert mode (harder but has special boss rewards), 3 for master mode (hardest but has boss trophies), and 4 for journey mode (allows use of journey mode characters). The world's evil biome determines whether the world will have 1, the corruption biome, or 2, the crimson biome. The identifier is the actual seed part of the seed and is several digits long. Secret seeds also exist that instead of creating a preset world, randomly generate a new world using fun effects. Speaking of "generate", how does that work?

World Generation

When a world is being created, it does so using steps that insert 2D blocks (tiles) into the world that sometimes use noise algorithms that make the terrain look more natural, with each step placing blocks that potentially override some blocks from the previous steps. It starts with filling the world with stone along with dirt and sand on top of said stone. It then goes throughout the world carving out caves and caverns while filling them with water or lava every now and then. It then begins to create the biomes, starting with things like the ice biome granite biomes and ending with things like the world's evil biome and the underworld. Grass and other vegetation will be added to the world at multiple points in the generation process whenever it is needed (one example is adding vegetation to the jungle right after creating the jungle biome). After biome and cave generation is dealt with, tons of little additions and modifications are made including settling liquids, adding chests, adding structures (including abandoned underground shacks/houses along with things like the dungeon and the jungle temple), adding moss to some cave walls, and many other things. There is a showcase video of a mod that lets you see Terraria world generation in real time that I was made aware of thanks to Steven's answer to a Game Development forum post that I had found (Thank you random person named Steven, I hope you are doing well). While Terraria is a sandbox game, there is one main goal that can be achieved in order to beat the game.

Progressing

Terraria has a large number of bosses (and hoard events) to defeat and places emphasis on fighting them to progress, with each one acting as a sort of milestone to reach before beating the final boss (the Moon Lord) and triggering the ending credits to the game, therefor "beating the game". The gameplay loop usually consists of grinding in some way to make your character a bit stronger, defeating a boss, and then using the items you get from the boss and the new things unlocked from defeating said boss to grind a bit more before going on to defeat the next boss. Grinding may involve slaying certain enemies for a rare drop, gathering or mining materials to craft useful items, creating a boss arena to give yourself buffs from special placed objects and/or to simply make it easier to move around and dodge attacks, or any action that is done with the intent to prepare or make your character stronger before the next boss fight. Sometimes the game shakes things up a little by throwing in a hoard event instead of a boss, where you fight off and eliminate a certain number of a hoard of enemies (which usually follow a certain theme depending on the current hoard event) in order to beat the event and/or simply get the loot dropped by the enemies. Whatever you are doing to progress, it is usually some tasks to make it easier for you to take down the next powerful enemy on your list.

Intricate Game Mechanics

Terraria is a sandbox game, so there are plenty of things to do and witness, with each thing having small intricacies that make them both surprisingly complicated and interesting. For example, you have an inventory with 50 slots any and every kind of item (with the top 10 making up the hotbar), 4 slots for just coins (which are used as currency with vendors), 4 slots for just ammo, and a trash slot for deleting unwanted items. Most items stack up 9999 (the max used to be 999), but anything that is not a material or placeable item (weapons, armor, accessories, tools, etc.) cannot be stacked (with exceptions to things like the bananarang and light disc weapons). You can mark items in the inventory as "junk" or "favorited" (with favorited items being unable to be thrown away). In the inventory you can also craft items, change certain view displays, choose a team color (for PVP multiplayer purposes), view your armor stat, and view NPC housing. The inventory also allows you to equip armor, dyes, pets, grappling hooks, accessories, vanity cloths and accessories, and minecarts. While the inventory ended up being more complicated than I thought it was after trying to fully explain it (and probably missing some things as well), there are some mechanics where the little details are more interesting.

While still on the concept of game mechanics, one that is interesting to talk about is biome spread. Biome spread occurs when the blocks that compose a biome spread to or "infect" the blocks around it, effectively expanding the size of the infecting biome. The three biomes capable of biome spreading include the corruption, crimson, and hallow. A block can become infected if it is within 3 tiles of an infected block and the infected block triggers a successful block infection through a block update (which is part of something called a "tile update cycle" and happens to each block every 140 seconds on the surface or every 830 seconds below the surface, with these timers being staggered for each block). The speed of biome spread can be affected by various sources. Defeating the Wall of Flesh boss increases the rate at which biome spread occurs while defeating the Plantera boss reduces it. Placing sunflowers can cut off a biome from spreading via. grass.

Let's do a third one, because why not? Terraria has four different liquids with liquid physics. These liquids are water, lava, honey, and shimmer. With liquids come liquid physics. Liquids are interesting in that they can fill up a fraction of a tile (or a full tile) and can either be "flowing" or "settled". Flowing liquid is any liquid that is currently moving in between tiles while settled liquid is any liquid that has stopped moving. Going through a liquid will slow the player down (expecially so with honey) and gives the player moon-like gravity while submerged. Liquids always spread outwards when a block is underneath it (and none are at the liquid's sides) and go down into any available openings/holes beneath the liquid when said opening is found. If there is nowhere else for a liquid to flow, it changes from its flowing state to its settled state until a new empty space is made for the liquid to fill via flowing into it. Ok, that was a bunch of semi-technical speak, let's talk about mods now.

The Community and Mods

Terraria has mod support through a separate application called tModLoader, which allows you to install mods for the game. tModLoader allows you to search and install mods made by the community in order to add content to and/or to change aspects of Terraria, with the most popular mod hands-down being Calamity. Calamity has been made over the course of several years and has its own lore, gameplay changes, 27 brand new boss fights, 5 new biomes, a bunch of new items, beautiful art style, and killer 53-song-long soundtrack mostly made by DM DOKURU (with Heart Plus Up!, SixteenInMono, CDMusic, RoverdriveX, and PinpinNeon being the other composers who helped make the soundtrack). As you can see, some mods made for Terraria have a lot of love, care, and effort put into them, greatly expanding the lifespan of Terraria as a game.

Conclusion

Terraria is a 2011 passion project turned successful game made by Re-Logic. Its 2D pixelated style and music composed by mainly Scott Lloyd Shelly are instantly recognized by the millions of individuals around the world who have played the game. Terraria is a sandbox game with many intricate game mechanics, and they add so much to do in the game other than the main goal of defeating the Moon Lord.

Links to Sources Used

Links to Images Used

Top comments (0)