In this series I want to introduce you to a programming video game called Screeps. I'm going to walk you through the official tutorial, so just in case you're new to programming, or if you're having trouble with the tutorial, hopefully this will help you out.
Screeps is a programming game, but it's not designed to teach you how to code. Still, I think it can be a great way for beginners to practice their programming skills once you get into it.
Let's start by talking about what Screeps is as a game. I describe it as a real time strategy game that's also an MMO. It's like a real time strategy game in that you create buildings and then from those buildings you will spawn units: either worker units that collect resources for you, or military units that will defend your base or attack other players. But it's also like an MMO because everyone who's playing the game is on the same server. It's all in one big world and the game is persistent. So it's going on 24/7 around the clock.
The game map consists of large grid, and each square in that grid is a room. Some rooms can be owned by a player and some can't. In rooms that can be owned, you'll find at least one, but hopefully two, yellow squares that are labeled as energy sources. The main goal inside the game is to harvest these energy sources. This allows players to build more buildings and create larger and more powerful units. Your access to energy determines how fast you are able to grow.
The units you spawn and control inside the game are called "creeps". Worker creeps spend their time gathering energy and moving it to where it's needed.
But what makes this game different from any other video game you've probably ever played is that you don't actually play this game directly. You're not selecting your characters and telling them what to do. Instead you're writing artificial intelligence in JavaScript, in real code, and then your AI is what instructs your units on what to do. So that's how even when you sign off for the day and you're done playing, your base is still operating and it's still running off of the code that you wrote earlier.
To get started, simply go to the Screeps website. You don't need to install or download anything. You don't even need to create an account to do the tutorial. Scroll down until you see the "Live Demo" button. From that page, click on the "Tutorial" option.
You can see that the tutorial is broken down into five steps.
In the following videos and articles, I'll be doing each one of these five steps to help you through them if you get stuck, and to explain some tips and tricks that you might have missed out on.
But before we begin, I first want to show you the documentation. You can find this on the Screeps website in the menu in the upper left corner. In here there's a lot of great articles about how to play the game and what everything is. There's also an API reference, which is key once you get into actually writing code. You'll want to come to this reference to find out exactly what every object in the game does and how it works.
That's all for this intro part of the walk through. In the next one we'll start with tutorial step 1.