Open GoogleCodeExporter opened 9 years ago
Each zombie could calculate their own knock back based on nearby humans and
zombies. Its knock back is scaled by this multiplier: zombies / humans
If there are many humans and few zombies the knock back will be lower. And when
opposite it will be higher.
The multiplier formula might need some tuning or correction.
Original comment by richard.helgeby@gmail.com
on 13 Dec 2010 at 9:59
That formula doesn't apply if there is 1 zombie vs 1 human.
Original comment by richard.helgeby@gmail.com
on 13 Dec 2010 at 10:29
To get nearby players (for each player): Loop through all other players and
calculate the distance. Get those within the range and cache it.
Worst case scenario with 64 players: 64 * 64 vector calculations (4096) every
second or maybe every half second.
Profile test: Make a test plugin with dummy vector arrays with random
positions. Measure calculation performance for 64 players.
Original comment by richard.helgeby@gmail.com
on 13 Dec 2010 at 10:49
Original issue reported on code.google.com by
richard.helgeby@gmail.com
on 16 Apr 2010 at 12:04