Skip to content
/ OpenRA Public
forked from OpenRA/OpenRA

An implementation of the multi-agent pathfinding algorithm WHCA* in an open source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert.

License

Notifications You must be signed in to change notification settings

ia6382/OpenRA

 
 

Repository files navigation

About

This branch contains the implementation of the Windowed Hierarchical Cooperative A* (WHCA*): a multi-agent pathfinding algorithm, presented by David Silver in 2005 [1]. I chose to implement the algorithm in the OpenRA RTS game engine as a part of my master's thesis while studying at the University of Ljubljana, Faculty of Computer and Information Science.

Thesis Abstract

To solve the multi-agent pathfinding (MAPF) problem, a collision-free path must to be found for every individual in a group of agents. Over the years several MAPF algorithms were developed by researchers who claim their approaches are suitable for real-time strategy games. However, there appears to be a disconnect between scientific research and practical game development. Algorithms are being presented and tested without considering the crucial properties of a complex game environment. To determine whether MAPF really is a good approach to the games’ pathfinding problem, we implemented Windowed Hierarchical Cooperative A* (WHCA*), a seminal MAPF algorithm, in an existing real-time strategy game engine. We then compared it to the single-agent pathfinding approach, which is used by most games in the industry. Our experimental results show that our WHCA* implementation greatly improves the path quality and agent movement, can prevent congestion and solve difficult scenarios that the single-agent approach cannot. This comes at a price, as WHCA*'s search times are found to be too long for our use case, where even a slight delay is noticeable to the players. Despite this, we think MAPF has potential in game development. Discoveries presented in this work can be helpful for future research and game development.

Link to the full thesis: https://repozitorij.uni-lj.si/IzpisGradiva.php?id=141866&lang=eng.

Demo

A short video comparing our implementation of WHCA* to the default single-agent Local Repair A* (LRA*) algorithm:

demo video

References

[1] SILVER, David. Cooperative pathfinding. In: Proceedings of the aaai conference on artificial intelligence and interactive digital entertainment. 2005. p. 117-122.

Licence

Copyright 2020-2022 Ivan Antešić (ivan.v.antesic@gmail.com). Same as the whole OpenRA project, this source code is also free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For more information, see COPYING


OpenRA

A Libre/Free Real Time Strategy game engine supporting early Westwood classics.

Please read the FAQ in our Wiki and report problems at http://bugs.openra.net.

Join the Forums for discussion.

Play

Distributed mods include a reimagining of

  • Command & Conquer: Red Alert
  • Command & Conquer: Tiberian Dawn
  • Dune 2000

EA has not endorsed and does not support this product.

Check our Playing the Game Guide to win multiplayer matches.

Contribute

Mapping

  • We offer a Mapping Tutorial as you can change gameplay drastically with custom rules.
  • For scripted mission have a look at the Lua API.
  • If you want to share your maps with the community, upload them at the OpenRA Resource Center.

Modding

Support

  • Sponsor a mirror server if you have some bandwidth to spare.
  • You can immediately set up a Dedicated Game Server.

License

Copyright 2007-2020 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. For more information, see COPYING.

About

An implementation of the multi-agent pathfinding algorithm WHCA* in an open source real-time strategy game engine for early Westwood games such as Command & Conquer: Red Alert.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 83.1%
  • Lua 15.1%
  • Shell 0.6%
  • Objective-C 0.3%
  • Makefile 0.3%
  • NSIS 0.2%
  • Other 0.4%