Giter Club home page Giter Club logo

supreme-spoon's Introduction

Explanation how to run:

https://screepers.gitbook.io/screeps-typescript-starter/getting-started/deploying

About: This is my bot, first step i want to generate an automatic base builder.

The algorithem for that will be as follows:

Get terrain data and generate a map, with a center point ( would be the first spawn, how to find the best starting spawn point would be another thing by itself ) the map only cares about natural walls, resources, controller. it would mark all of the above as not open and unwalkable.

next step for each of those, mark the nighbours that they have "closed" space near them, marking tiles with more then x ( 1 to 8 ) "taken" spaces as closed ( not buildable ).

Generating 500 buildings with the rule of "needs 4 free spaces near building"

alt text

next step we generate a cost map for all tiles in the map. cost from the "ceneter" a.k.a starting spwan.

we mark tiles with cost less then Y as buildable and drop them in open set. we mark tiles with cost > Y && cost < Y + 20 as "edges"

next : we generate W buildings, ( max number ) on the open set.

for each new building we make sure it doesnt break the following rules.

if any building b in Buildings now has a cost > G, or any edge e has cost > G we revert back and mark the tile as not buildable.

in case it didn't break those rules we add the tile in buildings, and remove from open.

WE GENERATE from the "most" far away to the least far away, this way we have much better controll, and better path's. ( we constantly making sure further away buildings are CLOSE ).

Next step: We generate the buildings we need ( labs, tower, extentions , etc...) on tiles in buildings list. based on other rules! (a.k.a labs would take 10 tiles with max range of 2 from each other or something like dat ). (storage & link would be in range of 1 from spawn ... )

supreme-spoon's People

Contributors

mike-tr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.