AI learns to play PACMAN || Part 1 the making of Pacman

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 1.1K

  • @CodeBullet
    @CodeBullet  6 ปีที่แล้ว +409

    Source code is up so check it out
    github.com/Code-Bullet/PacmanGame

    • @painplayer1614
      @painplayer1614 6 ปีที่แล้ว +9

      You are a genius and I respect you highly. Dare I ask if you could do an ai for lunar lander or centipede sometime in the future? I'd be very interested in how someone would program that and I know you can do it

    • @dzjad
      @dzjad 6 ปีที่แล้ว +7

      Looks like you could use a parent class for the ghosts... Does Processing support inheritance? It looks very c++-like... But I haven't heard of it before (and haven't done my homework on it). This would prevent the copy/pasting of general features.

    • @isteinsvik5995
      @isteinsvik5995 6 ปีที่แล้ว +1

      Have you seen the Berkely AI materials on pacman? They have the framework for pacman in python on their website.
      I used the code to make hellish AI for the ghosts. I used A* and make the two ghosts always try to get on opposite sides of Pacman, fun times.

    • @Templarfreak
      @Templarfreak 6 ปีที่แล้ว

      @dzjad I've tried to set up a parent class for it in that code but either Processing or Java just has some severe limitations that make it a real headache to do it. Children appear to use the Parent's values when it runs the Parent's code, regardless of what you set the same variables in the Child to, so you have to have a bunch of Abstracts and/or external code to set these values ( external from the Parent and the Child) anyway which makes having a Parent class largely pointless unless you migrate most of the code such as the pathfinding, node finding, movement, and other things, to their own classes and run the code per Child class, but that would basically require completely recoding the entire thing and that's well beyond my skill level.

    • @Templarfreak
      @Templarfreak 6 ปีที่แล้ว +1

      A* is a pretty light algorithm for this few of objects pathfinding, though, so I wouldn't doubt it couldn't run on the hardware of the time. To top it off, the size of the code is still under 256KBs (despite nearly reaching it) which means it could also fit in the memory of the hardware at the time as well though it would be missing sounds, music, and most of the graphics, as well as the title, the score screen, and level progression, plus you also have to have the entirety of Java with this so... If you were to include all of that it might make it a bit too big for the time (Multiple sources of memory wasn't uncommon for MAME cabinets, but it definitely made it a lot more expensive and there usually was never more than 1MB of RAM if it even got that high)
      As I was looking through the code, it did seem a bit over-engineered to me TBH.

  • @Ilikeoreos47
    @Ilikeoreos47 5 ปีที่แล้ว +276

    I can't actually believe there was a time when a Code Bullet video wasn't just him shouting obscenities and losing his sanity

  • @gregoriocervejeira3600
    @gregoriocervejeira3600 6 ปีที่แล้ว +1153

    Don´t bully Clyde, he is trying!

    • @scoutiano4441
      @scoutiano4441 6 ปีที่แล้ว +31

      Gregorio Cervejeira HE IS TRYING HIS BEST, OKAY?

    • @JorgetePanete
      @JorgetePanete 6 ปีที่แล้ว +5

      Gregorio Cervejeira Don't*

    • @syrupthesaiyanturtle
      @syrupthesaiyanturtle 6 ปีที่แล้ว +9

      No... he is clyde

    • @danielhong6487
      @danielhong6487 6 ปีที่แล้ว +6

      knowing that he isn't a threat should help a lot

    • @wobblysauce
      @wobblysauce 6 ปีที่แล้ว +13

      But takes up the path the player can use... Got an Exit, nope Clydes there.

  • @MisterVercetti
    @MisterVercetti 6 ปีที่แล้ว +43

    A few details not covered in this video, for those who are curious:
    1. At the two tunnel entrances just above the ghost house and the two entrances on either side of Pac-Man's starting location, the ghosts are unable to make upward turns (except in Frightened mode). This makes for some handy safe zones if the ghosts are concentrated below you.
    2. After a certain number of dots are eaten on each level, Blinky enters a state known as "Cruise Elroy" (though where the name came from remains a mystery to this day), where two things happen: Blinky speeds up to nearly the same speed as Pac-Man, and he no longer targets his respective corner during Scatter Mode. When a second dot threshold is reached, Blinky speeds up yet again, to the point where he's visibly faster than Pac-Man.
    3. Because collision in this game is tile-based instead of sprite-based, there's a rare phenomenon where Pac-Man can pass through a ghost unharmed, due to Pac-Man and the ghost changing tiles on the exact same frame.
    Certainly a good start, in any event!

    • @Maxi-Gonz.
      @Maxi-Gonz. 2 หลายเดือนก่อน

      Yeah, and also, because of the exact same tile collision philosophy, ghosts naturally make turns perfectly because they're AI where Pac-Man (the player) can't. To solve this, the devs gave Pac-Man a bigger turn window. Therefore, Pac-Man turns faster than the ghosts. Useful to make some space from Blinky.

  • @Izandaia
    @Izandaia 6 ปีที่แล้ว +235

    I did not expect to learn so much about the mechanics of PACMAN.

    • @techleontius9161
      @techleontius9161 5 ปีที่แล้ว +2

      You would learn more, if you watch "Pacman ghost AI explained".

    • @joekendel1832
      @joekendel1832 4 ปีที่แล้ว

      same

  • @jlwalker92
    @jlwalker92 6 ปีที่แล้ว +257

    I just stumbled on several of your videos today and you have earned the ability to send my phone notifications. Thanks for being one of the rare few deserving such.

  • @ВячеславЯковенко-ч8щ
    @ВячеславЯковенко-ч8щ 6 ปีที่แล้ว +391

    Do what you love and people will love you! And we do love you now!

    • @CodeBullet
      @CodeBullet  6 ปีที่แล้ว +39

      And I love you

    • @enjoijoshua6042
      @enjoijoshua6042 6 ปีที่แล้ว +10

      Can you do ai on Ragdoll runners now please :( i really recommend it

  • @xaxaiuedufraine4897
    @xaxaiuedufraine4897 6 ปีที่แล้ว +19

    A couple of years ago, I recreated Pac-man in C++ for my intro to computer science class. I remember researching the ghost behaviors in-depth, and it was immensely satisfying to see that you gave them (nearly) the same behaviors that I did.

  • @jskaisel
    @jskaisel 6 ปีที่แล้ว +187

    How good can this channel be? ^_^

    • @boarbot7829
      @boarbot7829 6 ปีที่แล้ว +2

      Dr.BonesGuy good

  • @TheBeast9417YT
    @TheBeast9417YT 4 ปีที่แล้ว +30

    3:29 “Did you see that?”
    Me, an intellectual: The Power Pellet did nothing

  • @Danacus
    @Danacus 6 ปีที่แล้ว +354

    10/10
    Commentatin
    g

  • @frhowe08
    @frhowe08 6 ปีที่แล้ว +1597

    The one dislike is clyde
    Edit. I clearly was early lmao

    • @CodeBullet
      @CodeBullet  6 ปีที่แล้ว +163

      dammit Clyde

    • @chaosregiment6341
      @chaosregiment6341 6 ปีที่แล้ว +12

      No one like this comment anymore

    • @flophawk
      @flophawk 6 ปีที่แล้ว +18

      Fuck u clyde is the best one

    • @GameKraken
      @GameKraken 6 ปีที่แล้ว +6

      and why should we listen to you?

    • @acorlan145
      @acorlan145 6 ปีที่แล้ว +3

      HES MAFDE ALTS

  • @slonth
    @slonth 6 ปีที่แล้ว +3

    I like how the writing is so casual. Honestly! People always think that when regarding computers and coding you have to take it seriously. It’s so refreshing to find someone that speaks my language. I don’t wanna sound pretentious, but I have a fair share of knowledge about computers myself. Not about software however, more about hardware. I really enjoy learning the inner workings of AI and seeing it evolve. That combined with another person who does this stuff for fun, it’s a dream come true! Thanks for standing out.

  • @janezjohan6417
    @janezjohan6417 6 ปีที่แล้ว +26

    You put a lot of effort into your vids! simply put, amazing! Can't wait till part 2.

  • @SubspacedAnimates
    @SubspacedAnimates 5 หลายเดือนก่อน +1

    i can only imagine the "whoop whoop whoop" meme happening every time clyde targets his corner

  • @mitsync
    @mitsync 6 ปีที่แล้ว +932

    How do you do this stuff within weeks of each other?!? Don't you need to breathe sometimes?
    Great as always!

    • @dtiydr
      @dtiydr 6 ปีที่แล้ว +55

      To breath are for pussies.

    • @snecko8838
      @snecko8838 6 ปีที่แล้ว +22

      But if you breathe...

    • @dtiydr
      @dtiydr 6 ปีที่แล้ว +20

      You are dead..

    • @Anim3ddicted
      @Anim3ddicted 6 ปีที่แล้ว +57

      100% animals who breath dead...
      breathing actually kills you

    • @dtiydr
      @dtiydr 6 ปีที่แล้ว +9

      Yep, hard tough guys dont breath because they can take it, softer guys and panties can not and thus they die.

  • @davidmurphy563
    @davidmurphy563 6 ปีที่แล้ว +337

    Dude, you programmed PacMan from scratch in Java with authentic pathing! How long did that take you??

    • @CodeBullet
      @CodeBullet  6 ปีที่แล้ว +180

      about a week

    • @davidmurphy563
      @davidmurphy563 6 ปีที่แล้ว +126

      Huh, well it took Toru Iwatani and a nine man team a year in 1979 - what a bunch of slackers! ;-)

    • @scoutiano4441
      @scoutiano4441 6 ปีที่แล้ว +75

      you realize they didn't have the same tools and they had to come up with the original game design

    • @OnyDeus
      @OnyDeus 6 ปีที่แล้ว +39

      David you dropped this /s. Just in case ; )

    • @davidmurphy563
      @davidmurphy563 6 ปีที่แล้ว +79

      scoutiano Dude, I wasn't being serious... ";-)" means "joke"
      Iwatani and his team are legends. The AI pathing behaviour and gameplay replicated here is such great optimisation that we're talking about it decades later and you don't get that without investing a huge amount of work.
      It was a bit of humour with the aim of delivering a compliment; a week is damn fast.

  • @circli
    @circli 6 ปีที่แล้ว +176

    Love it! We need more “AI plays ancient game and tests it’s capabilities...”!

    • @kama2106
      @kama2106 6 ปีที่แล้ว +5

      Alto Bluedot Ai playing chess and checkers. .... i ve already seen this somewhere

    • @multiapples6215
      @multiapples6215 6 ปีที่แล้ว +1

      Ai plays the original donkey Kong Mario game

    • @JorgetePanete
      @JorgetePanete 6 ปีที่แล้ว +3

      Alto Bluedot its*

    • @LemurDrengene
      @LemurDrengene 6 ปีที่แล้ว

      DeepMind released a paper focusing on a ton of Atari games, along with a video :)

    • @lucie3d
      @lucie3d 6 ปีที่แล้ว +1

      wrong its

  • @rodneylives
    @rodneylives 6 ปีที่แล้ว +6

    Pretty good, but there are some minor differences from the arcade game. These are detailed in The Pac-Man Dossier (which several people have already linked to), and I presume you used as reference (because it's awesome, and what you *have* done is pretty good):
    1. There are four routes in the maze that are "one way" to the ghosts, that they can go down but can't go up. They are the two vertical routes directly above Pac-Man's start location, and directly above the monster box. In play, these are useful for escaping pursuit.
    2. Ghosts slow down in the tunnels.
    3. This is a big one... there's actually a significant pathfinding bug in the arcade game that affects Pinky and Inky whenever Pac-Man faces north, that tends to cause them to cause them to home in on the wrong location, one to Pac-Man's left. It's fully detailed in the Pac-Man Dossier, but one result of it and the one-way routes is the infamous "safe spot," the area just right-and-up from the starting location that the ghosts' pathfinding often breaks down when they try to reach it when Pac-Man is facing up.
    4. Finally, the ghosts aren't entirely random when vulnerable, but pick routes deterministically based, among other things, on reads from random memory locations. This has the weird side-effect of making it likely impossible to fully implement Pac-Man's AI without a full copy of the game's ROMs, although it's a really minor point ultimately unless you want to perfectly recreate the arcade game.

  • @Pro-Tayto
    @Pro-Tayto 6 ปีที่แล้ว +68

    What about the section on the sides of the screen where you cross between the left and right side? Have you tested that?

  • @javierjauregui1063
    @javierjauregui1063 6 ปีที่แล้ว +12

    I really enjoy all your videos! you are my new hero :p

  • @MarkoPiroski
    @MarkoPiroski 6 ปีที่แล้ว +132

    You man are legend.

  • @LordKirtash
    @LordKirtash 6 ปีที่แล้ว +46

    I am so happy for having subscribed to your channel. Your content is fascinating.
    I am waiting for your next video. This one was great. Thank you.

  • @PvPZero
    @PvPZero 6 ปีที่แล้ว

    I literally searched for 'AI learns to play pacman' yesterday before this video was published and here it is today... Woa.... Subscribed.

  • @spamtongspamton9900
    @spamtongspamton9900 4 ปีที่แล้ว +3

    CB: let’s name the AIs
    CB: *uses canon names*
    _unless… they’re not canon_

  • @ethanmenot
    @ethanmenot 6 ปีที่แล้ว +3

    The pinky part actually got an audible laugh I love that

  • @vordaq
    @vordaq 6 ปีที่แล้ว +3

    Ah cool, I knew the ghosts had such personalities but it's nice seeing their pathing lines drawn out. Can't wait to see an AI tackle this :)

  • @johncoffey421
    @johncoffey421 5 ปีที่แล้ว +1

    you're too good. Commentary 10/10. Logic 10/10.

  • @ristopoho824
    @ristopoho824 6 ปีที่แล้ว +43

    Oh damn it's nice to see your channel getting bigger. You deserve it. For all the work you're doing for it. I subscribed on the last video, if you're interested in hearing.
    It's wonderful both seeing a new channel get this fast of a start, and having one more channel doing AI stuff. And. Something in your style just seems so enjoyable.

    • @tomburris8380
      @tomburris8380 6 ปีที่แล้ว +1

      I think it's the music taste. :)

  • @ThePowerMadruga
    @ThePowerMadruga 5 ปีที่แล้ว +2

    I'm actually intending to make a Phaser version of PacMan, in order to learn some game programming techniques.
    Thank you a lot man, you're a legend.

  • @bubbachurch8183
    @bubbachurch8183 6 ปีที่แล้ว +59

    Super cool and really impressive. Butt... Pac man does slow down while eating dots and is able to outrun the ghost if there are no dots in front of him. But otherwise thumbs up.

    • @dx8pi6o48
      @dx8pi6o48 6 ปีที่แล้ว +2

      it's supposed to do that

    • @lordcabbage4931
      @lordcabbage4931 5 ปีที่แล้ว +6

      Bubba Church I never knew that I will now play god with my new knowledge

    • @Spark-Gold
      @Spark-Gold 5 ปีที่แล้ว +7

      Pac-man also turns corners faster and we don't know if he implimented Blinky's speed increase or the looping from the sides. He also did a fixed version where it doesn't have the error where if Pac-man looks up, Pinky and Inky's target moves four tiles to the left

    • @xeno2273
      @xeno2273 5 ปีที่แล้ว

      haha butt hhh hhahaahahha butt hhhh

  • @coolnoah8183
    @coolnoah8183 6 ปีที่แล้ว +2

    Damn I came here thinking this was an older video so I could watch it all, looks like im subscribed for now 😂

  • @cyber_diamond
    @cyber_diamond 6 ปีที่แล้ว +8

    9:05 TRIPLE KILL

  • @dylanfitzgerald1513
    @dylanfitzgerald1513 6 ปีที่แล้ว +1

    Awesome video! I spent DAYS trying to recreate Pacman in excel VBA and never figured it out. I was trying to implement dijkstra's algorithm for the ghost AI and it failed horribly, I never knew about A*. (Plus, using excel VBA to code certainly didn't make things easier). Thank you for the great information and posting the source code! Your videos provide great inspiration to learn more about coding, keep up the excellent work!!

  • @jasperkooij1891
    @jasperkooij1891 6 ปีที่แล้ว +5

    Great choice of music

  • @juancarlosacunacanto8458
    @juancarlosacunacanto8458 6 ปีที่แล้ว +1

    I love it! You actually recreated the actual logic begind pacman instead of just making the ghosts follow you as in many other pacman clones.

  • @MattsassinGames
    @MattsassinGames 6 ปีที่แล้ว +4

    Quality stuff, keep it up man!

  • @fishman368
    @fishman368 6 ปีที่แล้ว +2

    Love the way you interact with us, the viewers! Amazing chanel keep it going!

  • @debblez
    @debblez 6 ปีที่แล้ว +5

    "we need to give them personalities" "oh and names"

  • @jordanlu9152
    @jordanlu9152 6 ปีที่แล้ว +1

    This was actually so funny and informative at the same time😂 Thanks bro, we appreciate u

  • @AidenOcelot
    @AidenOcelot 6 ปีที่แล้ว +3

    You've done what I've always wanted to do

  • @sagebeasley3303
    @sagebeasley3303 6 ปีที่แล้ว

    The comedy of your commentary really makes the video so much more entertaining- though watching you making AI is already pretty fun.

  • @slimpwarrior
    @slimpwarrior 6 ปีที่แล้ว +10

    Don't forget to include your patreon in the description :)

    • @CodeBullet
      @CodeBullet  6 ปีที่แล้ว

      thanks, It's there now

  • @funkmaster6614
    @funkmaster6614 6 ปีที่แล้ว

    I have been researching pac man and this video was really helpful in representing how the AI for the original game works

  • @binkman67
    @binkman67 6 ปีที่แล้ว +3

    This is really awesome!

  • @justhallowed8499
    @justhallowed8499 6 ปีที่แล้ว

    Watching it come together is so satisfying

  • @gabriellugmayr2871
    @gabriellugmayr2871 6 ปีที่แล้ว +19

    love your humor

  • @crosleysparty
    @crosleysparty 5 ปีที่แล้ว +3

    Love learning patterns from Pac-Man

  • @fulltimewife1075
    @fulltimewife1075 6 ปีที่แล้ว +8

    RIP Blinky :c

  • @grrvaes
    @grrvaes 6 ปีที่แล้ว +1

    I had so much fun watching this, omg.
    And as a programmer also learned from it.
    Sorry for my bad english, isnt my 1st language.

  • @bluhbluhbluh9161
    @bluhbluhbluh9161 6 ปีที่แล้ว +51

    I love you so much youve no idea??? U better be single bro. Nah jk. Like srsly thank you for creating these kind of videos ive always been so interested in codes n stuffs but im noob at them. Seeing them come alive makes me day. Tytytyty

    • @JorgetePanete
      @JorgetePanete 6 ปีที่แล้ว

      bluh bluhbluh learn grammar

    • @bluhbluhbluh9161
      @bluhbluhbluh9161 6 ปีที่แล้ว +18

      Jorge C. M. Sincere apology to you sir. When I feel extremely geniune towards someone I tend to be very informal, moreover, I would ignore the rules of expressing my message created by an old bearded man who named it "English" with a sub-category "grammar", and expresses them truly in my own way. From the bottom of my heart, I hope you spare this poor mankind you call a grammer jews.

    • @bottlecaps1900
      @bottlecaps1900 6 ปีที่แล้ว +2

      sounds gay

    • @souland3566
      @souland3566 6 ปีที่แล้ว +4

      bluh bluhbluh You just trolled the fuck out of that dude lol

  • @randycenson4400
    @randycenson4400 6 ปีที่แล้ว

    i seen lot of AI minds...but this is the trickiest program i ever seen, thanks for you effort bruh. some people quit after halfway...11/10

  • @gustavogodoy9626
    @gustavogodoy9626 6 ปีที่แล้ว +6

    What a good video, I can't wait for AI learns to play Tetris
    PD: #ClydeDidNothingWrong

    • @__nog642
      @__nog642 6 ปีที่แล้ว

      Lol, I've been working on my own Tetris implementation and an AI to play it but this guy will probably beat me to it, even though I started first.

  • @mindscapejem
    @mindscapejem 6 ปีที่แล้ว +1

    Wow, I was literally thinking this would be the next step, that's awesome.

  • @notgiven415
    @notgiven415 6 ปีที่แล้ว +5

    Pleas make more of these great videos I love the them
    And could you say witch language you use to program

    • @CodeBullet
      @CodeBullet  6 ปีที่แล้ว +2

      Java

    • @JorgetePanete
      @JorgetePanete 6 ปีที่แล้ว

      MyTech37 MyTech37 learn grammar

    • @bilel114
      @bilel114 6 ปีที่แล้ว

      is it worth your time going through all the comments and judging people's grammar ?

  • @mk1570
    @mk1570 5 ปีที่แล้ว

    This is the first CB vid I have watched with no narration and the funny thing is when I read the text, the narration voice is literally CB!

  • @deadesu3681
    @deadesu3681 6 ปีที่แล้ว +18

    Song name (please)

    • @EIirium
      @EIirium 6 ปีที่แล้ว +3

      Hyperspeed - eveningland

    • @JorgitoFerreira
      @JorgitoFerreira 6 ปีที่แล้ว +5

      Darude - Sandstorm

  • @Oxmond
    @Oxmond 4 ปีที่แล้ว +2

    Cool! Well done. And now for the REAL cool stuff! Hehe 👍🤓

  • @PaleGhost69
    @PaleGhost69 6 ปีที่แล้ว +14

    SPACE INVADERS!

    • @tiagotiagot
      @tiagotiagot 6 ปีที่แล้ว +2

      I wonder how hard it would be to recreate Pitfall...

    • @foncode101
      @foncode101 4 ปีที่แล้ว

      i made Galaders, a mash up of space invaders and galaga...in visual studio using C# .. check it out

  • @Miwamimim
    @Miwamimim 6 ปีที่แล้ว +2

    Really like this one, love you're work

  • @kustomweb
    @kustomweb 6 ปีที่แล้ว +66

    Check out A* Coding Challenge by Coding Train, excellent

    • @multiapples6215
      @multiapples6215 6 ปีที่แล้ว +10

      but don’t forget the this.

    • @sadhlife
      @sadhlife 6 ปีที่แล้ว +2

      this dot,
      this dot,
      this dot,
      never forget the this dot
      10/10

  • @benjaminbrady2385
    @benjaminbrady2385 5 ปีที่แล้ว +1

    No, don't use A*. The ghosts have a very specific algorithm for greedily minimising distance out of a maximum of three directions to turn.
    Also, pinky won't target four tiles in front of pacman when he's looking upwards, there's an error with vector addition which makes her target four tiles up and to the side

  • @twoeyedmike3529
    @twoeyedmike3529 6 ปีที่แล้ว +8

    What's the first song used in the video?

    • @Random_Blip
      @Random_Blip 2 ปีที่แล้ว

      Eveningland-Hyperspeed

    • @twoeyedmike3529
      @twoeyedmike3529 2 ปีที่แล้ว +1

      @@Random_Blip thank you so much!

    • @Random_Blip
      @Random_Blip 2 ปีที่แล้ว

      @@twoeyedmike3529 Happy to help.

  • @DearDeerRyone
    @DearDeerRyone 6 ปีที่แล้ว

    It was really cool to see you build Pac-Man from the ground up! Excellent video!

  • @futurrist
    @futurrist 6 ปีที่แล้ว +9

    0:00 *What The FİRST Song ? PLS*

  • @fnoffer
    @fnoffer 5 ปีที่แล้ว +2

    originally all of these ghosts had diffrent AIs for example the Orange one alway turns if he is able to catch pacman and I am not sure who but one of them can only turn left.
    But I still think this is a nice work and interesting video!! I am exiced for the next part ;")

  • @ginjaninja6585
    @ginjaninja6585 6 ปีที่แล้ว +3

    Can you jump from one side of the board to the other?

  • @Mortagus
    @Mortagus 6 ปีที่แล้ว

    Those videos when you explain how you build your own version of the game is really inspiring.
    That makes me want to code it myself for fun ^^

  • @hihibunnie
    @hihibunnie 6 ปีที่แล้ว +4

    Your channel is seriously blowing up, how?

    • @GakisStylianos
      @GakisStylianos 6 ปีที่แล้ว +5

      By doing something that a ton of people find incredibly interesting and unique. That is all.

    • @yannicknana
      @yannicknana 6 ปีที่แล้ว +9

      Good original content made with passion.

    • @mint530
      @mint530 6 ปีที่แล้ว +8

      "magic"

    • @Seth_Hezekiah
      @Seth_Hezekiah 6 ปีที่แล้ว +2

      The TH-cam algorithm picked up on it. One of his videos recently went pretty viral, so the algorithm picked it up and helped him grow. I'm guessing it was his snake video.

    • @Lockirby2
      @Lockirby2 6 ปีที่แล้ว

      He put a bomb inside it.

  • @NathanaelNewton
    @NathanaelNewton 6 ปีที่แล้ว

    Awesome as always, can'y wait to see part 2!

  • @hiestealer
    @hiestealer 6 ปีที่แล้ว +3

    But can you go through the wall hole and go to other side?

  • @szynu1994
    @szynu1994 6 ปีที่แล้ว

    Man you are awesome and this is best chanel on youtube.

  • @mareletudor
    @mareletudor 6 ปีที่แล้ว +11

    What are song names?

    • @Random_Blip
      @Random_Blip 2 ปีที่แล้ว

      First song is Eveningland-Hyperspeed.

  • @jackdavidson8708
    @jackdavidson8708 6 ปีที่แล้ว

    I don't know how youtube knew this is what I needed but it was right. This is incredible, thank you so much for sharing this with us. I really hope you start making money off this soon cause you absolutely deserve it.

  • @sanyamjaincs1
    @sanyamjaincs1 6 ปีที่แล้ว +25

    Fan count +1

  • @deddcuber3288
    @deddcuber3288 6 ปีที่แล้ว +1

    i love how some lines of code can be more useful than me

  • @sorinenache5013
    @sorinenache5013 6 ปีที่แล้ว +3

    You basically recreated the game pacman with bots. Great job!
    1 thing dough, blinky(red ghost ) is faster than the other ghost and than the player himself. Still , great job!

    • @sorinenache5013
      @sorinenache5013 6 ปีที่แล้ว +1

      And.. By the way... You should try to recreate tetris and teach bots to play it , from generation to generation , until they play like the grandmasters. Just a sugestion .

    • @colinedwards3237
      @colinedwards3237 6 ปีที่แล้ว +1

      No, he isn't. He moves at the same speed as the other ghosts unless in 'Cruise Elroy' mode, which occurs when the number of remaining dots is below a certain number (which, itself, is dependent on the level).

    • @1313eable
      @1313eable 6 ปีที่แล้ว +1

      Actually, it isn't. It starts moving at the same speed as the player when 20 dots are remaining, and moves faster than the player when 10 dots are remaining. He also keep chasing the player while in scatter mode (scattering, but still chasing the player if possible). Killing him will remove that ability from him.

    • @colinedwards3237
      @colinedwards3237 6 ปีที่แล้ว

      Like I said before, the number of dots remaining is dependent on the level. Also, Cruise Elroy speed boosts are 'normal ghost speed + 5%' for the first boost and 'normal ghost speed + 10%' for the second one. It just happens to be the case that the first speed boost makes Blinky the same speed as Pacman on the first 20 levels, but not from level 21 onwards...

  • @Xeogin
    @Xeogin 6 ปีที่แล้ว +1

    What about Cruise Elroy? Blinky's badass alter ego after half the pellets are eaten

  • @BoHorror
    @BoHorror 6 ปีที่แล้ว +5

    What is the song that's used

    • @JorgetePanete
      @JorgetePanete 6 ปีที่แล้ว

      The Horror you forgot the question mark

    • @JesusisJesus
      @JesusisJesus 6 ปีที่แล้ว

      The song is called Sandstorm, by Darude.

    • @jvr02
      @jvr02 6 ปีที่แล้ว +1

      Jesus It's 2018

    • @Random_Blip
      @Random_Blip 2 ปีที่แล้ว

      Eveningland-Hyperspeed

  • @SmugHomura
    @SmugHomura 6 ปีที่แล้ว

    Incredibly clear presentation of Pacmans Ai! :o

  • @conalfisher765
    @conalfisher765 6 ปีที่แล้ว +26

    Your implementation of the ghost AI is wrong. The red ghost is meant to go directly to Pacman, the blue and pink ghosts try to block your path, and the orange ghost just generates a path using the current RNG value.

    • @MegaSupernova888
      @MegaSupernova888 6 ปีที่แล้ว +20

      Did you watch the full video? He added the specific ambush patterns present in Inky and Pinky and gave Clyde his fickle nature (which is less random than most people believe, it's a specific method he uses that gives his ghost an indecisive chasing pattern that looks rather random).

    • @nickrogers3624
      @nickrogers3624 6 ปีที่แล้ว +10

      Clyde's movement is based on his "scatter mode" position and pacman's position. During scatter mode all ghosts will return to a specific corner of the map, however Clyde goes back to this as soon as he is within 8 tiles of pacman and goes towards pacman like blinky when 8 or more blocks away.

    • @nickrogers3624
      @nickrogers3624 6 ปีที่แล้ว +5

      when you did the research before seeing the video because you mostly knew it... then see it all in the video...

    • @zellfaze
      @zellfaze 6 ปีที่แล้ว

      Came to also comment that they have specific ais. Only 2 mins in though myself.

  • @guillermoalvarez9423
    @guillermoalvarez9423 6 ปีที่แล้ว

    U r amazing! U also share ur code giving us inspiration 💙

  • @XxSuicidGamerxX
    @XxSuicidGamerxX 6 ปีที่แล้ว

    I really enjoy your videos! Keep going :)

  • @Blademaster162
    @Blademaster162 6 ปีที่แล้ว

    Awesome! I realize my comment was probably posted when this was already being made, but im so glad you made a pacman video!

  • @angiebeattie4113
    @angiebeattie4113 6 ปีที่แล้ว

    Love the vids been subbed since the snake days and it's great that your channel has been growing

  • @jaimeamaya9114
    @jaimeamaya9114 5 ปีที่แล้ว +2

    Just this itself has thought me how Pac man works and I'm amazed

  • @lovizio93
    @lovizio93 6 ปีที่แล้ว

    Great video! Looks like te AI that runs the channel it's getting smarter. I can't wait to see the part 2!

  • @thasswassupgirl
    @thasswassupgirl 6 ปีที่แล้ว

    Love these vids man! Keep em coming!

  • @desertdweller9003
    @desertdweller9003 6 ปีที่แล้ว

    I was about to nit pick about how in the actual game, all of the AIs acted differently, then you brought up that exact problem. Another awesome video!

  • @GregsnBacon
    @GregsnBacon 6 ปีที่แล้ว +1

    Glad I found this channel so early, I can tell it's gonna get really big quickly. Great videos keep it up man

  • @Araly74
    @Araly74 6 ปีที่แล้ว

    I love your work, your explanations and how you explain. I'm happy to have found you, I'm looking forward for your next works

  • @big_bad_e7102
    @big_bad_e7102 6 ปีที่แล้ว +1

    Really fantastic video, I would just like to add in that you forgot the level creation system. Pac-Man has a color palette and a sprite/audio sheet where it gets text, walls, ghosts, etc... The sprite sheet is why the glitched level exists because of the maximum number the machine can handle. Also the short cut scenes in between levels are missing, would like to see a complete version of the game.

  • @jamesdicken5779
    @jamesdicken5779 6 ปีที่แล้ว

    I love this channel, keep up the good work!

  • @spacexfan7054
    @spacexfan7054 6 ปีที่แล้ว +2

    "The red and orange ghosts are in the same position. And also since they have the same behavior (always following pacman) they will remain together forever" Well done captain obvious.

  • @SuperDonalByrne
    @SuperDonalByrne 6 ปีที่แล้ว

    Absolutely love your videos man. It would be amazing if you could do some more in depth tutorials or even blog posts. Can’t wait for more content!

  • @kingbaschdor5649
    @kingbaschdor5649 6 ปีที่แล้ว +1

    This is the best channel I am subscribed to!

  • @aidensmith2601
    @aidensmith2601 6 ปีที่แล้ว

    I absolutely LOVE these videos.

  • @firenyth
    @firenyth 6 ปีที่แล้ว +1

    this is so cool, i tried making a pacman clone back when i was learning to code i got the red ghost working and had started on one of the others but stopped working on it when then new year started as going back to my studies i didnt have time to work on it anymore.
    would have been garbage anyway since i was using a very basic engine called phrogram which is dead now i believe and i had no idea what i was doing :P

    • @colinedwards3237
      @colinedwards3237 6 ปีที่แล้ว

      If you'd coded it properly you would only need to code one ghost and then create 4 instances of it each with a different targetting strategy... ;)

  • @marek3247
    @marek3247 6 ปีที่แล้ว +1

    5:15 when you are playing basketball and you break the other guys ankles

  • @nxcr_
    @nxcr_ 6 ปีที่แล้ว

    Extremely motivating! Keep up the good work, I believe you give a reason to a myriad of people for delving in their own personal projects :)