AI Bot Simulation

user_avatar Made by: RobinsonX


Share this project:

A beta test run of bots interacting with the environment and other bots! :D

The main goal of a bot is to eliminate all other bots who are not in their team and to survive.

There is a performance limit on this!
The system tries to minimize how much memory it can calculate, it will slow down as more bots are current in the scene. This is to prevent unexpected crashes and huge lag spikes, this memory limit can be changed in the behaviors of the project itself. (For example, one of the screenshots has a lower memory limit and reduces lots of lag, allowing LOTS of bots in the scene at once.)

AI Behaviors: These behaviors are executed depending on a bot's conditions.
• Fleeing - Bots run away from their enemies to survive.
• Teamming - A group of bots join together to form a strong group.
• Attacking - Bots will attack their enemies by shooting them.
• Idle - Bots will sometimes take a break, staying still. (Just to reduce lag.)
• Roaming - Bots have nothing to do, all they can do is walk anywhere. If bots don't know what to do, they start roaming.
• Following - Bots can just follow another's track.


Last Updated: September 21, 2022

Fixed some bugs and got some new changes!
+ Bots now have collidable hit boxes. (Collisions with other bots.) Can be disabled in the editing mode.
+ Bots now use emojis to express themselves. (Just for fun.) Can also be disabled in editing mode.
+ Organized the editing mode menu.

- Fixed the global settings output. (Lowest input didn't work)
- A little stability fix.



June 06, 2018

This is very cool! Great work, and really showcases clever use of behaviours to create some proper game AI. Also some of the stuff not relating to AI is cool too. Like the slider adjuster!

Couple of suggestions:

  • I'd work on the interface a little. I know it's not the point of the project. But hiding/showing some options would make this much more approachable. Maybe have a button that opens the config, and each parameter is grouped/behind other buttons.
  • For the AI it self, one thing I noticed is that the bots overlap with each other. I'd try to figure out some same team collisions so they don't overlap and give each other some space.

Awesome work so far!

June 06, 2018

:) Thank you!

I'll definitely work on things like this and improve it time by time!

June 04, 2018

Can you make I wanna be the boshy or something similar to it plz?

June 06, 2018

Well, I don't know what that is... Yet... Maybe soon... When I know what it is. :3

May 30, 2018

The fact that this project has only 1 like so far makes HP community fall in my eyes :'C

May 30, 2018

Yeah... I don't know why we're dying!

May 31, 2018

2 now. Reason I didn't like it straight away was because it was really laggy, like any more than 2 bots fighting each other and the FPS will drop below 60 (iPad Air). But I guess it's still good enough to give a like. 🙂

May 31, 2018

Pretty sure if I had the amount of bots in the far right picture this iPad would freeze and crash 😝

May 31, 2018

Same, but I think it still deserves a like as RobinsonX researches a very important aspect of complicated video games. Especially including the fact he did practically all bot mods needed, even teaming and roaming.

May 31, 2018

But yeah, there should be some way to reduce lags, otherwise such games won't even be playable :P

May 31, 2018

Well, the settings were at MAX, making the project pretty laggy... :3 It's goes on 60 executions per second per each bot, suprised HyperPad can handle such advanced and huge things. (I'm on iPad Pro, can handle up to 10 bots without lagging ._.) I should make an adjustable menu to regulate functions. :)

May 28, 2018


May 30, 2018

Yeah. :3

May 28, 2018

This is really cool! I was just wondering about some of your other games. Is there an easier way to generate random names for bots than writing like a whole page of coding? One more question, how do you get a character to shoot towards another character and how can you get a bot to move more realistically-not just from one side to the other. I am creating a MOBA game and the bots movement is very unrealistic. I want them to move as if they were being controlled with a joystick. It’s a top down game by the way.

May 28, 2018

I'm not RobinsonX, but I can probably help a bit 😛. If you want them to move like a joystick, you could try make them only allowed to move in the direction they are facing (object moves to itself but on a y anchor above 50%), then their AI tells them whether they are moving if not, and whether they are rotating or not (so you can also pick rotation speed). Generating a random name for a bot isn't too hard I think, depending on how you want to do it. Getting a character to shoot towards another is tricky though, I'm not sure how Robinson did it but I think I would have my characters or bots constantly broadcasting their position so that every other object knows where it is, then use some trigonometry to make one bot shoot at it (and some other logic to decide which one to shoot at).

May 30, 2018

There is an easier way to generate random names, use random letters and tiny phrases that can be in a name, the combine text behavior allows multiple letters and phrases to be put together. :)

I got a bot to shoot for another bot using a Loop behavior, the loop behavior checks for a group of bots and calculates each distance and attributes individually, It's better if you go within the project to see the behaviors yourself, they are in the global settings. (It may be a bit confusing, but I did label some things.)

To get a bot moving like an actual player, make sure the bot is Physical. The bot uses the Apply Force behavior constantly to move like an actual player. The movement is a complex thing, the force changes to make the bot move a different direction. The bot may go in all directions and randomly glitch, to fix this, all the bots need is Air Resistance.

May 30, 2018

Well, making a spawned object interacting with a spawned object is complex. :3

The object has to be in a group and have some attributes. (And by attributes, I mean like "Group", "Health", and "Speed". Things that define a character.)

And now this isn't using complex math calculations, this is using normal behaviors that one object will use to interact with another object. :) It's basically a looping behavior that executes all the bots and then another looping behavior that calculates distance, direction, and then the attribute. (Sees what team that bot is in.)

May 30, 2018

I'm mostly self-taught. If you are as curious of learning behaviors as me, you'd probably learn this looping function very quick. :)

I promise, you can use this for a variety of things. Knowledge is power!