Uncategorized

Standalone server development update

September has begun, and we start getting natural questions like: “When will the open-source server go live that was promised in August?” So in this post we’d like to explain the situation that’s going on now.

Currently we have actually three parallel development pipelines for Screeps:

  • Features of the game itself and its gameplay
  • Optimizing the official server
  • Development of the standalone hosted server

When our second Indiegogo campaign was launched, the plan was roughly this: make a market system as a major feature, and then delve completely into the development of the standalone server and a Steam client for it. That’s why we set August as an approximate milestone date. However, after the campaign’s end and some consideration we realized that the Steam launch proper and the standalone server release are two vastly different things that should be better done one at a time rather than simultaneously. A higher traffic from Steam may require some adjustments in the scalability of the game servers, so we’d be having hard time watching this process and at the same time taking care of the open-source project that would appear along with it. We decided to first launch the Steam client to attract users to the main official world, debug it, and then move to the standalone server without any hassles.

Our experience has shown it was a right decision. When Steam gave us hundreds and hundreds of new players, it revealed a number of issues in our server architecture that prevented capacity scaling for running your scripts, and we put a lot of time and efforts to debug and optimize those bottlenecks. You might remember how the tick duration soared from 2.5 to 5 seconds, then fell back, then grew again, and then stabilized at 2.7-3 seconds. We are content with the current rate, but achieving it required a lot of work within the past two months.

Due to this reason, unfortunately, the standalone server won’t be launched within the coming weeks. We are sorry to realize that we missed some deadline, but please be assured this was not due to our laziness, but we decided to rearrange the work, and the history proved it was a right decision.

And there is another reason for delaying too. After the Indiegogo campaign was over, we spent some time on designing the concept of a standalone server, and we realized we couldn’t just take the current server code, open-source it, and rest on our laurels. For the project to gain traction as standalone as we see it, the following design concepts need to be implemented:

  • Zero dependencies. The official world works on a traditional server stack of many applications: nginx + nodejs + mongodb + redis. And it won’t work for the standalone server. The user should be able to just download an executable file via Steam, launch it, and get a working server at his IP address without any extra programs to install. We use Electron packaging to achieve this, but it also requires a separate database layer based on the in-memory database inside the application itself.
  • NPM-based application. Though many users will opt for the easy downloading and running the server as a simple desktop application, we have to support a more advanced installation as an NPM module as well. Being a JavaScript application, the Screeps server organically fits into the npm packets ecosystem, but the current game server architecture (which was initially developed as a set of layers with loose coupling) should be divided into multiple modules to publish them in the npm separately. This will allow, for example, replacing the database layer module with your own one to use the desired server-side stack.
  • Fully moddable architecture. To change the majority of server behavior aspects should require simple redefining of needed fragments through a system of external hooks and extensions rather than modifying the server code. We also need a possibility to add custom game entities even with their own visuals.
  • Single-player bot players. The single-player mode (which makes some people long for the standalone server) will be pretty boring unless there is somebody else but the player in the game world. But the development of a full-fledged AI that can start from scratch in the game world and seriously challenge the human player is a very interesting and complicated task. We want the players themselves to find the solution to it, since that’s exactly the main fun of Screeps. Any player could write a script for his or her standalone AI and submit it into the common repository where other players of the single-player mode can install it. When provided with its own room in the worls, such a standalone AI has to be able to analyze the situation, develop its colony, and bring some life to the game world where it exists. The repository will introduce a ranking system for AI performance, user comments to them, new version updates, etc.
  • Steam Workshop support. The two aforementioned options are perfect in terms of excellent mechanics of Steam Workshop. The system of downloading and installing any custom files provided by the Workshop can be utilized to automatically install and update custom mods, game object types, bot players, and entire complete worlds. This is a huge task, but it’s vital for the Screeps ecosystem.

Implementing some of these things requires the overhauling of the current server code of Screeps since they were not accounted for 2 years ago when the game was first designed. But we are convinced that short of these, the standalone server won’t be the type of product we really want to share with you.

