Fuzzy logic methods can be used for defining collective behaviour of a group of agents. Defining the rules with fuzzy logic is visually simple and the resulting behaviour is quite natural. Tools that offer such methods for defining collective behaviour have been in use in film industry for some time now. But when we look at game development, specifically in public game engines, we don't find them yet. In this master's thesis we develop a framework for Unity game engine that offers visual programming of collective behaviour. It consists of three major components: an editor for visual programming of behaviour, a component for setting the agent properties and a component for managing behaviour computation settings. We test the framework on three Boids models: flight of a flock of birds in 2D and 3D space, and people walking towards a common goal, through a field with obstacles. We measure the efficiency of behaviour computation on flocks of birds models. We measure the frames per second at different behaviour computation settings. The size of the group of agents, at which the simulation runs at 60 frames per second, is 300 in 2D space and 200 in 3D space.
|