-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Ian Tayler <iangtayler@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,41 @@ | ||
# FBSim | ||
|
||
Some kind of football-related strategy game written in Rust. | ||
Game-like football simulation environment for trying out AI ideas, written in Rust. | ||
|
||
I wrote all of this in my free time to learn a bit about Rust and game development. The code is very scarcely documented and there is no testing at all. Consider yourself warned. | ||
|
||
## Instructions | ||
|
||
To load this install amethyst's dependencies and then do: | ||
|
||
``` | ||
source env.sh | ||
source env.sh # Needed because of a bug with rendy in vulkan. | ||
cargo build | ||
``` | ||
|
||
You may need to change amethyst's features in the `Cargo.toml` file if you're not on linux! | ||
|
||
You can use `cargo run` to run it. | ||
|
||
## Agents | ||
|
||
Currently this only implements a `Basic` engine, where all players but the defender and the goalie run after the ball, and `BasicWingWait` which is (just a bit) slightly more complicated. | ||
|
||
## Adding a new agent. | ||
|
||
If you want to write your own engine, the way to do it is: | ||
|
||
1. Create a structure implementing the trait `src/engines/engine.rs::Engine`. (Look at `src/engines/basic.rs` implementations as a guide) | ||
2. Add it to the default engine registry in `src/resources/engine_registry.rs::EngineRegistry::default`. | ||
3. Modify `assets/sprites/player.ron` so that `entities.data.extras.player.robot.logic_module` is `EngineRunner("<registered_name_for_your_engine>"). | ||
4. Run `cargo run` and see your agents play against the default `Basic` engine! | ||
|
||
## Roadmap | ||
|
||
- Implement Reinforment Learning-based agents. (What I did this all for). | ||
- Add support for implementations in a scripting language. | ||
- Add more game-like features? | ||
|
||
# Copyright | ||
|
||
Copyright Ian Tayler <iangtayler@gmail.com> 2020. Licensed under the [MIT license](/LICENSE). Use and distribute without restriction, according to the license text. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters