darkforest-eth / client Goto Github PK
View Code? Open in Web Editor NEWDark Forest client
License: GNU General Public License v3.0
Dark Forest client
License: GNU General Public License v3.0
Add an option to checkmark (defaults to off) in the PluginManager to start plugin at game launch.
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
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
Hope to see my address 0x149f119543239d0b102bc60e80d0965232229234 on the leaderboard.
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
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)
Looking at the code in https://github.com/darkforest-eth/client/blob/master/src/Frontend/Utils/BrowserChecks.ts there is a prohibition for using mobile or tablet devices. Can someone explain why that is?
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.
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.
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.
Step 2: remove the biggest planet from the map file.
Step 3: Import the modified map file to a new account. the planet missing!!!
Step 4: Start mining, BUT CANOT FOUND THE PLANET AGAIN!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.