In terms of deadlines, we don't want to be overly optimistic at this point making promises we won’t be able to meet. Let’s keep October in mind. If we get a working version earlier, we’ll definitely show it. As was promised, our Indiegogo campaign backers will be the first to get their hands on it, while the public availability will begin a month later.

2016 Roadmap

After the Steam launch, many people got to know about Screeps and supported it financially. We thank all of you who contribute to the project’s development! It was very important for us to have an audience though not big, but such advanced and smart as you all are!

The successful Steam launch increased financial capabilities of the project. As before, our team consists of three people: Artem, Sergey, and Anton, but Artem now works on Screeps exclusively full-time, while Sergey and Anton help with important tasks on an ongoing basis. Now we are completely confident in our abilities to implement the majority of our plans that once seemed to us colossal and unfeasible, but now we have a clear vision of what to do next on the project. So we’d like to share some of our thoughts with you.

Below are some major features and areas that we either work now or will work on within the coming months. The order is not always chronological, but it gives a glimpse on our priorities. 

(Implemented features are colored in gray.)

Market system

The biggest feature to arrive in the coming weeks is a system for trading resources between players. This article explained in detail the way it would function. Aside from evident advantages of organized trade and social features it offers, it also allows to launch the system of Subscription Tokens – special in-game items to pay for CPU Subscription which can be traded on this same market. Each player will have the opportunity to purchase CPU using his or her game resources, thus essentially playing Screeps for free. 

Open source server 

A major milestone that was long awaited, this has been developed for several months to become the next phase of the project development after the market system deployment. We’ll release a game server to launch as a regular Node.js/Electron application accessible to any owner of the Steam version of the game via the server’s IP address. The server can be launched on a local computer in the single-player mode, on LAN to play with friends, or on an Internet server to create a publicly available game world. Unlike the official game server where MongoDB and Redis are used, the open-source version is being developed without external dependencies which allows to run it as a regular desktop app. However, since its code will be fully open, you can always add any customizations according to your needs and imagination. 

This step will include a planned release of the Steam version and closing the Early Access period. 

Better simulation 

The simulation mode hasn’t seen many changes since the early days of the project, so we’ve collected a lot of feature requests that we want to implement in the nearest future. We’ll allow you to save different simulation room states under different names, copy any room from the game world or a replay into the sim, import/export to JSON, playback a single game tick multiple times. Augmenting this with the local server will create new opportunities to debug and test scripts. 

Power Creeps 

This feature has been announced long ago, when the Power resource was first added, but we’ve been having many other important things to do and Power creeps are still on the concept design stage. By the way, it ought to be very well though-out and balanced since this is essentially a system of “heroes” with classes and skills, and they can affect the game balance dramatically. Having immortality and unique abilities, each Power creep will be an important player’s asset along with the Global Control Level that you can’t lose even after a complete failure in the game world. We have to think very thoroughly about each branch of class development so that they allow many equally advantageous lines and interesting dilemmas. 

Aside from some evident areas of Power creeps application (offense, defense, economy), we’ll introduce another one that wasn’t announced before. Here is what it’s about: 

Arena 

Starting from Room level 5, a new structure will be available called Arena. By moving any three creeps close to it, you will be able to teleport them to a special virtual room, separated from the game world and generated exclusively for your matches with other players in the 1 vs 1 mode. The system will pick an opponent for you among other players who have released their creeps onto the Arena, and a duel will begin between them. It will last until either one of the players loses his creeps or the time runs out. This room will be accessible for your scripts in the same way as regular rooms of the game world, but under a unique name. After the end of the duel the winning creeps get teleported back into the Arena structure. All the latest matches are viewable as replays in the special section of your Overview. 

One interesting detail is that you can release to the arena both the regular creeps (for new players) as well as Power Creeps with a special class Gladiator. It will give them some special abilities, and their behavioral logic will prove to be an interesting programming challenge. 

Arena winners will be rewarded with a special Arena Rating which will make a new monthly Top. You can either gain or lose points as an outcome of a match. The system will try to pick opponents for your creeps that best match your rating. 

