Giter Club home page Giter Club logo

client's People

Contributors

actions-user avatar github-actions[bot] avatar gubsheep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

client's Issues

getPlanetsInRange() - faster

I wrote my own very simple function to get planets in range and compared it to the default one,
The custom simple one is 3-4 faster, but maybe its not as good somehow? maybe i did something wrong

function getRange(planet, percentEnergySending = 100) {
    if (percentEnergySending === 0) return 0;
    return Math.max(Math.log2(percentEnergySending / 5), 0) * planet.range;
}
function getDistance(p1, p2) {
    let x = p2.location.coords.x - p1.location.coords.x;
    let y = p2.location.coords.y - p1.location.coords.y;
    return Math.sqrt(x*x + y*y);
}
function perfTest() {
    var planetId = "*put your planet id here*";
    var planet = df.getPlanetWithId(planetId);

    let ds = new Date();
    let l = df.getPlanetsInRange(planetId);
    let de = new Date();
    console.log("planetCount: "+l.length+" time: "+(de.getTime()-ds.getTime()))

    let xs = new Date();
    let allPlanets = df.getAllPlanets();
    let arr = [];
    let range = getRange(planet);
    for (var p of allPlanets) {
        if (!p.location) continue;
        if (!p.location.coords) continue;
        if (getDistance(planet, p) < range)
            arr.push(p);
    }
    let xe = new Date();
    console.log("planetCount: "+arr.length+" time: "+(xe.getTime()-xs.getTime()))
}
perfTest();

output:

planetCount: 16804 time: 54
planetCount: 16804 time: 17

[ERROR] An error occurred: RangeError: bad Memory initial size

Hi!

I got a key for the v5 game, and am encountering an error when I try to play. I am able to load an account Dark Forest recognizes, and the key I received is recognized. I get to the part where the client is looking for a home planet for me, and then the output looks like this:

Hashed 2048 potential home planets...
Hashed 4096 potential home planets...
Hashed 6144 potential home planets...
INIT: calculating witness and proof
[TX ERROR]: bad Memory initial size
[ERROR] An error occurred: RangeError: bad Memory initial size

I've tried twice so far. Any thoughts?

Just in case it's relevant: I'm on Firefox 78.6.0esr (64-bit)

Issue with map import

I found a issue with map import function. When I import a map with a planet removed, the planet missing forever, the miner cannot found it again.
Step 1: export the map with a selected range.
截屏2021-07-20 下午10 55 07
Step 2: remove the biggest planet from the map file.
截屏2021-07-20 下午11 00 43
Step 3: Import the modified map file to a new account. the planet missing!!!
截屏2021-07-20 下午11 02 48
Step 4: Start mining, BUT CANOT FOUND THE PLANET AGAIN!!

default.mp4

move() docs clarification

In the GameManager docs move is described to take a move(from, to, forces) as the first three argument. The forces keyword isn't used anywhere else. I'm guessing it means Energy? If so, docs should likely be updated to reflect that for consistency.

Foundries lose ownership

Sometimes foundries i already claimed appear to have no owner, as soon as i send energy to them they update and show that i am already the owner (long before the energy arrives)
Other people in discord have also experienced this bug.

BUG with twitter rebind.

I double-checked, and the most important problem now is that after I rebind Twitter to my new address, my new address cannot be found here https://api.zkga.me/leaderboard

0x149f119543239d0b102bc60e80d0965232229234
image

And in fact, my Twitter is still pointing to the old address:0xb00d51d3992BC412f783D0e21EDcf952Ce651D91

I gave a planet to my Twitter address, and it proved that I and I are different now. I can’t find my new account in leaderboard and everything else is normal. Before I rebind my new address 0x149f to my old Twitter, I can still access https://api.zkga.me/leaderboard find my address 0x149f
image

Hope to see my address 0x149f119543239d0b102bc60e80d0965232229234 on the leaderboard.

image
image

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.