Monday 31 October 2016

From Survival to Creative - Five Years in Making

Earlier today I came across something that really captivated me for a moment. It was a gallery of a huge build that according to the title took 5 years to build. The link to the gallery was originally published on reddit, but has quickly gained quite a lot of popularity in only one day, over 300 thousand views and 14 thousand points. Let's take a look at what could have possibly made the imgur community push a Minecraft creation to go viral.

A 2D top-down view of the map.

The creator tells us a short story of how he started and what motivated him. Before he started the build he was playing exclusively in survival mode, but deep inside always knew that great things await him and that he was destined for something more then just trying to survive one more night in just another randomly generated world. One day he decided to take a break from survival and started building a simple castle with some tunnels underneath. After a couple of months of effort a great tragedy took place, his computer crashed during an electrical storm followed by a save file corruption. Like anyone else in his situation, he stepped back and allowed himself some rest from Minecraft. However that did not stop his restless hearth from searching to create something great, something cool. One morning he awoke with a clear vision of what he had to do. Five years later, we get a glimpse of his dream, in form of a few screenshots that certainly don't do this build justice.

The city, viewed from sky.

The build is a huge city that sprawls around a carefully designed castle. The design of the castle took inspiration from Gothic architecture and the Lord of The Rings fantasy franchise, as did the rest of the city. The city itself is divided into three sections: the fortress, the residential wing and the royal township. Each section or wing was designed with complexity and elegance in mind:

This slice of the central castle gives an idea of the level of internal complexity. This kind of detail is pretty consistent throughout the build. One of the things I really wanted to achieve was a depth to everything, such that you only ever saw the tip of the iceberg in terms of what was there. Almost every structure is somehow connected underneath with subterranean passageways, if you're lucky enough to be able to find your way there.

Notice that there is no direct pattern to how elements are designed and placed.

Another interesting feature here is the underground section of the city built underneath the caste that would appear to contain a sea of lava, and we all know you can't go wrong with lava. Not only does this creation look massive and detailed on the 'outside', but there seems to be more 'inside', or to be more precise - underground. This section is riddled with caves, passageways and structures that, in author's words: "eventually become lost in Minecraft's natural caves and abandoned shafts".

The city is literally swimming in lava, I love it!

Special attention has been placed on the 'look and feel' of things. This is unfortunately not the case with many generic builds the community stencils out these days. What matter to most, is how big, impressive or cool something is. Even though these things indeed are important to a certain degree, what is inevitably lost in the process is that spark of originality, the touch of finesse coming directly from the artists heart.

The author explains his artistic direction:
Because of my roots playing Survival, I wanted the whole thing to feel like Minecraft, as if you could be exploring the biomes and the structure just appears above the trees as you walk along. I love the way the game has its own natural environment, so I wanted that to wrap around the things I built as if it was just the algorithm regenerating around it. I'm not sure if I captured that or not, but that was the aim.

The castle blends nicely with the environment around it.

On top of everything, this map contains a custom resource pack specifically created by the author to fit the needs and wishes of his creation. With the combined power of image editing and creativity, mossy stones became columns, paintings became steely castle decorations, cakes became boxes of provisions and vanilla glass became cool. The fact that textures are as important as shapes has been proven over and over again, what is the point in building some- thing awesome if it looks like a pile of rotting manure. Minecraft textures are not very impressive in my opinion, but they do tend to be adequate enough to give you the general idea of Minecraft's artistic direction. After that it's up to you choose the right resource pack for you and paint the world as you see fit.

Now, I know what you're thinking: where do I download this thing? Unfortunately the map is not available for download yet. This could change in the future though, as the author has received many requests to make the map public. It's very likely that he's just overwhelmed with the amount of positive responses he received in just one day, that he's probably just taking the time to come to his senses. Along with many in the comment section of the gallery, I too would like to throw an epic survival session on a multiplayer server with fellow 'soarvivors', but for now all we can do is hope. And of course leave a positive comment on the original imgur post, letting the author know how awesome he is. Be sure to mention that you're counting on him to publish that map.

Hope you've enjoyed reading this article, make sure to leave a comment and share if you did. Until next time, keep on rocking those builds and have fun playing Minecraft!

Thursday 6 October 2016

Learning to GitHub: For Minecraft Modders

