2 Attachment(s)
PacMan engine using MoveIt
I think this should be a pretty decent PacMan movement engine.
Uses MoveIt object and 4 detectors.
If you are moving along a path and press a new direction but that direction is blocked, it will move in that direction as soon as it becomes possible.
It is entirely grid-based, but I added code to allow you to turn 180 degrees whenever you want.
*edit*
Very small glitch found:
If it is possible for example to go both down and right and you then press right and then down immedeatly after, it will make pacman stop.
Not a big bug though, you can easily fix it by resizing the up-down detectors to be 30 pixels wide and the same with the left-right detectors height.
Re: PacMan engine using MoveIt
Great Job! Thank you Andos :D
Re: PacMan engine using MoveIt
Another bug is the hammering of the arrow keys when Pacman is turning a corner can cause him to semi-overlap the backgrounds. It's nice, I'm wondering if there is an easier way to do it though.
Re: PacMan engine using MoveIt
I noticed a bug, that makes it so you can turn pacman way before a path turn. If you are traveling up, and press left way before the next turn, pacman will still turn. It isn't supposed to do that in the real game.
Re: PacMan engine using MoveIt
Quote:
Originally Posted by YankovicFan
I noticed a bug, that makes it so you can turn pacman way before a path turn. If you are traveling up, and press left way before the next turn, pacman will still turn. It isn't supposed to do that in the real game.
I believe it does, and that was purposefully thrown in there.
Re: PacMan engine using MoveIt
Yes that was the entire idea of it. Otherwise it will be completely impossible to hit turn at the exact time. Maybe there is a timeout in the real pacman I don't know.
Re: PacMan engine using MoveIt
I have some real pacman games, and you have to press the turn button pretty close to the turn, but if you do it farther back, pacman won't turn when it comes time to turn.
Re: PacMan engine using MoveIt
If you want to make this engine behave like that, just add an event that resets the alt-value 'nextdir' when it comes to a stop (after it decides to turn or not).
That way it will forget after 1 bricks distance of movement.
Re: PacMan engine using MoveIt
bug- goes through walls when doing 180 turn.
to replicate - just press right then left immediately when you start it.
2 Attachment(s)
Re: PacMan engine using MoveIt
(Sorry for the thread necromancy)
I tried this out, to see if I could make it work with a more traditional level layout. All I did was changed the way pacman looks and alter the detector events to look for a different object for the walls.
I hit run and, bam, nothing works. I am not familiar with MoveIt, but I would assume simply changing the objects shouldn't break the entire program.
I'm not sure what is going on with this, does anyone else have any advice?
Thanks :)