Closed ghost closed 8 years ago
Simple to do, but almost all of us want to stick to one size.
ok then. But if it is simple can you tell me how to do that?
In GameServer.js
, find this line:
GameServer.prototype.spawnFood = function() {
then edit the next line which goes
var f = new Entity.Food(this.getNextNodeId(), null, this.getRandomPosition(), this.config.foodMass);
into
var f = new Entity.Food(this.getNextNodeId(), null, this.getRandomPosition(), this.config.foodMass * Math.random() >> 0);
Math.random()
function will generate a double from 0 to 1, and accompanied with a multiplier, ex. 50, will generate you a number from 0 to 50. >> 0
will round the number.
thank you :)
I have a suggestion for this. It is to add the ability to have more than one food size at the same time. I see this on a website called: petridish.pw. In hardcore ffa/exp, Those servers have food sizes ranging from 1-50 all on the same server. That would be a cool feature in opinion.