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

PACMAN level Help

Archive: 3 posts


Hi there people,

I'm in need of some help. I'm trying to make a pac man level and so far so good; I have been through many different versions of the levels and such things as PacMan and the Ghosts and got to a point where I was happy with it.

But now I have some time again to spend on improving the workings, I have already updated PacMan but am stuck when it comes to the Ghosts.

What I want them to do is to roam around the grid at their own will and then case PacMan when he comes close enough to them. This doesn't sound too complex and is something that I was able to do quite quickly but, I found that the Ghosts had a tendency to pause, either because the selector hadn't skipped on to the next direction or because it had worked itself into a corner.

So to combat this I am attempting to make them self aware! (O.O) I want them to move around the grid at their own will, but if they bump in to the side of the grid, say, on the right hand side of them then I want them to be unable to try to move right again and would try to move left, up or down.

If the movement leads to an impact again within a short amount of time, say if it was in the bottom right hand corner of the grid (so moving down), then it should then know not to try to move right (because of the first impact) or down (because of the second) and so on until it frees itself and continues roaming.

This would also have to be reset somehow to allow the ghost to move in any direction later on.

This is the set up I have currently:
38379

This is somewhat random at the moment in the direction it goes (which is good i guess) and is able to negotiate itself out of a basic maze but it still has pauses and can be known to get itself in to a corner and turn off - this would be solved by PacMan coming near it (via a different circuit).

So how can I make it roam without pausing all the time or re-impacting on the same side.

Thanks
(P.s. - University/College internet won't allow me access to PSN so I can't upload and work as a calaboration...which sucks)
2012-01-07 02:59:00

Author:
Unknown User


Would using Tags and Impact Sensors help? Maybe put a piece of Holo with a Red Tag on every right wall. Then a Yellow Tag on every Left wall and so on. Then, add another input to the AND Gates and have an Impact Sensor sense the respective Tag. Remember to invert the Sensor and allow touching since you're working with Holo.

Hope that helps just a little bit. If it doesn't, then I probably read something wrong... Anyways, good luck!
2012-01-07 03:16:00

Author:
Speedynutty68
Posts: 1614


I would attach invisible holo 'tendrils' to the ghost in four directions. Impact sensors on these will register collision with tagged walls (you would not need to separately tag north, east, south or west). You'd monitor the sensor of the one corresponding with the ghost's current direction of movement. When that sensor lights up, you'd then have to make logic pick a new direction out of the available ones (inactive impact sensors).

I don't have the logic for this at hand, but my description might be a start.

EDIT: there is a discussion somewhere in (probably) the help forums from long ago, I think from before summer, that discusses Pac Man and the A.I. of ghosts. It appears a simple game, but the ghosts A.I. is not that simple. You may want to hunt that topic down to get a clear picture.
2012-01-07 10:25:00

Author:
Antikris
Posts: 1340


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.