OgarProject / Ogar

An open source Agar.io server implementation, written with Node.js.
Other
718 stars 825 forks source link

Virus #349

Closed BaumanDev closed 8 years ago

ghost commented 8 years ago

go to gameserver.js then look for this line:

(splitSpeed, 32, 0.85);

then change 32 to a lower number. like 12 but where exactly did you put the split.ignoreCollision = true; function?

BaumanDev commented 8 years ago

@Agarian That would really help them separate quicker?

I put the split.ignoreCollision = true; under all the split functions, and it's not really a function to be honest, I just have a little supporter that helps the collision be turned back on when you're done splitting.

ghost commented 8 years ago

@NatsuTheGreat yes it would. it helped me so it should help you too :) but why is it that the split.ignoreCollision prevents some cells from colliding at all?

BaumanDev commented 8 years ago

@Agarian is the splitting smooth for you?

BaumanDev commented 8 years ago

@Agarian the collision is working out great I can tell you that. But now here's a problem, the distances.. the distances are making the splitting screw up and making it kind of rough.

BaumanDev commented 8 years ago

@Agarian If we are big, and we split the first time it's kind of rough too, So I am PRETTY close, but still things we need to modify.

BaumanDev commented 8 years ago

@Agarian If you can figure out the right distances, we can get even closer.

ghost commented 8 years ago

but why is it that the split.ignoreCollision prevents some cells from colliding at all? the splitting is smooth though. I see the following ignore collision lines: newCell.ignoreCollision (gameserver.js) this.ignoreCollision (playerCell.js) split.ignoreCollision (the first added one ) cell.ignoreCollision (another one to add) which one's should be true and which one's should be false?

BaumanDev commented 8 years ago

Well if you noticed that if you split 16 (which some people would do) some cells would like their merging, but they're not. I don't know if that happens with you, making it was a little mistake I made in the configuration.

ghost commented 8 years ago

it is happening to me as we speak! also i updated my other comment^

BaumanDev commented 8 years ago

So what i stated above is happening?

ghost commented 8 years ago

yes. also i didnt know these comments were realtime without refresh needed lol

BaumanDev commented 8 years ago

this.ignoreCollision = false; is what you have in PlayerCell.js right?

ghost commented 8 years ago

yes

BaumanDev commented 8 years ago

Any way you could show me?

ghost commented 8 years ago

capture

BaumanDev commented 8 years ago

I meant the game.

BaumanDev commented 8 years ago

Do you have skype?

ghost commented 8 years ago

capture

ghost commented 8 years ago

no but do you have discord?

BaumanDev commented 8 years ago

Hmm weird... I just removed my supporter and that still doesn't happen.

ghost commented 8 years ago

I'm about to start from scratch that's how annoyed with ogar i am right now.

BaumanDev commented 8 years ago

It is pretty annoying, I agree.

ghost commented 8 years ago

i'll do just that...

BaumanDev commented 8 years ago

Do you have email? I could send you what I have and you could see how it works out.

ghost commented 8 years ago

yes i have email.

BaumanDev commented 8 years ago

K I will send you it.

BaumanDev commented 8 years ago
    // Calculate mass and speed of splitting cell
    var splitSpeed = cell.getSpeed() * 6;
    var newMass = cell.mass / 2;
    cell.mass = newMass;
    // Create cell
    var split = new Entity.PlayerCell(this.getNextNodeId(), client,

startPos, newMass); split.setAngle(angle); split.setMoveEngineData(splitSpeed, 16, 0.85); split.calcMergeTime(this.config.playerRecombineTime); split.ignoreCollision = true; https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail This email has been sent from a virus-free computer protected by Avast. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Jan 1, 2016 at 5:09 PM, Agarian notifications@github.com wrote:

yes i have email.

— Reply to this email directly or view it on GitHub https://github.com/OgarProject/Ogar/issues/349#issuecomment-168354157.

BaumanDev commented 8 years ago

