Coder Social home page Coder Social logo

where i can change that about multiogarii HOT 24 CLOSED

m-byte918 avatar m-byte918 commented on August 16, 2024
where i can change that

from multiogarii.

Comments (24)

ZfsrGhS953 avatar ZfsrGhS953 commented on August 16, 2024

https://github.com/Megabyte918/MultiOgar-Edited/blob/master/src/GameServer.js#L1312
Change 780 to whatever you like

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

i mean the reach
To blow up a player
not the reach of explotion..

from multiogarii.

ZfsrGhS953 avatar ZfsrGhS953 commented on August 16, 2024

The line I highlighted is the distance of a virus shot, not the distance of explosion.

from multiogarii.

m-byte918 avatar m-byte918 commented on August 16, 2024

@RelTakeover Viruses, ejected cells, and players all use the same eat distance. But if you would like to change that you can do something like this under the resolveCollision function in GameServer.js:

var eatDistance;
// Eat distance for viruses
if (minCell.cellType == 2 || maxCell.cellType == 2) { 
    eatDistance = maxCell._size - minCell._size / 3;    << change the "3" to any number you like
// Eat distance for anything else BUT viruses
} else {
    eatDistance = maxCell._size - minCell._size / 3;
}

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

i want change only virus reach

from multiogarii.

m-byte918 avatar m-byte918 commented on August 16, 2024

That is the reach.

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

with this configuration the reach is soo hig

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

please answer me @Megabyte918

from multiogarii.

m-byte918 avatar m-byte918 commented on August 16, 2024

@RelTakeover What do you have the number set to? If it's too high just lower it

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

this code not working

var eatDistance;

// Eat distance for viruses
if (minCell.cellType == 2 || maxCell.cellType == 2) {
eatDistance = maxCell._size - minCell._size / 0.000000000000000000000001;
// Eat distance for anything else BUT viruses
} else {
eatDistance = maxCell._size - minCell._size / 0.000000000000000000000001;
}

with value of 0.000000000000000000000001; is higher than the original code with value of '3' , why?

from multiogarii.

ZfsrGhS953 avatar ZfsrGhS953 commented on August 16, 2024

Increase it instead of decreasing it.

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

sure? i will try

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

Still the same, it seems that even if the value changes, nothing changes

from multiogarii.

ZfsrGhS953 avatar ZfsrGhS953 commented on August 16, 2024

Increase it to a very big value, like 100

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

sure? i will try

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

dont working..

from multiogarii.

m-byte918 avatar m-byte918 commented on August 16, 2024

@RelTakeover works fine for me, what are you trying to get at? make the eat distance larger? smaller?

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

larger

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

With this, you will not have to get too close to the virus for popsplit

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

with value of 3000000 same distance , the code dont work :(

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

you are sure that the code is correct?

from multiogarii.

m-byte918 avatar m-byte918 commented on August 16, 2024

@RelTakeover It does increase the eat distance, but if you would like to increase it more you can do:

// check distance
var eatDistance = maxCell._size - minCell._size / 3;
    
// custom eat distance
if (minCell.cellType == 2 || maxCell.cellType == 2) {
    // eat distance for viruses
    var distanceMult = Math.pow(eatDistance, 3);
} else {
    // eat distance for anything BUT viruses
    distanceMult = Math.pow(eatDistance, 2);
}
if (manifold.squared >= distanceMult) {
     // too far => can't eat
    return;
}

from multiogarii.

ZfsrGhS953 avatar ZfsrGhS953 commented on August 16, 2024

Just change this line to:

if (manifold.squared >= eatDistance * eatDistance && minCell.cellType != 2) {

from multiogarii.

RelTakeover avatar RelTakeover commented on August 16, 2024

thanks @Megabyte918

from multiogarii.

Related Issues (20)

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.