If you've been following the Minecraft modding community for some time you should have noticed that when some developers release their mods, alongside the download link to the release build; they also publish a link to an open-source repository for their mod. A large majority of these link will lead you to a website called GitHub, and at this point most of you with no prior experience in these matters will just rush the back button in your browser, thinking this might be too technical for you. Well it really isn't all that difficult to understand or even do, and with a bit of patience and an open mind, you too can learn how to GitHub. Let's get started whenever you're ready.

Before we talk about what GitHub can do for you, it's advantages and disadvantages and why you should use it when developing Minecraft mods, we first need to ask the question - what is GitHub? In order to answer this question we will take a look at the word "GitHub" and break it apart.

Note
If at any time you get confused, jump down to the section called "List of terms used on GitHub" to help you get a better starting grasp on what's being discussed.

Table of Contents


About Git and Version Control


The first word is Git. In a nutshell Git is a version control system that is used for software development. Your following question might be - what exactly is version control? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. This means that every revision (change) your project has ever undergone will be recorded and ready to be used at any moment. Information about these revisions as well as the ability to revert your project to an earlier state of development is available to you.

Git stores your project in something called a repository, which in this instance is just a large storage of information. Most operations in Git only need local files and resources to operate – generally no information is needed from another computer on your network. This means that after you've set up your repository, you do not need to be connected to the internet to browse project history or make changes. In most cases you will want your repository hosted online. This is where a repository hosting service such as GitHub comes in. Hosting your repository online will make it available for other people to interact with. Other developers can clone or fork your repo, essentially making copies they themselves can work on.

In addition to making collaboration easier it also helps you back up your project as it is now stored on a server, so if you for some reason suffer an accidental systems crash that causes you to lose parts (if not all) of your project, you can feel better knowing that a copy of your project is safe and sound online. It works the other way around as well. Because Git is a"distributed" or "decentralized" version control system, every repository clone is really a full backup of all the data. Thus if any server dies, and these systems were collaborating via it, any of the client repositories can be copied back up to the server to restore it. You can read more about version control here.

To understand Git, it's important to understand how it handles data. Once you've made some changes to your project you want to save them. To do that in Git, you need to commit them. Committing is the process of adding your changes to the history of your repository and assigning a commit name to it. Before you make a commit you have to choose which changes you want to include in it. Ideally each commit should reflect an accomplished task, so you should choose to include only those changes that are relevant to that task, followed by a fitting description. The way I understand it, every commit is a pointer to a snapshot which is a read-only copy of the data set frozen at a point in time. Each snapshot is a locked point in time we can observe or choose to return to. This section of the Git documentation explains it in more detail. You will see how Git uses the benefits of snapshots in the following section.

Another powerful feature of Git is called branching - a process of diverging from the main line of development and continuing to do work without messing with that main line of development. You can visualise this concept as a flowing river (main branch) that splits into smaller rivers without changing it's direction or intensity. These new smaller rivers now contain all the contents of the water before branching as well as new elements inherited from their own beds. The main purpose of branching is code isolation that aims to isolate a development effort such as a bug fix, new feature or something else. They are also useful for staging branches (preparations for new project releases) and private branches (small tasks and work in progress code). Read more about branches here. If you want to know when to use them, read this.

What exactly is GitHub?


In addition to what I've mentioned earlier about GitHub being a web-based Git repository hosting service, it's essentially a code sharing and publishing service, as well as a social networking site for programmers. It includes collaboration features such as bug tracking, feature requests, task management, and wikis for every project. GitHub is mostly used for code but can be used for any other project type that can benefit from revision control and online collaboration.

One of the most interesting features of GitHub is forking. If you want to contribute to an existing project to which you don’t have write access (unable to push commits directly), you can “fork” the project. What this means is that GitHub will make a copy of the project that is entirely yours; it lives in your user’s namespace, and you can push to it. There are two reasons you might decide to fork a project: you want to contribute to the original project, but lack the write privileges to do so, or you wish to develop the project in your own vision. Once you've forked the project you can start making changes to it. If the reason you forked the project is collaboration then you will at some point in time want to tell others about the changes you've made, and possibly even see your changes accepted and merged with the original project. We can do this with a feature called pull request. Read more about them here.

As mentioned above, GitHub is a social networking site as much as it is a repository hosting service. It's a social network that has completely changed the way we work. Having started as a developer’s collaborative platform, GitHub is now the largest online storage space of collaborative works that exists in the world. I will use the words of  How-To Geek to better explain the importance of this aspect:

The social networking aspect of GitHub is probably its most powerful feature, and is what allows projects to grow more than anything else. Each user on GitHub has their own profile, which can act like a resume of sorts, showing your past work and contributions to other projects via pull requests.

