User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: PacMan engine using MoveIt

  1. #1
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(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.
    Attached files Attached files

  2. #2
    Clickteam Clickteam
    Nico's Avatar
    Join Date
    Jun 2006
    Location
    France
    Posts
    2,543
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: PacMan engine using MoveIt

    Great Job! Thank you Andos
    --------------------------------------
    Nicolas "Nico" Sourdeval
    Clickteam

  3. #3
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    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.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Eliyahu's Avatar
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  8. #8
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    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.

  9. #9
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,062
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    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.

  10. #10
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2007
    Location
    Phoenix, Arizona, USA
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(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
    Attached files Attached files

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Pacman movement example
    By Jacob in forum File Archive
    Replies: 25
    Last Post: 26th May 2011, 12:34 PM
  2. Pacman
    By nivram in forum File Archive
    Replies: 5
    Last Post: 2nd May 2009, 10:32 PM
  3. Any got Pacman?
    By kaiser37 in forum File Archive
    Replies: 2
    Last Post: 7th November 2007, 07:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •