Optimizations roadmap
Let’s begin with the most exciting things. As you perhaps already know, the Screeps server executes players’ scripts using the standard Node.js module vm. This is a relatively convenient environment for executing JavaScript code, but it has a serious disadvantage: scripts are not fully isolated from each other and the parent environment, but they share heap memory, garbage collection, and event loop. Because of this, running players’ scripts can’t be fully controlled by the engine, which adversely affects performance of both the game world and individual players’ scripts in particular. And here we have terrific news. Marcel Laverdet whom we already well know, recently wrote a native library isolated-vm designed to solve this issue especially for Screeps. It allows to directly create and control V8 isolates to wrap players’ scripts into completely isolated their own environments, and runtime state of such isolates can be serialized and transferred. A runtime engine refactor using this library potentially allows for the following:
The performance of runtime servers is currently not the only one and perhaps not even the main performance bottleneck of the world in general. The Screeps game world has grown to such an extent that the most powerful machine available from our hoster currently runs our database at 100% of its capacity. We can’t merely add runtime servers anymore since the database can’t manage such amount of I/O requests. We experimented with different setups of database sharding and replication, but all of them incur unacceptable overhead. It looks like the most effective way to horizontally scale the database is to review the very architecture of the official servers cluster. Currently, our cluster can be represented in a classic “star” layout with the database in the center and runtime servers on edges. The game world is consistent and synchronized as a whole. We plan to move from this architecture to a new layout of “multiple loosely coupled stars.” Our consistent game world will be divided into “shards” each with its own database of game objects, own game map, and own set of connected runtime servers. Creeps will be able to move between shards through special portals, but different shards will see time flowing independently without synchronization (i.e.
Currently our new developer Fedor works on a new graphics engine for the game using PixiJS. This is a 2D engine for games and complex graphics development that utilizes WebGL as the main rendering method, falling back to canvas if WebGL is unavailable. The graphics won’t radically change soon (though eventually we have redesign plans as well), but the way it’s displayed in the Steam browser/client will change. Currently all the game graphics is based on SVG/canvas, but SVG will be phased out completely, and canvas usage will be very rare. This will allow for the following:
We plan to start publishing early iterations of first prototypes across these 3 development tracks within coming weeks. For example, you’ll be able to activate the WebGL renderer with the help of a special experimental option in the client’s settings. New back-end features will be first run on PTR, and we’ll announce them separately. Stay tuned!
[ 2017-06-12 19:09:38 CET ] [ Original post ]
Game performance in all aspects is an important area of our work. It was not left unnoticed by us that game simulation performance (tick rate) noticeably decreased lately due to the increase of the number of objects and growing complexity of players’ scripts. We understand it can lead to negative sentiment on the subscription-based model, and we won’t tolerate this situation. So in this post, we’ll talk about the three directions we plan to move so as to radically optimize performance.
Runtime: new virtual machine
Let’s begin with the most exciting things. As you perhaps already know, the Screeps server executes players’ scripts using the standard Node.js module vm. This is a relatively convenient environment for executing JavaScript code, but it has a serious disadvantage: scripts are not fully isolated from each other and the parent environment, but they share heap memory, garbage collection, and event loop. Because of this, running players’ scripts can’t be fully controlled by the engine, which adversely affects performance of both the game world and individual players’ scripts in particular. And here we have terrific news. Marcel Laverdet whom we already well know, recently wrote a native library isolated-vm designed to solve this issue especially for Screeps. It allows to directly create and control V8 isolates to wrap players’ scripts into completely isolated their own environments, and runtime state of such isolates can be serialized and transferred. A runtime engine refactor using this library potentially allows for the following:
- The heap memory accessible by your script will be only yours and nobody else’s. You can see the exact volume of heap memory your script uses.
- Everything in the heap memory (not just compiled scripts) can be saved between ticks and moved to other physical nodes for resuming in the next tick.
- The possibility of the transfer of serialized states makes it unnecessary to assign players to certain servers. It will seem to players that their scripts are always executed on the same physical server. This will not only improve caching time of newly-commited code, but will also remove the need to periodically calibrate runtime servers (popularly known as “reset storms”) which used to be required to optimally distribute players affinity across servers.
- Garbage collection executed on your account CPU will depend solely on objects in your heap memory rather than objects of other players.
Database: world shards
The performance of runtime servers is currently not the only one and perhaps not even the main performance bottleneck of the world in general. The Screeps game world has grown to such an extent that the most powerful machine available from our hoster currently runs our database at 100% of its capacity. We can’t merely add runtime servers anymore since the database can’t manage such amount of I/O requests. We experimented with different setups of database sharding and replication, but all of them incur unacceptable overhead. It looks like the most effective way to horizontally scale the database is to review the very architecture of the official servers cluster. Currently, our cluster can be represented in a classic “star” layout with the database in the center and runtime servers on edges. The game world is consistent and synchronized as a whole. We plan to move from this architecture to a new layout of “multiple loosely coupled stars.” Our consistent game world will be divided into “shards” each with its own database of game objects, own game map, and own set of connected runtime servers. Creeps will be able to move between shards through special portals, but different shards will see time flowing independently without synchronization (i.e.
Game.time
in different shards will not match and tick rates will differ).
Your code will be executed in each shard separately. A special API will allow you to determine which shard runs your code at the current moment. The CPU limit for each shard can be set on a special page, and their total sum should match your account limit.
This vision still has some unresolved issues, but in general, the new system will lead us to an easily scalable horizontal system allowing for expanding the game world virtually without limitations and without increasing the main DB load. Right with the launch of this feature, we plan to launch a shard with a 2-second tick rate. You’ll be able to respawn and start playing in it, or direct your creeps there through portals to create an “inter-shard” colony. We expect that the flow of players on the new shard will unload the old (current) one which will favorably affect its tick rate as well.
Client: WebGL renderer
Currently our new developer Fedor works on a new graphics engine for the game using PixiJS. This is a 2D engine for games and complex graphics development that utilizes WebGL as the main rendering method, falling back to canvas if WebGL is unavailable. The graphics won’t radically change soon (though eventually we have redesign plans as well), but the way it’s displayed in the Steam browser/client will change. Currently all the game graphics is based on SVG/canvas, but SVG will be phased out completely, and canvas usage will be very rare. This will allow for the following:
- WebGL uses GPU and is optimized much better than SVG. Your laptop won’t get hot and drain your battery as you’re just watching your room in Screeps.
- Since all game objects will be stored as 2D sprites, we’ll be able to customize graphics and possibly even introduce customizable game themes.
- We’ll obtain tools to create new beautiful animation and special effects. For example, we’ll be able to add lighting effects and create a special API to control glow color of your creeps. This graphics engine will also give us more possibilities in terms of room decoration.
When will all this happen?
We plan to start publishing early iterations of first prototypes across these 3 development tracks within coming weeks. For example, you’ll be able to activate the WebGL renderer with the help of a special experimental option in the client’s settings. New back-end features will be first run on PTR, and we’ll announce them separately. Stay tuned!
Screeps
Screeps
Screeps
2016-11-16
Strategy MMO
Game News Posts 83
🎹🖱️Keyboard + Mouse
Very Positive
(1768 reviews)
https://screeps.com
https://store.steampowered.com/app/464350 
The Game includes VR Support
Screeps Linux 32 [154.08 M]Screeps Linux 64 [144.51 M]Screeps Server Linux 32 [269.47 M]Screeps Server Linux 64 [261.48 M]
Screeps - CPU Subscription
Screeps is about scripting your creeps.
It is a MMO RTS sandbox game for programmers, wherein the core mechanic is programming your units AI. With all the attributes of a full-fledged strategy game, you control your colony by writing real JavaScript which operate 24/7 in the single persistent world filled by other players on par with you.
Your colony can harvest resources, build units, conquer territory, trade with another colonies. As you conquer more territory, your influence in the game world grows, as well as your abilities to expand your footprint. However, it requires a lot of effort on your part, since multiple players may aim at the same territory.
Screeps is developed for people with programming skills. Unlike some other RTS games, your units in Screeps can react to events without your participation – provided that you have programmed them properly. And, unlike other MMO, you do not have to play Screeps constantly to play well. It is quite enough just to check once in a while to see if everything goes well.
Features:
It is a MMO RTS sandbox game for programmers, wherein the core mechanic is programming your units AI. With all the attributes of a full-fledged strategy game, you control your colony by writing real JavaScript which operate 24/7 in the single persistent world filled by other players on par with you.
Your colony can harvest resources, build units, conquer territory, trade with another colonies. As you conquer more territory, your influence in the game world grows, as well as your abilities to expand your footprint. However, it requires a lot of effort on your part, since multiple players may aim at the same territory.
Screeps is developed for people with programming skills. Unlike some other RTS games, your units in Screeps can react to events without your participation – provided that you have programmed them properly. And, unlike other MMO, you do not have to play Screeps constantly to play well. It is quite enough just to check once in a while to see if everything goes well.
Features:
- You play by writing JavaScript AI which controls your units 24/7 even while you're offline.
- No shards, game realms and session match-ups: units of all players coexist in the same real-time persistent world and obey the same rules.
- Units, base, mining resources, territory control, economy, manufacturing, transporting, logistics, trading – all the attributes of a real strategy game which you need to program!
- The better your scripts, the better your game — irrespective of the time played. Your creeps will mine, build, defend, and conquer as you just work, sleep, or walk your dog.
- Only basic programming skills are required. However, if you are a pro developer, now is the chance to put your skills to the limit!
- Edit your scripts from the in-game editor, or using your favorite external IDE.
- Lifetime MMO access with 10 CPU limit included in the starter package. Raise your CPU limit to the point depending on your game level by purchasing a CPU subscription plan or via in-game items called Gametime Tokens. The subscription cost is the same for all players, there is no way to pay more to gain more advantages.
- Open source game server engine, and an option to create your own local world and play with friends without limits or subscriptions (not available yet, please read the Early Access notes).
MINIMAL SETUP
- Storage: 500 MB available space
- Storage: 500 MB available space
GAMEBILLET
[ 5952 ]
GAMERSGATE
[ 3223 ]
FANATICAL BUNDLES
HUMBLE BUNDLES
by buying games/dlcs from affiliate links you are supporting tuxDB