GithubHelp home page GithubHelp logo

squarerfive / bf3-bots Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 3.0 5.77 MB

AI mod for BF3, preserving the game and reviving the Battlefield 2 experience.

License: MIT License

Python 40.83% Batchfile 0.08% JavaScript 1.55% Vue 20.70% TypeScript 5.86% Sass 0.25% HTML 0.16% Lua 30.58%
battlefield venice-unleashed bf3 bf3-bots

bf3-bots's Introduction

bf3-bots

AI mod for BF3, this is an attempt to recreate BF2-like bots.

This mod is currently in development, some features may not function as intended (such as project export).

✨ Released: Version 0.0.4

✨ Master Branch: Features

  • AI Teamwork
    • Bots can provide each other ammo or health (when they are at a critical state).
  • Conquest, Conquest Assault, TDM and Domination support.
    • Rush, CTF will soon be supported
  • Multi-layer navigation mesh.
  • DFAstar++ (highly optimized solution), and AStar pathfinding. Falling back to the latter if distance fields are not generated.
  • Multiple tools to determine navigable parts of the map (all of these can work together):
    • Automated score-based navmesh generation (fast).
    • Path recorder, where the player can record their movements which modify the bias value on the nav mesh.
    • Map Editor, draw vector features to determine what areas are navigable and what aren't. Fairly similiar logic to the path recorder.
    • Automated voxel DF based navmesh generation (slow, but generates a more precise mesh).
    • Automated voxel depth based navmesh generation (fast).
  • Work in progress vehicle controller, quite simple logic to allow the bots to get in a vehicle and drive to an objective by smoothly following a path.
  • Loadout and asset manager, you may define what weapons, gadgets, melee and appearance related items are available for each slot in each kit. These can also differ for each map.
  • Custom spawn points
    • Spawn points can be added for each team which the bot spawner will attempt to use. Otherwise they are spawned randomly around an objective.
  • Runtime bot configuration
    • Modify the accuracy and aim offset of the bots, where the changes will propagate instantly.
  • Extensible framework [need to document]
    • The behaviour of the bots are separated into "orders" and "actions", the tasks can be assigned to each of the actions.
  • Variable response times
    • The interval where the paths and actions of the bots can be set by using the --interval parameter for startcomputetask.

🖥 Requirements

  • Battlefield 3 and Venice Unleashed

⛏ Installation

NOTICE: These binaries will be available on the 0.0.4 release. (currently version is 0.0.4alpha2)

  1. You will need to open up two instances of CMD/Powershell for this.
  2. Start the AI Server ./dist/AIHelper/AIHelper.exe runserver --noreload
  3. Start the AI compute background task: ./dist/AIHelper/AIHelper.exe startcomputetask
  4. Copy the directory 'bf3_bots_mod' into your BF3 server mods folder (ie, MyServerInstance/Admin/Mods/), then add bf3_bots_mod to your ModList.txt file.
  5. Start your VU/BF3 server, hold down F1 in-game to focus on the UI. Create an account by registering (this is to prevent random players from messing with the settings).
  6. On the top-left of the screen, open the menu and click 'Set Active' on the BF3 Bots Mod 0.0.4 project.
  7. The wiki is frequently updated, please read through it if you are unsure on the setup process.

🖥 System Requirements

  • CPU: Intel/AMD @3.5GHz - 4 cores 8 threads minimum
  • RAM: 8GB RAM, nav-mesh on large maps are at-least 512MB
  • HDD: 20GB Free
  • Display: 1280x720. Lower resolutions may work but it's not supported.
  • Typically most mid-range hardware after 2014 should be able to run the mod.

UI

Notes

It is recommended to use a resolution above 1280x720.

🛠 Contributing

  • You will need NodeJS installed, then install yarn: npm install yarn -g
  • Inside the navigation folder, run yarn
  • Then to start it locally, run quasar dev
  • Build it by running quasar dev, where the built site is located in /dist/spa/
  • When compiling it with vuicc, you will need to point it to that folder.

bf3-bots's People

Contributors

squarerfive avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bf3-bots's Issues

Blaze Server Compatibility

I see this is for VU only, is there any chance of it being supported on a normal blaze server like on this portable server project? Would be nice to have bot support for a fully "offline" setup.

Fix conflicting bot states

Ensure they are only set from the server, and reset once the soldier dies. Otherwise, the bots would just idle.

AIServer Packaging

Packaging with all dependencies now works. Need to test on my other PC.

noreload parameter must be passed otherwise it will not start

./dist\AIHelper/AIHelper.exe runserver --noreload

Add support for more gamemodes

Multiple gamemodes for a level will need to use the same navmesh,

Gamemodes to implement:

  • Conquest/Conquest Assault
  • Rush
  • TDM
  • SQDM
  • CTF
  • GM

Behaviours to implement:

  • Get out of vehicle once at objective
  • Defend flag carrier (CTF)

General Stability

To be fixed before 0.0.5:

  • Ensure navigation/combat is standard across all levels
  • Reduce memory usage, switch array dtype to 32bit (float32, int32), allocate resources on demand.
  • Clear bots on level reset.
  • Reduce behaviour cycle latency [try to query once for all bots]
  • DFAstar++ to prefer recorded (known) paths
  • Fix random crash on CQ (clone destination)
  • Load navmesh on level change

Commander mode

Can use my existing map editor, and just tweak it to show all players with unique colours for each squad, with some interaction to set orders at a position.

Lightweight mode

Implement a 'lightweight' mode where various paths from the navmesh and other player recorded paths are cached and used instead. Allowing users with lower-spec pc (<4GB RAM) to use the mod.

0.0.4 Release

  • Document Installation Process: #12
  • Bots to emit and provide when below a certain health or ammo threshold. #3
  • Query all vehicles from the map, bot will pick the closest one to enter automatically. #6 [moved to 0.0.5]
  • Ensure this is fixed, and document how it was fixed. #1
  • Improve pathing so bots don't get stuck on large objects #15
  • Fix random firing, bots should only be firing at enemies (or melee attacking an obstacle).

Map Editor

  • Add Layer Controls
  • Drawing tools
  • Path evaluator
  • Reproject after editing vectors
  • Add custom CRS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.