If you got the logo, sorry about that.

You could start from there if you wish to.

On Fri, Jan 1, 2016 at 5:10 PM, Ryan Berd ry4n.berd@gmail.com wrote:

    // Calculate mass and speed of splitting cell
    var splitSpeed = cell.getSpeed() * 6;
    var newMass = cell.mass / 2;
    cell.mass = newMass;
    // Create cell
    var split = new Entity.PlayerCell(this.getNextNodeId(), client,

startPos, newMass); split.setAngle(angle); split.setMoveEngineData(splitSpeed, 16, 0.85); split.calcMergeTime(this.config.playerRecombineTime); split.ignoreCollision = true;

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail This email has been sent from a virus-free computer protected by Avast. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#151ffe2dc6ca2dcd_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Jan 1, 2016 at 5:09 PM, Agarian notifications@github.com wrote:

yes i have email.

— Reply to this email directly or view it on GitHub https://github.com/OgarProject/Ogar/issues/349#issuecomment-168354157.

ghost commented 8 years ago

i really feel like im missing something because the splitting is no different.

BaumanDev commented 8 years ago

It's the collision that differenciates the splitting

ghost commented 8 years ago

i thought you would like send me the whole folder or something in a .zip maybe that would be easier in opinion cause at this point i've (almost) given up all hope

BaumanDev commented 8 years ago

I have a ton of other things modified. I don't think that would be too good of an idea.

ghost commented 8 years ago

if the customizations are in gameserver.ini i can handle it with a backup i have. and yes i have backup gameserver.ini's lol

BaumanDev commented 8 years ago

There isn't anything much to modify the splitting in gameserver.ini, besides I am pretty sure what I sent you is the only thing I modified to get better splitting.

ghost commented 8 years ago

well at this point i've given up all hope

BaumanDev commented 8 years ago

It's really hard to get the splitting to be like agar.io. Ogar's formula is very different from Agar.io, so therefore, there is a lot we have to change, but the probably is we don't know where. @AgarioCheats says he has the good splitting... I wish he could tell us though..

ghost commented 8 years ago

although I see the following ignore collision lines: newCell.ignoreCollision (gameserver.js) this.ignoreCollision (playerCell.js) split.ignoreCollision (the first added one @AgarioCheats told us to add) cell.ignoreCollision (another one @AgarioCheats told us to add) do you know which one's should be true and which one's should be false?

BaumanDev commented 8 years ago

newCell: false (not made for splitting)ore playercell: false (made for when you are split and the cells keep from overlapping when not merging.) split = true cell: I don't even have that one.. ( I don't know where to put it. XD

BaumanDev commented 8 years ago

It is way smoother for me...

ghost commented 8 years ago

I DON'T GET IT THE SPLITTING IS SMOOTH NOW BUT SOME CELLS STILL COLLIDE AND SPLIT REGULARLY

BaumanDev commented 8 years ago

That is what we need to work on.

ghost commented 8 years ago

that was the main thing i wanted to fix... i wasted my time... cell.ignoreCollision fixed it but caused my first problem...

BaumanDev commented 8 years ago

what is your first problem? And where did you put cell.ignoreCollision?

ghost commented 8 years ago

under cell.mass = newMass; looks like this:

// Calculate mass and speed of splitting cell
var splitSpeed = cell.getSpeed() * 6;
var newMass = cell.mass / 2;
cell.mass = newMass;
cell.ignoreCollision = true;
BaumanDev commented 8 years ago

what problem did that cause? the one where you sent me that picture of a green cell?

ghost commented 8 years ago

e7204c10-b0c2-11e5-9987-15bcda10abe4 yes in the pic. some cells would like their merging, but they're not.

BaumanDev commented 8 years ago

let me test it out. I will try to do something. I will tell you if it solves a little of something.

BaumanDev commented 8 years ago

I am simply amazed at how smoothly it works under 1,000 mass

ghost commented 8 years ago

ikr