![]() ![]() Movement is not allowed again in that direction until the crowd members have moved back in the opposite direction. How to prevent players moving too far left and right off the edges of the platform without being squashed together - If moving left / right and any crowd member hits the boundary then movement in that direction is immediately halted.How to space the players without them stacking on top of each other - Now and again I run a method which walks the crowd and pushes them down into the floor this usually spreads all crowd members out.How to allow the player to accumulate many hundreds of players in play - I solved this by having two types of crowd member, one that represents 10 points and another that represents units, so for example a 59 crowd score will be represented by 5 large crowd members and 9 small crowd members. ![]() ![]() Note that this target point can point to anywhere so the same code is used to target towers, enemy crowds and bosses. How to clump players together - An average crowd position is calculated each frame (roughly the center), all crowd members will attempt move towards that point, collision will prevent them overlapping.This game was fun to create as it involved solving a few technical challenges including: My take on a the popular Crowd Masters Stickman style game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |