How to use screeps - 1 common examples

To help you get started, we’ve selected a few screeps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Hiryus / screeps-server-mockup / src / screepsServer.js View on Github external
async start() {
        this.emit('info', `Server version ${require('screeps').version}`);
        if (!this.connected) {
            await this.connect();
        }
        this.emit('info', 'Starting engine processes.');
        this.startProcess('engine_runner', path.resolve(path.dirname(require.resolve('@screeps/engine')), 'runner.js'), {
            DRIVER_MODULE: '@screeps/driver',
            MODFILE:       path.resolve(this.opts.path, DB_FILE),
            STORAGE_PORT:  this.opts.port,
        });
        this.startProcess('engine_processor', path.resolve(path.dirname(require.resolve('@screeps/engine')), 'processor.js'), {
            DRIVER_MODULE: '@screeps/driver',
            MODFILE:       path.resolve(this.opts.path, DB_FILE),
            STORAGE_PORT:  this.opts.port,
        });
        return this;
    }

screeps

A standalone server for programming game Screeps

ISC
Latest version published 9 months ago

Package Health Score

52 / 100
Full package analysis

Popular screeps functions