Aside from simple rating points for wins, there will be a more substantial prize – a new resource called Pixels. 

Pixels & decoration 

Pixels are a resource tied to your account. You can trade it on the market, and it is required to purchase and create special decoration elements for your room. Having a certain amount of Pixels, you can place in your room a flag, tree, pattern, emoticon, inscription, or any other image available in our Pixel Store. You can customize images by size and color thus making any of your rooms visually unique. Such decorations won’t have any functional bearing, but you can customize them via the API for creating tick-based animations. Pixels will be tradeable not only on our in-game market but also the Steam Community Market

API versioning 

In your account settings you will be able to specify directly which script API version you want to use. Major API updates will be released alongside new versions, so to avoid breaking changes in your scripts we’ll leave the old version available for some time, while new players will be able to use new capabilities of the new version. It will allow us to implement new interesting features more flexibly and freely. For example, we can use modern ES6 practices when designing game objects. 

Below are some of the features without fully developed ideas, but we’d like to make use of them in the future. 

Achievements 

Quite an evident and desirable thing that yet requires a lot of development efforts. Important milestones in a player’s progress will be highlighted to match specific achievements visible in your website profile and on Steam. 

World events 

Certain events can happen in the world according to our pre-defined rules, for example, the emergence of hidden rooms, big boss creeps with difficult logic (or many special small creeps), unusual game events with their own APIs. Participants will be rewarded with game resources and unique profile achievements. 

Quests 

Along with arenas, we’ve thought of a possibility to build special quest portals to teleport creeps not onto a match arena but into some quest room where you are to solve some room-specific problem and get rewarded with Pixels or other resources. 

Native languages support 

This is possible only on a long-term basis, but we're still contemplating developing separate runtime game servers for the native processing of your scripts written in various languages like Python or Lua. This will also require separate API branches for each language along with the documentation. However, this feature won’t be available on a local server. 

We are sure that all of this will be successfully implemented thanks to your committed support. And, of course, we’ll continue our routine work on improving stability and server performance, fixing bugs and glitches, and adding minor features and updates not listed here. Please share with us what you think about our ideas in the comments below!

Screeps launched on Steam!

We have just launched Screeps on Steam! The game is available on exclusive terms: buying Screeps through the Steam Store, you get lifetime MMO access with the 10 CPU limit. This resource is sufficient to maintain a small bunch of optimized rooms – play as much as you like without ever paying for subscription!

The CPU subscription will be available for order at the Steam store page in the next few days.

We are looking forward to hear your feedback! Please don't forget to write a review if you like the game.

Have fun scripting!

Important change: game objects prototypes

On May 12 an update will be deployed that will introduce some changes to the API which can require adjustments in your script. The changes affect two fields:

  1. The underlying data structure in which flags data is stored on the server was revised for optimization purposes, and now the Flag prototype does not have the id property. If you have worked only with properties name, color/secondaryColor, and memory, you have nothing to worry about. Otherwise please change your logic in order not to use the id property. Besides, the constants COLOR_* now represent integer values rather than strings, so if you used their values directly, please make sure to use names of variables from now on.

  2. We are considerably expanding the list of prototypes of game objects. Now all the prototypes will be arranged into a hierarchy and inherited in a chain. Here is the tree of prototypes:

       
Room
RoomPosition
RoomObject  (room, pos)
ConstructionSite
Creep
Flag
Mineral
Resource
Source
Structure (structureType, hits, hitsMax, destroy, notifyWhenAttacked, isActive)
  OwnedStructure (my, owner)
  StructureController
  StructureExtension
  StructureExtractor
  StructureKeeperLair
  StructureLab
  StructureLink
  StructureNuker
  StructureObserver
  StructurePowerBank
  StructurePowerSpawn
  StructureRampart
  StructureSpawn (aliased as Spawn for backward compatibility)
  StructureStorage
  StructureTerminal
  StructureTower
  StructureContainer
  StructureRoad
  StructureWall

