I have to be really careful though when I am interacting with memory. iterating over the native data structures and turning them into cljs immutable structures is so far working fine for me. I've found that the purnam lib implements just about all important protocols on native data structures, which is half the battle right there. transforming all those data structures back and forth between mutable and immutable is going to add up and make us pay more. I agree with you about needing to stay as close to the JS api and data types as possible. I am totally stealing your build script either way! I took the autocomplete project and stripped out all the comments and whatnot. Heh, I can't take credit for those externs.
Screeps map code#
The last potential issue is that our code is wrapped in a closure that modifies the globals. Plus figuring out how external commonjs libs support works in cljs. Several issues: source-map-support needs to be updated to strip out it's use of several built in nodejs modules that we don't have access to (or really need). The last bit is the nodejs module source-map-support which outputs a fixed traceback. Furthermore, the original code ALSO has to be embedded in the source map (there is a field for this).
Screeps map how to#
So I think I have figured out how to get proper tracebacks at least (and maybe limited source mapping) to work.īasically the source map has to be embedded in the code sent to screeps. So I have to minify and use advanced optimization to cut dead code and everything. And then there's the closure libraries themselves, which are another 200-300k. I'm doing my bot in clojurescript, and the clojurescript core library is over 2 megs with comments. Digging through minified JS is not my idea of fun.īeing able to take advantage of the source maps closure creates for me automagically would be great! Is anybody doing this? Has anybody figured out how to do it?Īnticipating the response "Don't minify it, and refactor into multiple modules": Can't. You can use game constants SYSTEM_USERNAME, SIGN_NOVICE_AREA, and SIGN_RESPAWN_AREA to programmatically check the signs in the rooms that are important to you and reserve them if such a message detected.I'm working on my screep "AI", and debugging the simplest thing is becoming ludicrous.
Screeps map free#
When a Novice or Respawn Area is being planned in an inner sector, all free rooms in this sector will be signed by the game with the following message: If you don’t want some rooms to get transformed into Novice or Respawn Areas, you should take care to reserve them. Please mind that such areas can be allocated in previously opened sectors of the common world provided they are sufficiently big, not populated, and not in use by anyone. We keep monitoring the Novice and Respawn Areas population progress and open new areas as it becomes necessary. All players with any GCL can place their first spawn in this area and claim as many rooms as their GCL allows. They are highlighted with blue color and have only the Nukers usage restriction. Respawn AreasĪnother similar kind of isolated world map zones is Respawn Areas. It means that each resident starts out in the game by facing other players only in their own “quarter” first, but after a few days they can meet all the residents of the sector. Apart from the common outer wall that encircles the entire 10x10 sector, there are also inside walls that intersect these “quarters.” The counters of those walls are lower than the total Novice Area counter. The majority of novice sectors are divided into 4x4 room size quarters. After zones are opened, residents can start outward expansion, but can also face invasion into their sectors. After it runs out, the walls disappear, rooms lose the green mark, all the limitations are cancelled, and the sector becomes a regular part of the world.