PacCam: Pac-Man controlled with your face

(eieio.games)

61 points | by bblcla 5 days ago ago

17 comments

  • namanyayg 3 days ago

    Hello again Nolen, fun game! Tried the single player mode on mobile, works well and fast :)

    1. Why is there no "map"? I was confused as I expected a fixed grid for pacman to be able to navigate in

    2. Why are the bots so much faster? It is difficult enough to track my own character to ensure its moving in the right direction, so the fast bots really sneak up on me and there's no way to avoid them

    • eieio 2 days ago

      Hi! Glad it works on mobile, this is the first time I've really tried to make something that worked on mobile and i was pretty nervous about getting it to work for everyone.

      1. I heard this a few times during playtesting, but I thought that having walls would just make the game too challenging; it's hard enough to move around as it is, and getting stuck on a wall would be no fun. I considered sticking people to more of a "grid" but didn't really see the benefit of that without having walls, felt like turning your head "up" and still moving to the right would be disorienting, and thought it would add some complexity to my engine, so I didn't.

      2. The bots are playing with exactly the same parameters as you! In fact, on average they should be slightly slower than a human that opens and closes their mouth at the "optimal" speed. The bot logic[1] is only capable of opening/closing a bot's mouth or changing the direction that they're facing, and then the same rules apply to them as a human.

      That said, the bots are...pretty good, at least until you get pretty used to the game. Maybe this is a mistake? I didn't have bots until a few days before launch; this was originally just a local multiplayer game, and I added bots to make it easier for my friends to test. Then I realized that bots were a straightforwardly good addition. But it might have made sense to spend some time adding bot difficulty levels or something - the fact that they can react quickly to information and that they don't struggle to turn their face at the right time makes them pretty good.

      That said I promise they're beatable :)

      [1] https://github.com/nolenroyalty/paccam/blob/main/src/BotStat...

  • fheisler 2 days ago

    Love it! I think we'd get along - https://github.com/everythingishacked/CheekyKeys

    • eieio 2 days ago

      Oh wow, I love this, thank you :)

  • satiric 3 days ago

    They say the video stays on your device. I have no reason to doubt them, but how would I make sure?

    • eieio 3 days ago

      hi, I'm the developer of this!

      The game does need to download a model[1] to do the face tracking, and right now that does happen after you enable your webcam[2]. but once that model is downloaded the game runs fine with wifi disabled

      alternatively the code is open-source (and linked on the page), so if you really wanted to you could check it out and then build it yourself: https://github.com/nolenroyalty/paccam

      [1] it uses mediapipe, an easy way to do face tracking in the browser https://ai.google.dev/edge/mediapipe/solutions/guide

      [2] it's a reasonable heavy download, didn't really want to put it on page load, although in retrospect it'd have given me a much more satisfactory response here!

    • GranPC 3 days ago

      You can disable your Internet connection after the game has loaded.

      • Timon3 2 days ago

        Remember to also check for data in localStorage, IndexedDB and so on. Service Workers can upload saved data after you closed the tab: https://developer.mozilla.org/en-US/docs/Web/API/Background_...

        Not that I doubt OP in any way, just in case you really want to be sure :)

        • GranPC 2 days ago

          Good call! I was gonna specifically say "close the tab before reconnecting" but totally forgot about SWs.

    • natpalmer1776 3 days ago

      Not use it at all. Outside of manually reviewing the code running in your browser, or a few other totally overkill measures, that’s the only real way to be certain.

      • neuroelectron 2 days ago

        You should be able to capture network activity to actually verify.

  • daotoad 2 days ago

    I wish there was some way to calibrate this.

    My webcam sits low on my desk (it's built into a laptop screen that is one of many) so it was almost impossible to look up without it saying "too far" and I had to curl around myself and hunch to get it to maybe register as looking down.

    I tried moving the display between monitors and that didn't help much.

    If I could calibrate what "straight ahead" is then I could maybe play the game.

  • itslennysfault 2 days ago

    Be nice if you could choose which camera to use. I have 3 plugged into my computer and it chooses the one that is pointing out my window and I can't find a way to change it to the one that is pointing toward my face.

    • eieio 2 days ago

      Yeah browsers have started adding better support for controlling this but it's super inconsistent! I'm working on some other webcam stuff, I think i'll make myself a little widget to make this easier to control

      (someone actually made an issue for this: https://github.com/nolenroyalty/paccam/issues/1)

  • mattygames 2 days ago

    This is fun! Except for the whiplash afterwards ;-)

  • podgorniy 3 days ago

    Beautiful and jawbreaking

    • magnetomax 2 days ago

      I think it should have disclaimer for people with TMJ issues.