You are free to use these prototypes in your scripts:

Game.rooms.W0N0.storage instanceof StructureStorage // true
Game.rooms.W0N0.storage instanceof OwnedStructure // true
Game.rooms.W0N0.storage instanceof Structure // true
Game.rooms.W0N0.storage instanceof RoomObject // true

So, because of this, if you have overrided some properties or methods, you have to check that you are doing this in the right place of the tree.

These changes have already been deployed on the Public Test Realm, so we recommend to go there and check if your script works correctly before the update goes live on the main server.

Indiegogo campaign results

The campaign is over!

Here are the results:

  • 310 backers contributed.
  • $11,493 raised.
  • 144% of the original goal achieved.
  • Valve has approved the release of the game for Steam, and we’ve already started preparing necessary documents. 

Thanks for your support!

All the rewards have been sent out to backers except for codes for accessing Steam and the server. If you haven’t received our email yet (which could happen if you had sent money but had not chosen your perk), please email us at contact@screeps.com.

As for the Steam client and the open-source game engine, their development is under way and we hope to share the first results very soon. Here is the plan:

  1. First, we’ll release the game on Steam in the Early Access mode. It will be a fully functional client for the online MMO mode with support for scripts in local files, but without the hosted server.
  2. The second step is a private release of the server engine and launching a test version on Steam with its support. Only 310 backers of our crowdfunding campaign will gain access to it.
  3. After a month from that, if everything goes smoothly, we will publicly release the game on Steam and the server on npmjs.com (the server source will be available on GitHub).

Follow the news!

NPC Invader Raids

We have expanded the NPC Invaders system. Now, when the threat counter in a room runs out, there is a 10% chance that you will get not only a lone Invader but a whole company of them, from 2 to 5. Each Invader has its own role: melee attacker, ranged attacker, or healer. Ranged attackers are different from melee ones in their behavior: they try to stay at a distance from your creeps. The function of healers is evidently to heal other raid members. Also, some creeps may be boosted with , , , or . Sometimes the total healing effectiveness of such a raid will surpass the damage from several towers, so defense will prove to be very interesting.

These creeps will stop using rangedMassAttack, so in the majority of cases they won’t pose any threat to your buildings except ramparts and walls. The worst result for you would be the death of all your creeps in a room. Certainly, you should try to avoid this to keep your economy stable.

  RCL < 4 RCL ≥ 4
Melee
Ranged
Healer

 

Introducing minerals and trading

We are happy to announce that new resources are now available in the game! We have worked on this important milestone for quite a long time. It is intended to introduce much more depth and tactical diversity to the game. Economy is important in any strategy game, and we believe this update fits the Screeps gameplay very well.

New resources

There are 7 new mineable resources in the game now. Each room has some base mineral of a single type that you can mine starting from room level 6.

A proper usage of minerals will allow you to permanently boost individual functions of your creeps up to the 4x effectiveness increase. For example, a creep with 1 CARRY part and the catalyzed keanium acid effect can transfer 200 units of cargo instead of 50. Hence, your creep will need much less energy to carry out its work, and you can use the saved energy for other purposes.

Worth noting is the multi-component ghodium compound which allows to speed up the function upgradeController without increasing the energy usage. Besides, it increases the limit of maximum upgrade per tick for level 8 controllers and, therefore, significantly speeds up your Global Control Level upgrade speed.

Learn more about minerals and boosts

Trading

Since minerals are scattered across different rooms, you will need some means to transfer resources between them and facilitate trade connections. A new structure type serves this purpose: the Terminal. It allows for instant transfer of cargo from one terminal to another (even of another player). Each transaction consumes energy depending on the cargo volume and distance, so it’s vital to place terminals on the world map properly.

Currently we work on the in-game market system which will allow you to create buy/sell orders and thus trade resources with other players through your terminals automatically. Follow the news!

View changelog

We're open-sourcing the game engine and launching the game on Steam



Great news Screepers!

We have launched a crowdfunding campaign to rework and open-source the Screeps game engine so that you can create your very own game world with your rules and play with your friends for free!

