Screeps Arena Preorder


  • Dev Team

    Take a look at how the game API will look in Arena:

    import {Game, Spawn, MOVE} from '/game';
    import {work} from './roles/work';
    
    const myCreeps = [];
    let mySpawn;
    
    export function loop() {
    
        if(!mySpawn) {
            mySpawn = Game.getObjectsByPrototype(Spawn).find(i => !!i.my);
        }
    
        if(Game.time === 1) {
            let creep = mySpawn.createCreep([MOVE]);
            creep.role = 'worker';
            myCreeps.push(creep);
        }
    
        myCreeps.forEach(creep => {
            if(creep.role === 'worker') {
                work(creep);
            }
        });
    }
    

    Fully implemented ES6 modules with native folders support, guaranteed global during the entire match, globally persistent game objects, no Game.creeps or creep names since you can organize your own global data structures with them, no Memory since you can simply set properties on real live object instances. It will be fun!

    πŸ‘πŸ˜


  • @artch That definitely look interesting! Happy to see things like ES6 syntax making it into the game.

    However, this sounds like a significant API departure from the main MMO, do you have plans to upgrade the main MMO API to ES6 modules in a similar fashion?

    Or is it expected that MMO bots and Arena bots will always be fundamentally different?


  • Dev Team

    @keidence Upgrading MMO to this API would be, although very desirable, an extremely complicated task. It's a major refactor of almost everything in the runtime. Probably someday, but no promises.



  • @artch Will arena have a fog of war or full vision in the arena?

    I find the idea of having to scout the enemy important, it also allows you to do "sneaky" things if the opponent does not scout you πŸ™‚

    Depends a lot of the units that are implemented. I'm just thinking of RTS games in general πŸ™‚



  • Hopefully both, depending on the arena. Seems possible to make it optional without too much design headache.


  • Dev Team

    @thmsn During the alpha and the first season it will be full vision, but we will experiment on it later.

    πŸ‘Œ


  • I would surely enjoy a FOW kinda gameplay, could make it so creeps gets a 5 radius sight and have a boost to expand, that or an observer πŸ˜‰ tower, to allow an occasional remote view at a location.



  • @artch Looking good! Any plans to use the latest version of Lodash in arena API?


  • Dev Team

    @tehfiend No plans to use built-in lodash at all πŸ™‚ You can import your version at your own convenience.

    πŸ‘

  • YP

    will there be a simulator to test the code locally, maybe run it against a second script?


  • Dev Team

    @w4rl0ck No. But you will be able to run non-rating games to test your code.


  • YP

    @artch I donβ€˜t really understand how debugging your script will work .. will you be able to log to console and download the log together with the game or something like that? I imagine it will be really difficult to understand whatβ€˜s going on with your creeps just by watching the game, especially for new players without experience with screeps

    Personally I donβ€˜t like to develop in big iterations .. I like to create test setups on private server / sim and work on code and test small changes... it sounds like that wonβ€˜t really work with arena.



  • @artch Have you decided how you will handle CPU? As one option, I like the idea of setting it up similar to a chess clock. Each side gets x CPU for the entire match and if you run out you lose. Also ensures these types of matches have a well defined life span and adds weight to CPU management as a strategy. Could run this as an alternative option to the existing x CPU / tick + bucket system.


  • Dev Team

    @w4rl0ck You will be able to watch console logs during the match in real time, and download them later too. However, you cannot change anything during the match, so small iterations are not possible indeed.


  • Dev Team

    @tehfiend This is a great idea, we will definitely consider it.

    πŸ‘


  • @tehfiend That is an awesome idea! It opens up endless avenues for exploring efficiency after "virtually every strategy is discovered" 5 years from now. I can see the E-Sport footage now... "Well, Steve, they are both using virtually identical quad attack squad strategies, but look at the CPU usage... I think we can see how this is going to end!"


  • YP

    @artch yeah thats what I meant .. so it's like the room history viewer but you also see the console for the tick I guess... are visuals also supported? πŸ™‚

    Maybe at a later stage a world map of different arenas could be added.. so you could challenge the current owner of an arena in a match to get ownership yourself



  • @artch But maybe run game in debug mode against two versions of your own bot? I assume competitor's bots code wouldn't be available locally?


  • Dev Team

    @w4rl0ck Room visuals are of course supported.


  • Dev Team

    @gravencrown There will be no "local" execution of arena code at all. It doesn't make much sense to bother with it in the arena setting. You will be able to run matches that last a few minutes (or even seconds) and have all debug info you need.