Project revisions are able to be discussed publicly, so a mass of experts can contribute knowledge and collaborate to advance a project forward. Before the advent of GitHub, developers interested in contributing to a project would usually need to find some means of contacting the authors, probably by email, and then have to convince them that their contribution is legit and they can be trusted.

It's important to note that you are in no way forced to use GitHub if you want to collaborate on a project over the internet using version control system. You are free to choose other services, the most prominent being BitBucket that allows unlimited public and private repositories, a service that GitHub unfortunately does not provide. The most important reason why you should choose GitHub for hosting your open-source Minecraft mod project is the ability to easily network with other Minecraft mod developers. There is also the full compatibility with Git and numerous other reasons, but the former one remains most important.

List of terms used on GitHub


Here is a quick list of words you will frequently see on GitHub,  followed by an explanation. This list was taken from a great user-friendly tutorial I found online called GitHub For Beginners: Don't Get Scared, Get Started.

Command Line: The computer program we use to input Git commands. On a Mac, it’s called Terminal. On a PC, it’s a non-native program that you download when you download Git for the first time (we’ll do that in the next section). In both cases, you type text-based commands, known as prompts, into the screen, instead of using a mouse.

Repository: A directory or storage space where your projects can live. Sometimes GitHub users shorten this to “repo.” It can be local to a folder on your computer, or it can be a storage space on GitHub or another online host. You can keep code files, text files, image files, you name it, inside a repository.

Version Control: Basically, the purpose Git was designed to serve. When you have a Microsoft Word file, you either overwrite every saved file with a new save, or you save multiple versions. With Git, you don’t have to. It keeps “snapshots” of every point in time in the project’s history, so you can never lose or overwrite it.

Commit: This is the command that gives Git its power. When you commit, you are taking a “snapshot” of your repository at that point in time, giving you a checkpoint to which you can re-evaluate or restore your project to any previous state.

Branch: How do multiple people work on a project at the same time without Git getting them confused? Usually, they “branch off” of the main project with their own versions full of changes they themselves have made. After they’re done, it’s time to “merge” that branch back with the “master,” the main directory of the project.

Use this list as simplified references to what these terms mean. They are not meant to complement your lack of knowledge or understanding, but help ease your learning curve.

Setting up Git


Now that you are introduced to the basics of what's what, it's time to actually set things up. GitHub has a very simple article on how to do this here. I will try to condense and focus what is written there to the best of my abilities. I will also assume that you have no prior experience with Git and currently feel a bit uncomfortable using the command line, so we will use GitHub's official desktop client

You should download and install the client now (note that the client will automatically install Git and keep it up-to-date for you, so no need to worry about that). After the client is installed we will proceed with setting it up. If you still do not have a GitHub account, you should head to GitHub's website and create a free account, you will need that to authenticate. The process is very straightforward; we only need to register our name and email so we get proper credits for our commits, and authenticate our client to GitHub so we are not asked for our username and password every time we try to push or pull our changes. 

Open your client, find and click the cog symbol in the upper-right corner of the app. Choose "Options" From the available context options that have appeared. Enter your name and email under Configure git.

Configuring Git from the GitHub Desktop client

Note
it doesn't matter if the name is your real name, your nickname or something else, Git only wants to know who to credit for the commits pushed from this client

Next up, we should authenticate to GitHub. In the client options find Accounts and choose Add account. Now simply enter your GitHub username and password in the appropriate fields. Don't worry, your information should be safe, unless the information is somehow sniffed out by a world class hacker, in that case you're screwed.

Authenticating to GitHub from the GitHub Desktop client.

Celebrate


Congratulations, you've successfully set up Git and GitHub! You should take a moment to pat yourself on the back and take a few minutes to relax. What's up next? That's entirely up to you. If you already have a mod project you're working on, you should create a new repo, clone it and dump your mod files there. If you are interested in contributing to other mods WIP mods out there, take a look at this list on MinecraftForum. Once you've found an open source mod in development you like that has a repository on GitHub, fork the repo and start contributing. And last but not least, if you have no idea what to do, I suggest reading a tutorial I wrote about Getting Started With Minecraft Modding.

Thank you for taking the time to read this. I hope it helps you out on becoming the best modder you can be. If you have the time, be sure to leave a comment and say a few words. As always, don't feel shy to share this article with people you think might benefit from it, and keep in mind that more articles are on their way. In the meantime, happy modding everyone!