Screeps can be a difficult game to get started with. This tutorial will help you get your automated empire up and running.
There is an in-game tutorial available at https://screeps.com/a/#!/sim/tutorial. It will help you set up a basic codebase.
Setting Up Harvesters
Progression in Screeps relies on energy. Energy can be mined from the sources in your room, and it is necessary for creating creeps, building structures, and upgrading the room's controller. The code in the tutorial uses a single creep to harvest energy and bring it back to spawn; however, this is extremely inefficient in the long run. Instead, most players keep their harvesters at their sources and use other methods to transport the energy; this is called Static Harvesting.
When you first spawn into the live world, your room will be at room control level 1. You can't do much at this level, so your first priority is going to be to upgrade your controller. After spending 200 energy on it, you will move on to RCL 2.
RCL 2 brings extensions, which add energy capacity to your spawn. This allows you to build bigger and better creeps. The article on creep building strategies can help you build creeps effectively.
You can build up to five at this level, each storing 50 energy. As your room progresses through Room Controller Levels, you will be able to build more extensions.
Although not quite as important at this level, it is important that you place your extensions wisely. A fully-leveled room can have 60 extensions, all of which need to be easily accessible to be filled up. Different players have different patterns for placing extensions, listed on the Extension Placement page.
Now that your room is at RCL3, you need to build a tower immediately. A tower is your best defense at this level because it can easily defend your entire room from attackers. For tips on tower placement, read Tower placement.
At RCL 4, you can build a storage. Storages are useful because they allow you to store up to 1 million resources; however, they are difficult to move, so place your storage carefully. You will want your storage to be in a place where it can be reached easily.
At RCL 5, you can now build links. Links can be used for link mining, which helps reduce the need for haulers. They are also useful for transporting energy to your controller, which will help you level up faster. This is valuable because RCL 6 costs 1.21 million energy, which must all be transported to the controller.
RCL 6 unlocks several new features, mainly in the form of minerals and trading. At RCL 6, you can build an extractor on the mineral in your room and mine that mineral. You can also build a terminal, which allows you to participate on the Market. There, you will be able to purchase other minerals, then combine them in Labs. This will allow you to boost creeps to make them stronger.
At some point, your GCL will upgrade to level 2. When this happens, you will be able to take control over another room. This will give you access to more resources and different minerals.
You will also want to keep upgrading your room. Rooms can be upgraded to RCL 8, and can still be upgraded after that to increase your GCL.
Many players also get into Remote Harvesting, where they send creeps into unowned or reserved rooms to harvest the sources there. Although it is difficult to code, it can be very rewarding in terms of energy.