Here are just some of the perks you’ll be able to get by backing this campaign: 

  • Early access to game engine sources.
  • Your own unique game badge symbol.
  • Lifetime MMO access.
  • Obtaining game time for free by sharing with friends. 

Hurry up, some of the offers are limited!

Game situation review: February 2016

The territory settlement has suffered great changes since 2016 began. Some players who control large parts of the five sectors have stopped their scripts and surrendered their territory to others:

Region  Old owner New owners
E5N5 Ranger DarkTrooper7 (4 rooms)
Hendriksie (4 rooms)
W5S5 Vertigan AzuraStar (6 rooms)
W15S25 msvsergey TooAngel (4 rooms)
Novice area (15 rooms)
W15N5 Vision retired (7 rooms)
W15N15 reelthyme Novice area (21 rooms)

Here is how the map looks like at the moment:

Starting from now, we’ll use a new strategy to open Novice Areas. If large free zones inside existing game sectors appear, they will be zoned as Novice Areas rather than just adding new sectors to the map. It will allow for more flexible balancing in settling the game world and prevent the appearance of large empty spaces that would decrease competition for territory.

The main criteria for placing these zones will be the room reservation which became significantly easier after the recent update.

By the way, as the reservation process became easier and you now have to reserve rooms to increase your energy sources capacity, actual domain borders became visible on the map. This simplifies the task of choosing the starting point for novice players. Let’s see the room availability in the Claimable view:

While previously it wasn’t always obvious that placing a spawn in some room would infringe on some large player’s interests, now it is perfectly clear and visual.

The most densely-settled sector, the Screeps metropolis, so to say, is now the central Hernanduer’s[23] location – W5S15. There are only 5 neutral rooms now, and after the NPC Invaders update, it’s likely that only one isolated room will be left, W2S19.

Unlike Hernanduer, many players place their rooms quite far from each other, so to assess their domains, the settlement rank could be useful in addition to visual observation.

As was expected, the expansion leaders are all the same who lead the main tops. In January, NhanHo[25] landed his 4th gold in the Expansion Rank:

Danny’s[15] chart for the last day of the month shows that curve for Hernanduer where he recaptured the initiative to soar upwards in the new season (it is seen in the current chart [link]). His companion in the chart DarkTrooper7[21], on the contrary, fell into coma for a few days but later braced himself and regained control over his territory:

The Power Rank reveals the state of the preparation for the era of heroes. As in the first power season, Hernandeur again tops the rank by piling up literally over 9000K of power in total. We are seriously eager to see the power creeps he’ll be able to create when they appear!

The highest military activity of the season was focused in the new sector E15S15 which is completely immersed in fighting. We can hope that future Screeps leaders will emerge from here. And now, as we intended in the previous review, let’s switch our attention to some attacks with towers (which, by the way, prompted us to adjust their characteristics a little):

Important change: NPC invaders

Suddenly, the world of Screeps has become less safe. It seems that intensive mining and industrial development in once virgin regions shattered the environmental balance and enraged mysterious forces we know little about. The time of peaceful travel came to an end, and since now, everyone should keep on the watch.

NPC Invaders

Every room where energy is mined has an inner counter at approximately 100,000 units of mined energy (plus some random variable). After this counter times out, a new game-controlled creep appears at one of the room exits with the goal of hunting your creeps. It will not touch your spawns, but if a structure gets on its way, it will try to destroy it. This creep can use attack, rangedAttack, and dismantle. It is unable to move between rooms. 

An important feature of these creeps is that they can appear only at exits to neutral rooms. If the target room is under your (or someone else’s) control or it is a reserved room, an invader creep will never appear at this exit. If all exits in the room are of this kind, invaders cannot appear at all.

There are two types of invader creeps:

  • Light creeps that appear in neutral, reserved, and claimed rooms under level 3.
     
  • Heavy creeps that appear in claimed rooms level 4 and above. 

UPD: There is now a chance that you will get not only a lone invader, but a whole company of them. Learn more from this article.