playMaker

Author Topic: Pac Man Controller  (Read 2917 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Pac Man Controller
« on: August 29, 2017, 04:30:27 PM »
Hi!

I want to share my Pac Man controller I finally got working. :)
Maybe it can be useful for some people. I got a little bit help with the controller
from the example of Jean Fabre.

http://hutonggames.com/playmakerforum/index.php?topic=1334.msg73000#msg73000

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Pac Man Controller
« Reply #1 on: September 15, 2017, 03:31:12 AM »
Hi,

 pretty cool!

how did you create the maze and tile placement?

 Are you ok if I clean this up and distribute on the Ecosystem as a package? I think it will benefit a lot of people if they can see how it works.

there are few things that can be optimized, I'll list them here as I progress on this.

 Bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Pac Man Controller
« Reply #2 on: September 15, 2017, 06:13:48 PM »
Hi!

Thanks!
Normal I use SuperTilemapEditor to create the maze, but I didn't use it on the package I uploaded. I just placed them manually in the scene. Copy/paste. Just to have something to show. Not very good.

I'm very happy if you can distribute it on the Ecosystem, as long as you give my name on it. :)

If you increase the speed of Pac Man, it doesn't always register it when you change the direction. If you have any suggestion how to fix this, I would be very grateful. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: Pac Man Controller
« Reply #3 on: September 16, 2017, 09:13:23 AM »
Hey - very cool package, I tried something similiar myself and it wasn't nearly as sophisticated as this !

As you are distributing this as a Pacman controller you should tackle a solution for a very fundamental Pacman mechanic - once the player exits the maze on one side, he enters on the other side again. In your example scene the controller just continues to move into nothingnes. So you are looking at some sort of teleporter that lets pacman switch the sides of the maze once he exits it.

To the speed "bug" : I could replicate it by setting the speed to 20 and then going on the lowest part of the maze (the long track) and trying to hit the first way up (not the one at the end of the lane) - I never could do it at 20. If I lowered the speed to 19 I could always make it. Does it have something to do with framerate VS raycast update ? I have no idea.

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Pac Man Controller
« Reply #4 on: September 16, 2017, 02:45:35 PM »
As you are distributing this as a Pacman controller you should tackle a solution for a very fundamental Pacman mechanic - once the player exits the maze on one side, he enters on the other side again. In your example scene the controller just continues to move into nothingnes. So you are looking at some sort of teleporter that lets pacman switch the sides of the maze once he exits it.

Hi!
That's very easy to do. But this maze was just something I mixed up with, just to have something to show. :)

Quote
To the speed "bug" : I could replicate it by setting the speed to 20 and then going on the lowest part of the maze (the long track) and trying to hit the first way up (not the one at the end of the lane) - I never could do it at 20. If I lowered the speed to 19 I could always make it. Does it have something to do with framerate VS raycast update ? I have no idea.

Of course it can work better if you run the game in a build than in the editor.
I hope Jean Fabre or somebody else can find a solution for this. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Pac Man Controller
« Reply #5 on: September 16, 2017, 06:28:38 PM »
Here is a new version with a teleporter on the left and right side. :)

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Pac Man Controller
« Reply #6 on: September 16, 2017, 09:39:36 PM »
To the speed "bug" : I could replicate it by setting the speed to 20 and then going on the lowest part of the maze (the long track) and trying to hit the first way up (not the one at the end of the lane) - I never could do it at 20. If I lowered the speed to 19 I could always make it. Does it have something to do with framerate VS raycast update ? I have no idea.

But 20 is very fast. Maybe too fast. I also tried it. You don't have that much control in that speed. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no