Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 3    [LBP3] Help!!
#1

Intelligent sackbot-seek logic

Archive: 4 posts


I was testing this today, is a very early concept but i want to know a better approach for this. Is basically a MGS-like AI that reacts when the sackbot sees the player face-to-face (at a given angle and distance). Right now i remember barely details of how it works, but i will made an update the next time i play.

The approach i'm using here is this:

1.- The victim wi... I mean, the sackbot, will go from point 1 to point 2 and vice-versa on an endless cycle with a defined pause on each point, like real patrolling. After the counter ends, it will tell the sackbot to go to the other point, and reset the timer of the other sensor and vice-versa.

50350

2.- Add some player sensor with a fixed angle and distance for both Left and Right sides. These would serve as sackbot's sight to see the player on his way to the tags.

50351

3.- Now the main component of the logic: Hate. Since there's 2 possibe ways to see the player, 2 brain chips will be needed (for the sake of this example). And now, we need 2 NO gates and 2 Y gates, these will serve as a connection between the player sensors and the direction the sackbot is facing at (since is a fixed patrol, we know what direction the sackbot is going to look. Yes, with the Timers).

50352


Now is all set. Now i'm going to put an example:

Let's suppose that the Sackbot is going from point 2 to point 1 and the player is located on the sackbot's Right sight. The sackbot would not be aware of Sackboy's presence since it can't look back until it finish. The yellow color wires represent the logic path.

50353

However, if the player is located at the Left spot at the time:

50354


However -and this is where i need some advice- the disadvantages is everything else, since the Sackbot will reset his patrol if he accidentaly come closer to any of the points and will act as nothing had happend. What i'm trying to archieve is 2 things:

1.- The sackbot should have a more agressive pattern after the first encounter.
2.- The sackbot should start seeking random locations if loses sight of the player.

What is the best way to archieve this?



Please ignore this attachment.
2016-08-10 05:32:00

Author:
Autz
Posts: 10


1) The NOT gates aren't really necessary if you use the counter output, but that's preference so onto the next point!
2) I'm not sure what you mean by aggressive pattern, so I'll skip to your 2nd question. You could do this with tags that can be emitted, connected to an AND gate with the condition that it had sight of the player, and lost it, and the condition that a selector output is active for each emitter (hook up a randomizer to the selector and a different location for each). Considering LBP is 2.5, it probably will just be left or right movement, unless you want to make hitboxes for places it could jump and such. Realize this is a lot of work and I don't recommend it as you probably wont finishyour level this way.
3) Back to more aggressive- Maybe set the brains to make it walk faster?
2016-08-10 22:40:00

Author:
koltonaugust
Posts: 1382


1) The NOT gates aren't really necessary if you use the counter output, but that's preference so onto the next point!
2) I'm not sure what you mean by aggressive pattern, so I'll skip to your 2nd question. You could do this with tags that can be emitted, connected to an AND gate with the condition that it had sight of the player, and lost it, and the condition that a selector output is active for each emitter (hook up a randomizer to the selector and a different location for each). Considering LBP is 2.5, it probably will just be left or right movement, unless you want to make hitboxes for places it could jump and such. Realize this is a lot of work and I don't recommend it as you probably wont finishyour level this way.
3) Back to more aggressive- Maybe set the brains to make it walk faster?


Indeed. I tried the logic today and i erased a lot of chips that were useless (specially the counters and the NOT gates). Now the sackbots will execute an alternate pattern if the player is discovered and escape from their sight. However, there's a tag abuse with this logic only to make a simple thing (and also some minor problems regarding enemy sight).

I'm done for with this, but it was a good exercise.
2016-08-11 01:42:00

Author:
Autz
Posts: 10


It's definitely a lot of logic, but not a tag abuse. AI is just a lot of simple checks that require different tags. The setup is generally the most annoying part because LBP does not let you hide objects by tags which causes a cluttered workspace.2016-08-12 19:27:00

Author:
koltonaugust
Posts: 1382


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.