Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
/ sourcebots Public archive

Artificial intelligence to create Bots in Source Engine.

License

Notifications You must be signed in to change notification settings

kolessios/sourcebots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SourceBots

SourceBots is an AI system to create Bots (CPU controlled players) for the Source Engine in a similar way to the NPC's AI.

SouceBots can be implemented in:

⚠️ Although the code works, this code is part of the first C++ project of the developer and it has several optimization problems. Not suitable for production use.

⚠️ This project is not actively under development but PR's are welcome.

🌎 Most of the comments and debug messages are in Spanish.

🍕 Features

  • Create Bots and program their AI with a code similar to the NPCs AI.
    • 🔗 Each set of tasks is separated into "schedules".
    • 🔗 Each schedule executes tasks (actions to be performed by the Bot) from top to bottom.
    • 🔗 Each schedule has interrupt conditions, the conditions are obtained in each frame according to the Bot status.
    • 🔗 Each schedule has a level of desire. The Bot will start the schedule with the highest desire and will try to finish it (if no interruption condition occurs).
    • 🔗 If necessary, you can add or modify the operation of the tasks in each schedule.
  • 🔗 Movement, vision, memory and others are componentized. You can add or remove capabilities according to the type of Bot you want to create.
  • 🔗 Move to entities or vectors using the Navigation mesh.
  • Aim to entities or vectors.
  • Detection of friends, enemies, neutral targets and objects such as weapons.
  • 🔗 Ability to prioritize enemies.
  • 🔗 Create squads and make decisions respecitively.
  • 🔗 Hitbox detection and customization of the "preferred" hitbox when aiming.
  • 🔗 Memory system to store information such as strings or numbers as well as positions of visible entities, including enemies and allies.
  • 🔗 Easy configuration depending on the difficulty of the Bot.
  • 🔗 Map entities to create Bots in events, highly customizable.

📖 How to start

The wiki has some help documents including installation and initial configuration.

🧪 TODO

You can find all comments with the word TODO, try to fix as many as you can!

Some of them:

  • Optimization problems.
  • Detect and fix memory leaks.
  • Navigation problems.
  • Melee weapons
  • Doors
  • Make the code easier to read.
  • Add English comments.
  • Being able to use the AI in NPC's (Like NextBot)

🎬 Videos

You can watch this YouTube playlist to see examples of Bots and a bit of the history of the project's development.

📞 Contact

You can contact me at:

About

Artificial intelligence to create Bots in Source Engine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages