Discussion: Contract system

  • @tedivm said in Discussion: Contract system:

    I'm on vacation so I'm not following this daily. However, if automation is being completely ruled out than it is my personal opinion that development time would be better spent on some of the already announced features (power creeps, arena) instead. Without some way to verify and automate contracts it means people will have to setup a lot of bootstrapping and custom code for each contract, as well as a lot of code review, and honestly I don't think many people will engage in that.

    Having some type of "contract catalog", "standard library", or "written by" verification would make this system far more usable, and without it I think this feature would be very niche.

    Agreed 10x, the ROI for both Devs and players is very low without automation built into the design. Many more exciting & powerful features in the pipeline, I think this idea needs to bake for a while still.

  • @shedletsky said in Discussion: Contract system:


    I don't think it is off topic. My feedback on contracts is that while they may be intellectually interesting, I think no one will use them and I would rather the dev team spend its very limited time working on things that either make the game more playable (performance) or more fun (new units/buildings to script).

    A better way to implement the same thing contracts are driving at would be to let people buy/sell CPU ticks on the market. Then there would be some liquidity and a marketplace. Without both, this feature is dead on arrival.

    My 2c

    Honestly this... Contracts are a feature we don't need and majority won't use.

  • This sounds cool to me. A few thoughts if someday this revives:

    1. For the folks asking for 1st class support of parameters that are distinct from the contract, I think the community can build that capability without needing anything extra from @artch. Just define a community convention that contracts look something like this:

       const parameter =
       { "arbitrary", "json", "here" }
       // -- END PARAMETER -- 
       module.exports.loop = ...

      Instead of thinking of contract string as code (which it still is), think of it as a serialization format for a tuple (parameter, contractTypeId). This format can be both programatically formatted and parsed/validated. For example parse/validation looks like this:

      a) The string starts with "const parameter =" and contains somewhere "// -- END PARAMETER --"

      b) The string in between those two is a valid json object

      c) The string after "// -- END PARAMETER --" hashes to a SHA512 that you recognize, presumably from a white-list of contracts you have manually vetted before inserting them in your AI.

      d) Based on recognized code SHA512, validate the parameter object conforms to any additional input requirements for a contract of the given type

    1. I'm definitely in the camp that probably wouldn't use this unless contract issuance and acceptance was automated. I think of this similar to an advanced terminal. I'd have to write code to decide when it is appropriate buy ghodium, but once that code is written my AI can buy/sell ghodium automatically indefinitely into the future. If the community defines a new contract called PAY_FOR_A_NUKE I'd have to code my AI to determine when its appropriate to issue/accept PAY_FOR_A_NUKE, and now its automated. Working with the PAY_FOR_A_NUKE contract, given an comunity supported OSS code base that wraps it in a terminal-like API, doesn't seem much harder to automate than the game's actual Nuker or Terminal. I don't believe that contracts in general are unautomatable snowflakes even if some subset of them are.
    1. I don't see how you would avoid needing to run contracts in an isolated VM, otherwise the contractee can cheat. The isolated VM would presumably could still charge its cpu/memory usage to the contractee, as well as have some access to the contractee's game objects and memory.

    2. As an alternative to formal contracts, you might encourage players to make informal contracts that they have to police themselves. Public segments already provide a communication system for arranging deals, but I think it would currently be tough to monitor a deal, or to provide payment. Those issues might be resolved via an API that shares visibility of a room with another player, and with an API for private terminal transactions. Its probably a lot cheaper to implement than contracts, but it also probably wouldn't facilitate as much deal making, especially among untrusted parties.

    1. Priority relative to other things - I'm neutral. Contracts sounds like a feature that would offer a cost-to-coolness ratio similar to other things I've heard you might be working on.

  • This seems like an idea that would be fun to program for the devs, but not very usable in practice. If this is added to your todo list, I hope it will be with the lowest priority possible, there are so many other things that would be better to spend your time on. Just my opinion.