I Made Pac-Man with just Redstone!

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

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

  • @mattbatwings
    @mattbatwings  9 หลายเดือนก่อน +359

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/mattbatwings . The first 200 of you will get 20% off Brilliant’s annual premium subscription.

    • @GamingCubed
      @GamingCubed 9 หลายเดือนก่อน +23

      ok redstone daddy

    • @um_idkw
      @um_idkw 9 หลายเดือนก่อน +9

      man, thats brilliant

    • @chainerfries4417
      @chainerfries4417 9 หลายเดือนก่อน +7

      You used every sprite space perfectly

    • @illusionillage
      @illusionillage 9 หลายเดือนก่อน +3

      Ur the best redstone creator

    • @VictorSilva-st4mo
      @VictorSilva-st4mo 9 หลายเดือนก่อน +7

      Hey if the note blocks change sound when u put a different block under it can’t u make a mod to detect the change in type of note played that and change the pixels to the broken screen?
      So instead of just which note but what instrument was well??

  • @realgoose
    @realgoose 9 หลายเดือนก่อน +4283

    But can it run Doom?
    Edit: HE DID IT!!

    • @CoolGuyWithAPen
      @CoolGuyWithAPen 9 หลายเดือนก่อน +293

      I need to see doom in minecraft

    • @duckicodes
      @duckicodes 9 หลายเดือนก่อน +88

      Damn you guys crazy

    • @GamingCubed
      @GamingCubed 9 หลายเดือนก่อน +23

      fr

    • @zpippo
      @zpippo 9 หลายเดือนก่อน +39

      @@CoolGuyWithAPen take a look at IRIS i guess

    • @skanslovakia553
      @skanslovakia553 9 หลายเดือนก่อน +64

      Yeah, I wonder if this redstone machine specifically designed to run Pac-Man can run Doom...

  • @herobrine1792
    @herobrine1792 9 หลายเดือนก่อน +259

    note blocks also have an instrument based off of what block is under them and that can be changed with pistons to recreate the overflow bug

    • @_Dearex_
      @_Dearex_ 9 หลายเดือนก่อน +24

      That does only change the Sound and not the sprite

    • @stinky3823
      @stinky3823 9 หลายเดือนก่อน +10

      Maybe the mod creator could add more colours based on the instrument

    • @vibaj16
      @vibaj16 9 หลายเดือนก่อน +19

      Can't change the texture based on that
      Edit: nvm, apparently any block state can have its own texture.

    • @sans6993
      @sans6993 9 หลายเดือนก่อน

      @@vibaj16techincally you can change the texture from the blockstate of a noteblock, it is possible because there is already a texturepack thet uses that, it's called "Note Block Displays 3D"

    • @calebrey
      @calebrey 9 หลายเดือนก่อน +19

      @@vibaj16 you actually can!

  • @Mountainousview
    @Mountainousview 9 หลายเดือนก่อน +579

    Its annoyingly hard to think of redstone games that are hard enough to be challenging but easy enough to be possible

    • @JavierSalcedoC
      @JavierSalcedoC 9 หลายเดือนก่อน +11

      Super Breakout and Frogger comes to mind

    • @vibaj16
      @vibaj16 9 หลายเดือนก่อน +27

      "Possible" is easy. What's hard is thinking of a game that _I_ could make. People already made Minecraft with actual 3D rendering (including textures). Meanwhile Tic-Tac-Toe is already reaching the limits of what I'm able to do...

    • @tanveshkaviskar442
      @tanveshkaviskar442 9 หลายเดือนก่อน +6

      ​@@vibaj16 Somebody made a tic tac toe with redstone in bedrock, and there's no way anyone can win in it except that redstone AI itself.

    • @vibaj16
      @vibaj16 9 หลายเดือนก่อน +1

      @@tanveshkaviskar442 hardcoded or it actually calculates the moves?

    • @tanveshkaviskar442
      @tanveshkaviskar442 9 หลายเดือนก่อน +4

      @@vibaj16 it has a really long decoder/ROM, so it must be hardcoded.

  • @jfr-001
    @jfr-001 9 หลายเดือนก่อน +888

    2015: look at this redstone calculator, it's amazing!
    2024: Mattbatwings remakes Pacman in redstone, so cool!

    • @carito14_09
      @carito14_09 9 หลายเดือนก่อน +51

      2053: look a redstone computer playing fortnight in full color 720p at 10fps

    • @carito14_09
      @carito14_09 9 หลายเดือนก่อน +3

      Imotional damage 😅

    • @satgurs
      @satgurs 9 หลายเดือนก่อน +19

      @@carito14_09that implies anyone would remember fornite in 2053

    • @cartatowegs5080
      @cartatowegs5080 9 หลายเดือนก่อน +9

      ​@satgurs we remember pacman and that was decades ago

    • @satgurs
      @satgurs 9 หลายเดือนก่อน +9

      @@cartatowegs5080 That's because pacman is one of the most influencial games of all time. The game established the maze chase game genre, was the first video game to make use of power-ups, and the individual ghosts have deterministic artificial intelligence (AI) that reacts to player actions.
      What exactly did fortnite establish? Nothing.

  • @WhoIsJoeRoblox
    @WhoIsJoeRoblox 9 หลายเดือนก่อน +178

    I love how matt uses those “for example” so we understand what he’s talking about

  • @justarookieartist
    @justarookieartist 8 หลายเดือนก่อน +46

    Recreating Pacman completely out of redstone is not nearly as impressive as somehow making the whole process so clearly defined and understandable that I could confidently explain how to do it despite the fact that I'm incapable of doing it myself. Excellent writing, scripting, problem solving, editing, etc. Just a stellar video.

    • @masol3726
      @masol3726 4 หลายเดือนก่อน +1

      Youre basically just defining variables and representing them as signals

    • @justarookieartist
      @justarookieartist 4 หลายเดือนก่อน +1

      @@masol3726 Oh, for sure, I just never would have figured out, from a practice perspective, how to do make that work. It's one of those ideas that I hear and go, "oh, yeah, of course," but I wouldn't have come up with it on my own

  • @billydrink
    @billydrink 9 หลายเดือนก่อน +128

    Personally for the walls, I'd use the good old fashioned Tetris code. Instead of storing if a tile has walls around it, you just store which tiles are walls. Then when pacman tries to move, you let him land on the wall, check if it is a wall, and if yes get him back to his previous location. This makes sense in code, though I'm not sure if it would be fast enough with redstone.

    • @obvlazuly3255
      @obvlazuly3255 9 หลายเดือนก่อน +25

      if he made tht with redstone, it would either be 3x slower for pacman to move or you would be able to see pacman on the tile and see him coming back, so it would be kinda weird. good idea tho

    • @yovalo3382
      @yovalo3382 9 หลายเดือนก่อน

      how the fuck would you do backtracking in redstone ?

    • @billydrink
      @billydrink 9 หลายเดือนก่อน +10

      @@yovalo3382 small memory module that stores the players current position every time they move

    • @technikluke6561
      @technikluke6561 9 หลายเดือนก่อน +10

      You wouldn't need that, as you could just pass the current position + movementDirection into the collision ROM and only move, when the ROM returns a free space

    • @Scratchy__The_cat
      @Scratchy__The_cat 9 หลายเดือนก่อน +1

      ​@@yovalo3382I (somehow) managed to do this in logic gates, where when you put an input, you wait for it to process, and then since this timer is started by the input itself, we just move the opposite directon

  • @CraftyMasterman
    @CraftyMasterman 9 หลายเดือนก่อน +27

    All the funky distance math was so interesting lol

    • @garybicker4727
      @garybicker4727 9 หลายเดือนก่อน +2

      It’s interesting to see everyone come up with their own variations with absolute values in the comments

    • @ItzFlowerGMD
      @ItzFlowerGMD 9 หลายเดือนก่อน +2

      crafties

    • @Emily-RoseHigginson
      @Emily-RoseHigginson 8 หลายเดือนก่อน +3

      it was interesting but I still dont get any of it

  • @anic1716
    @anic1716 9 หลายเดือนก่อน +1026

    Now we know that while a redstone graphing calculator won't earn you a girlfriend, Pac-Man will certainly give you one.

    • @toadragethe5th
      @toadragethe5th 9 หลายเดือนก่อน +2

      Lol

    • @JTplayzOffical
      @JTplayzOffical 9 หลายเดือนก่อน +1

      Ok

    • @MT_yt
      @MT_yt 9 หลายเดือนก่อน +1

      😂

    • @Adraria8
      @Adraria8 9 หลายเดือนก่อน +10

      It will actually give you Pac-Woman

    • @SuprSBG
      @SuprSBG 9 หลายเดือนก่อน +13

      @@Adraria8*Mrs. Pac-Man

  • @wChris_
    @wChris_ 9 หลายเดือนก่อน +33

    I feel like the ghost eyes pointing in the right direction is something really important in judging where a ghost is going. Maybe it would be possible to overlay the ghost base texture + an eye direction texture, which would only require 8 textures compared to 16 if you combine them.

    • @vftdan
      @vftdan 9 หลายเดือนก่อน +2

      Or maybe even add transparent eyes in front of some movable block model, so that it extends on one of the sides of the note block

  • @Parman72-rp9lp
    @Parman72-rp9lp 9 หลายเดือนก่อน +215

    This man is on a full blown Anime character arc. Every arcade game by next week

    • @xanderplayz3446
      @xanderplayz3446 9 หลายเดือนก่อน +4

      Still waiting for Bubbles

    • @LBP-Seramop
      @LBP-Seramop 9 หลายเดือนก่อน +2

      Yoooo Dig Dug when

  • @tuxat_
    @tuxat_ 9 หลายเดือนก่อน +32

    23:44 lol the mark rober music kicking in

    • @RocArio
      @RocArio 8 หลายเดือนก่อน +4

      He really though no one would notice

  • @Marco-ti8sx
    @Marco-ti8sx 9 หลายเดือนก่อน +66

    You madlad, you did it. Can't wait to see the actual video

  • @Windeycastle
    @Windeycastle 9 หลายเดือนก่อน +62

    Small correction at 19:40 (sorry, couldn't help myself)
    If a^2 > b^2, then it means that abs(a) > abs(b).
    Imagine for example a = -3, and b = 2. Then (-3)^2 = 9 > 2^2 = 4, but -3 < 2, so small problem there.
    This isn't an issue for the game though, as both a and b will be distances, and they can't be negative.

    • @soulsmanipulatedinc.1682
      @soulsmanipulatedinc.1682 9 หลายเดือนก่อน +14

      Another small correction at 20:14 (if I may add to your comment).
      Assuming a, b, c, and d are non-negative integers, and (a^2 + b^2) > (c^2 + d^2), then it follows that (a + b) > (c + d). Multiplication is an entirely unnecessary step to determine which coordinate is "closer" in this context.
      This is a term coined as "Manhattan Distance", which is far easier to calculate than "Squared Distance". This type of calculation would have worked just as effectively, in this context, while being quicker.
      Though, once again, this is not a problem for the game. Just something that could have been optimized.

    • @chinstion
      @chinstion 9 หลายเดือนก่อน +4

      wtf 😭 I don’t get anything you said

    • @HappyPlaysWasTaken
      @HappyPlaysWasTaken 9 หลายเดือนก่อน +6

      @@chinstion basically his distance thing doesnt work with negative numbers but thats ok because the distance will never be a negative number

    • @chinstion
      @chinstion 9 หลายเดือนก่อน

      @@HappyPlaysWasTaken ok

    • @Windeycastle
      @Windeycastle 9 หลายเดือนก่อน

      ​@@soulsmanipulatedinc.1682Good catch! Not needing that multiplication really saves on time!
      Edit: seems someone found an error in this specific one. See @Tit_the_Modder 's response under me

  • @mmm12456
    @mmm12456 9 หลายเดือนก่อน +84

    You could try pushing different blocks underneath the noteblocks with pistons as instruments get stored as differrent block states as well and get more available textures that way

    • @zarki-games
      @zarki-games 9 หลายเดือนก่อน +8

      That's a really good idea, I hope he sees this.

    • @bredcataw
      @bredcataw 9 หลายเดือนก่อน +2

      That will be working only wi- actually wait, it stores instruments! Very clever idea, man!

  • @Nyerguds
    @Nyerguds 9 หลายเดือนก่อน +8

    I had the same "square root" issue when doing colour palette matching. Matching colours to the closest colour on a palette is done in 3D space (R, G and B axes), by distance, and I also realised pretty quickly that there was no point in ever taking the square roots if the only thing needed was to see which was the closest.

  • @autumnleaves3012
    @autumnleaves3012 9 หลายเดือนก่อน +51

    if you ever wanted to create a more robust screen, I would recommend using a pack that textures based on the amount of a certain item in a shulker

    • @autumnleaves3012
      @autumnleaves3012 9 หลายเดือนก่อน +11

      it smth i played around with a long time ago were i had 64 different colours and it would just map them to the number of items in a chest % 64

    • @DsiPro1000
      @DsiPro1000 9 หลายเดือนก่อน +9

      Would that in theory let you have 1728 colours? If you go off the amount of items in a shulker?

    • @dianjonker
      @dianjonker 9 หลายเดือนก่อน +8

      ​@@DsiPro1000 If it works that way, you'll have 12 levels of intensity for each RGB channel. You could get very detailed with that

    • @autumnleaves3012
      @autumnleaves3012 9 หลายเดือนก่อน +3

      @@DsiPro1000 it would give a wider range in theory i just didn’t wanna implement it 🤷🏼

  • @vampire_catgirl
    @vampire_catgirl 9 หลายเดือนก่อน +14

    The upleft overflow! Love the attention to detail!

  • @maxstonecraft5420
    @maxstonecraft5420 9 หลายเดือนก่อน +8

    This is crazy man, I would never even think about how to do something like pac man, you already had my respect but this is probably one of my favourite projects you’ve made so far, keep going. I also showed this to a friend of mine and he asked if you have made doodle jump, maybe that could be an idea for a future project?

  • @flitscha9118
    @flitscha9118 9 หลายเดือนก่อน +7

    wow, that is very impressive. Keep it up!
    I think when calculating the distances, you could have avoided squaring by simply taking abs(x) + abs(y) as the distance.
    The length of a vector can be described using norms. The p-norms are very common.
    For p = 1 we get abs(x) + abs(y). sqrt(x^2 + y^2) would be at p = 2.
    The maximum norm (p=infinity) would also have been an option: d = max{ |x|, |y| }

    • @seanm7445
      @seanm7445 9 หลายเดือนก่อน

      It’s a good approach, though if at 1,3 and target 10,5; would it consider both up and right equally good?
      I’ve just left a comment with my thoughts, also trying to avoid any squaring.

    • @flitscha9118
      @flitscha9118 9 หลายเดือนก่อน

      @@seanm7445 That's a good point. Thanks for writing, I didn't realize that until now. I thought that if a distance is smaller than another distance, that information is preserved in any norm. But that is obviously not the case.
      Norms only have these 3 properties:
      (1) ||x|| = 0 => x = 0
      (2) ||a*x|| = |a| * ||x||
      (3) ||x+y||

  • @Ceven77
    @Ceven77 9 หลายเดือนก่อน +8

    oh dude I saw the Pac-Man AI video a long time ago and thought of that! Glad you actually saw it too and used it

  • @malokeytheallaround
    @malokeytheallaround 9 หลายเดือนก่อน +297

    Give him enough time and bro will build a PS5

    • @mateuszpragnacy8327
      @mateuszpragnacy8327 9 หลายเดือนก่อน +22

      Ps5 is nothing he would build a quantum computer❤

    • @spookycode
      @spookycode 9 หลายเดือนก่อน +5

      @@mateuszpragnacy8327I am not quite sure how you are supposed to create qbits in Minecraft… Quantum physics is hard

    • @onlytheJ_
      @onlytheJ_ 9 หลายเดือนก่อน +2

      @@spookycodejust make the writing function random

    • @yahoo5726
      @yahoo5726 9 หลายเดือนก่อน

      @@mateuszpragnacy8327 bats for “randomness” in the Qbits maybe?

    • @spookycode
      @spookycode 9 หลายเดือนก่อน

      @@onlytheJ_ god if it were that easy I wouldn’t have been able to write a 25 page analysis of quantum computers and how they break RSA encryption. First of all no, quantum computers aren’t just normal computers with randomness. They have a completely different architecture to your classic computer.
      While normal computers just slave away one instruction at a time one change at a time, quantum computers operate by defining the relationships between the qbits and reading the solution. You can think of this as if at the moment the qbits are initialized there exist 2^n multiverses and at every step you destroy the multiverses that don’t fit the criteria. At the end it would seem like the last standing multiverse is the only correct one.
      This allows quantum computers to do jobs that would require a normal computer to try every possibility instantaneously.
      Simulating quantum physics on classical computers can be done but it gets exponentially more difficult the more qbits you have. What would make this a bit simpler is the fact that we would simply just need a lot of multiplication modules since simulation is mostly based on matrix multiplication.
      The problem is that you are already multiplying 8x8 matrices with just a 2 qbit machine. That would mean a single operation would cost about 512 multiplications and 960 additions.
      While it’s certainly possible, 2 qbit systems are not practical as in they don’t have any use-case.
      And about now I realized that I am literally explaining quantum computing basics to some kid on the internet who probably doesn’t even know what matrix multiplication is…

  • @knyk0625
    @knyk0625 9 หลายเดือนก่อน +5

    this was really fun to watch because i also had to make pacman with functional ghost AI for one of my CS classes. i remember inky being particularly difficult to implement

  • @zix2421
    @zix2421 9 หลายเดือนก่อน +17

    if there is a real ghost algorithm - very cool

  • @Xetaas
    @Xetaas 9 หลายเดือนก่อน +2

    I wanna say, these videos are so incredibly cool.
    I’m a college Comp Sci major who took a Computer Architecture course last semester, so it’s very nice to be able to see all of the moving parts of your builds and recognize how everything fits together.
    Above all, I love how your content can be enjoyed by most, yet still remains sophisticated enough for you to be able to explain and articulate on the more complex ideas.
    I would feel motivated to do redstone computer stuff myself, but with loads and loads of schoolwork to take care of, it’s hard to find the time. Needless to say, you’ve earned a new subscriber. Keep up the good work

  • @kizi774
    @kizi774 9 หลายเดือนก่อน +7

    Bro plays Minecraft for a living, and he does the nerdiest subject (redstone). But bro still has a girlfriend. He has it all. He has reached the peak of humanity.

  • @2shy2guy52
    @2shy2guy52 4 หลายเดือนก่อน +2

    A few years ago people would have barely believed if this was done using command blocks, so to see that now it can technically be built with only things found in survival is crazy

  • @OfficialJoeTheChicken
    @OfficialJoeTheChicken 9 หลายเดือนก่อน +11

    “I made a TI-84 in Minecraft!”

  • @ShocooYT
    @ShocooYT 9 หลายเดือนก่อน +9

    Thanks sloimay

    • @JillPlaysMC
      @JillPlaysMC 7 หลายเดือนก่อน +1

      Yea thanks sloimay

  • @LatendC
    @LatendC 9 หลายเดือนก่อน +2

    I made pacman using command blocks about a fortnight ago. and I remembered you making a community post about making pacman with Redstone at the same time I started work on my pacman with cmds. And I thought to myself there was no way you could make pacman using Redstone. But against all odds you actually did it. I just want to say that THIS IS INCREDIBLE that you pulled It off.

  • @goldenapple3970
    @goldenapple3970 8 หลายเดือนก่อน +4

    make doom with redstone

    • @prestonthegod1
      @prestonthegod1 5 หลายเดือนก่อน

      Someone did it on a calculator

  • @Nightstick24
    @Nightstick24 2 หลายเดือนก่อน +1

    The way you explained this was amazing. Seriously, hats off to you for that explanation, I can't imagine how much rewriting that took, but it was glorious, and I'd like you to know it was appreciated! That was such an incredible gift to watch and hear you work through the problems like that, just one step at a time, I was able to follow very, very easily and it made complete sense the entire way.
    What a ridiculously interesting video!

  • @cowboyBo_y
    @cowboyBo_y 9 หลายเดือนก่อน +2

    bro this guy is the best redstone engineer in minecraft, change my mind. Not only that but he teaches complicated math in a less complicated way than a college professor.

    • @cowboyBo_y
      @cowboyBo_y 9 หลายเดือนก่อน +1

      yet he only has 164k subs. subscribe to this guy bro

    • @ostygd
      @ostygd 5 หลายเดือนก่อน

      mumbo jumbo.

    • @cowboyBo_y
      @cowboyBo_y 5 หลายเดือนก่อน

      @@ostygd techinal redstone

  • @J_MasterPro
    @J_MasterPro 9 หลายเดือนก่อน +1

    19:39 you are only halfway right. If both of them are negative bigger is that one which absolute value is bigger. For example a=-7 b=-2 ab^2

  • @namesanikin
    @namesanikin 8 หลายเดือนก่อน +4

    Тext video: I made Unity with Just Redstone!

  • @CastyInit
    @CastyInit 9 หลายเดือนก่อน +2

    24:00 the mark rober explanation music made my brain understand everything instantly

  • @Calour_
    @Calour_ 9 หลายเดือนก่อน +3

    Why is there no 1080p on this video?

  • @seanm7445
    @seanm7445 9 หลายเดือนก่อน +1

    Amazing work Matt. Another incredible minecraft project!
    One possible simpler way to deal with distance detection:
    Since you’re only calculating +/- 1 difference from the location, we know that this increment will have a greater impact with larger values.
    So you could do:
    if(x_diff > y_diff){
    // Priority is in the following order
    move_x_direction_closer_to_target
    move_y_direction_closer_to_target
    move_y_direction_away_from_target
    move_x_direction_away_from_target
    } else {
    // Priority is in the following order
    move_y_direction_closer_to_target
    move_x_direction_closer_to_target
    move_x_direction_away_from_target
    move_y_direction_away_from_target
    } //and your Infinity tag can be used to figure out how far down that priority list to go
    Anyway, I realise you probably never want to look at that part of the project ever again!!

  • @Recatonyllaer
    @Recatonyllaer 9 หลายเดือนก่อน +5

    You could just have the whole game blow itself up when you reach the end of the game, instead of breaking the screen. Would be kinda funny!

  • @redstar006
    @redstar006 9 หลายเดือนก่อน +6

    This is probably the coolest thing you’ve made so far

  • @Serial.Desig-N.1
    @Serial.Desig-N.1 8 หลายเดือนก่อน +3

    Ok, but can it run minecraft???

  • @Biofishy
    @Biofishy 8 หลายเดือนก่อน +2

    what would’ve been so cool is if at level 256 there was a bunch of tnt blowing up half the screen also love that the wool colors for each of the ghosts circuits match the i game colors

  • @AntonyWood998
    @AntonyWood998 6 หลายเดือนก่อน +2

    28:23 you could use single strength 4 for the fruit as I don’t think it was used.

  • @ibrahimchishti6297
    @ibrahimchishti6297 9 หลายเดือนก่อน +15

    Am I the only one surprised Matt has a girlfriend?

    • @parkpakh7775
      @parkpakh7775 7 หลายเดือนก่อน +1

      No.

    • @SteedAnimations
      @SteedAnimations 7 หลายเดือนก่อน +1

      Uuhhhh no

    • @SupaMaoKing
      @SupaMaoKing 6 หลายเดือนก่อน

      Nahhh

    • @a_aubaida
      @a_aubaida 6 หลายเดือนก่อน

      Wtf ​@@ibrahimchishti6297

    • @SanityInAnAmazonBoxShorts
      @SanityInAnAmazonBoxShorts 5 หลายเดือนก่อน

      For a second I was like “why are you talking about MatPat on Matt’s video- oh.”

  • @llfigl
    @llfigl 9 หลายเดือนก่อน +6

    Really WOW. I've never thought someone would be able to create Pac-Man with redstone

  • @maslinnik
    @maslinnik 9 หลายเดือนก่อน +1

    I believe you don't need any multipliers at all for Decision Maker. Look at it like this: first, split the plane around the target cell into 8 parts with lines (x=0), (y=0), (x=y) and (x=-y). Now, for every part of the plane, precedence of directions is fixed. For example, for the part (0 right > up. In fact, these are just sines and cosines! As for the redstone, all you have to do is run four comparisons in parallel followed by a simple ROM lookup. Hope that'll help!

  • @Canilho
    @Canilho 9 หลายเดือนก่อน

    Making these sort of logic devices is already challenging, but learning how these games worked is the thing I love to see others do.
    Programming has so many challenges, and you solved them in the best way possible.
    Congrats

  • @lythd
    @lythd 9 หลายเดือนก่อน +6

    this is impressive! i was right it was pacman, i predicted this on the community post just on a hunch based on the colours of the wool behind the screen matching the ghosts lmao

  • @Strawberry_Studios
    @Strawberry_Studios 9 หลายเดือนก่อน +2

    This is an amazing video it shows how pac-man works, and how you make it in Minecraft. I really love your video keep up the good work❤

  • @SF124-was-a-taken-username
    @SF124-was-a-taken-username 9 หลายเดือนก่อน +3

    4:19 I remember "discovering" animated textures like that too. I'm trying to see if there's anywhere I could use this feature in an MCreator mod I'm currently working on.

  • @jjohn1234
    @jjohn1234 8 หลายเดือนก่อน

    Wow loved every minute of this! Great to see the insides of the machine instead of just the result. You basically made the circuit board, where each one of these blocks is a chip or a transistor, thats crazy! Epic showcase and love the music in it, thats going in my playlist

  • @purrzival
    @purrzival 8 หลายเดือนก่อน +1

    It would be really cool to see the Minecraft in Minecraft revisited with an updated color display like this

  • @szalaierik
    @szalaierik 7 หลายเดือนก่อน

    Dude... Huuuge respect! I am discussing this video with my daughter and she learns more about (software/Hardware) engineering as would later in one semester. Dude. Love this

  • @shreyjain3197
    @shreyjain3197 8 หลายเดือนก่อน +2

    2:48 bro really said "my girlfriend" as if any1 would believe him

  • @SFS_Paraverse_Studio
    @SFS_Paraverse_Studio 9 หลายเดือนก่อน +1

    That’s literally the best redstone creation of all time! I didn’t even know that this was possible in minecraft.

  • @hominusprogramming
    @hominusprogramming 4 หลายเดือนก่อน

    Small note: this is the absolute distance (means the distance without any information of the direction) so the a^2 > b^2 -> a> b is correct. In the vectorial geometry where you have at least one more information (with a sign to detect if the point a is in front of or not point b on axis’ base) you cannot apply the same principle because you are in Z not in N. (Essentially you can have a^2 > b^2 -> b >a).
    Second note: even on the modern game the square distance is calculated instead of the normal distance. This because even if the hardware support the square operator is still slower then a simple exponential.

  • @yurfwendforju
    @yurfwendforju 9 หลายเดือนก่อน +3

    Can you please add sound to your future games? this would just squeeze the last bit of perfection in Minecraft. I would love to see this. Still insane you can just do this. Much love

  • @Ecl1psed276
    @Ecl1psed276 9 หลายเดือนก่อน

    Insanely impressive build, I don't know how you keep outdoing yourself. There is actually a much more efficient way to make the ghost decision maker, one that doesn't involve any multiplications. If Gx,Gy are the ghost coordinates and Tx,Ty are the target coordinates, then we can calculate their differences Dx = Tx-Gx and Dy = Ty-Gy. Then, we can just do this:
    If Dy > Dx and -Dy > Dx, output LEFT.
    If Dy > Dx and -Dy < Dx, output UP.
    If Dy < Dx and -Dy > Dx, output DOWN.
    If Dy < Dx and -Dy < Dx, output RIGHT.
    -

  • @Daxton-f1z
    @Daxton-f1z 9 หลายเดือนก่อน

    Wow! This is awesome!
    I have watched quite a few of your videos, and this is by far the most complex!

  • @jackofalltrades2920
    @jackofalltrades2920 9 หลายเดือนก่อน +2

    That looks a lot smaller than I was thinking it should look like. Great job

  • @illuminum8576
    @illuminum8576 9 หลายเดือนก่อน +1

    the only thing missing is the music, but the note blocks would look weird with the textures

  • @ltousch
    @ltousch 9 หลายเดือนก่อน

    Incredible work, amazing result, clear explanations perfectly balanced between complexity and simplicity. This video is a master piece.

  • @ArenSpace
    @ArenSpace 8 หลายเดือนก่อน +1

    adding in different note block instruments into the sprite calculation, you could have up to 128 different sprites, that being said, can't wait to see an entire NES game being made with just redstone

  • @capy9846
    @capy9846 9 หลายเดือนก่อน +1

    You should honestly use sprites more often! It looks so cool.

  • @rvoln0110
    @rvoln0110 9 หลายเดือนก่อน +3

    Did you add the mechanic for whenever pacman goes through the tunnel on the left or right? Seems like a pretty easy change on the x coordinate

  • @GoogleWhy-yr1ty
    @GoogleWhy-yr1ty 9 หลายเดือนก่อน +1

    This thumbnail is way better than the first one 😃

  • @viniciussousadiniz4623
    @viniciussousadiniz4623 9 หลายเดือนก่อน +1

    Nice video man, doing this stuff is as much fun as challenging

  • @anthonycannet1305
    @anthonycannet1305 9 หลายเดือนก่อน +1

    You can make the distance checker without using the Pythagorean theorem because you only need to know what’s the closest and not what the actual distances are.
    Target X - current X = difX
    Target Y - current Y =difY
    If difx is positive you need to go up and if it’s negative you need to go down (assuming x=0 is at the bottom of the screen)
    If dify is positive you need to go right, if it’s negative you need to go left (assuming y=0 is at the left of the screen)
    Then take the absolute value of both difs and choose whichever one is less to know which axis is closer.
    Instead of doing multiplication you do a few subtractions and negative checks

    • @mattbatwings
      @mattbatwings  9 หลายเดือนก่อน +1

      I believe this works when all 4 options are available, but would this be able to work with collisions? If my only two options increase distance then I think this falls apart. But you’ve convinced me it’s possible to make a distance checker without multipliers, I think with enough checks, all the information is there.. trying to write a better algorithm as we speak

    • @anthonycannet1305
      @anthonycannet1305 9 หลายเดือนก่อน +1

      @@mattbatwings This works to get you which direction is optimal, and also creates a heirarchy. Whichever absolute value dif is lower gives you the closer axis, and you get the quadrant based on the parity of the X and Y differences. Let's say the direction is in the first quadrant (so positive X and positive Y) and is closer to the Y axis. The optimal direction would be positive Y (|difY| < |difX|) but you also know that positive X is the second best solution, negative X is the third best, and negative Y is the farthest.
      The best direction is whichever absolute value difference is closest to zero and in the direction of the sign of the difference. The worst direction would be going in the opposite sign of the best direction.
      The second and third best directions would be the same and opposite sign of the other axis.
      The algorithm puts all four directions in a heirarchy, then you check from the top of the list if that direction is available

    • @mattbatwings
      @mattbatwings  9 หลายเดือนก่อน +1

      @@anthonycannet1305 Beautiful. Yep, I should have done this lol

  • @alexe.6995
    @alexe.6995 9 หลายเดือนก่อน

    Good trick with avoiding square roots! It's important to note, that this works only because distance can't be negative value. For example, (-7)^2 > 5^2, but -7 < 5. It should be |-7| = 7 > |5| = 5. But, again, distance can't be negative, so absolute value of some distance is equal to said distance
    Great video, keep it up!

  • @WitherslayR
    @WitherslayR 9 หลายเดือนก่อน +2

    This is the exact same AI movement I used in a game I once coded in Java it seems so cool to see it used in Minecraft as well

  • @anon_y_mousse
    @anon_y_mousse 9 หลายเดือนก่อน +3

    It's hard enough to do things like this in assembly, I can't imagine doing it with physical circuits, even if they are MineCraft versions of them. I'm sure most viewers are too young to get this reference, but it reminds me of the giant machine from Babylon 5 that Zathras maintained.

    • @chinstion
      @chinstion 9 หลายเดือนก่อน +2

      True! I love Babylon 😊

  • @stefanolassandro886
    @stefanolassandro886 หลายเดือนก่อน

    Stunning work and great explanations on the game machanics :D great stuff!

  • @MrAnatolijDyatlov
    @MrAnatolijDyatlov 9 หลายเดือนก่อน +1

    now make a redstone thing that will calculate least common multiple of up to 5 numbers (its a bit of a challenge i think)

  • @killirito
    @killirito 9 หลายเดือนก่อน +3

    Dude, watching your redstone videos mixed with programming was what motivated me to learn programming. Unfortunately, after some personal problems I had put aside, this video helped me reignite the desire to learn to program again. Thanks, keep up the great work!

  • @FrikingRL
    @FrikingRL 9 หลายเดือนก่อน +2

    That's amazing that you ended up building it even if it looks horribly hard in the first place

  • @LAMAROUX34
    @LAMAROUX34 8 หลายเดือนก่อน +1

    Thanks sloimy !!

  • @rpkie
    @rpkie 9 หลายเดือนก่อน

    Wow that's very impressive , congrats bro this is the best Redstone project i've ever seen ! mind blowing 🤯

  • @jarno_de_wit
    @jarno_de_wit 9 หลายเดือนก่อน

    I think you might be able to make the decision maker without any multipliers at all. Instead, you need to realise that the preference for a specific direction changes at the 45 degree line, defined by . Furthermore, the preferential directions always follow an ABBA pattern (with A and B being either Horizontal or Vertical). The only time the latter does not hold, is when the target is on the +x +y diagonal (which is also the -x -y diagonal).
    This change of direction pattern is however not the only weird thing with this case:
    When the target is in any direction other than the bottom left, the most preferred direction is to approach the target vertically. When the target is however in the bottom left, the preferred direction is horizontal. To prevent this particular weird behaviour, one can redefine the tie-breaker order as "UDLR" (Up, Down, Left, Right) instead, although this does not fix the ABBA / ABAB case mentioned above.
    For this calculation, let's define the following:
    x = Horizontal component, positive to the right
    y = Vertical component, positive down
    (Following standard screen coordinate conventions)
    _t and _g are used to indicate being the position of either the target or the ghost respectively
    If we want to enforce ABBA, we can derive the following algorithm:
    Horizontal preferences are defined by:
    } If x_t > x_g:
    |--> Choice 1 = Right; Choice 2 = Left
    } Else:
    | --> Choice 1 =Left; Choice 2 = Right
    The same procedure is used for the vertical axis.
    } If abs(x_g - x_t) > abs(y_g - y_t): # Tests if the horizontal component is smaller than the vertical component
    |--> Preferences: Choice 1 = Horizontal[0], Choice 2 = Vertical[0], Choice 3 = Vertical[1], Choice 4 = Horizontal[1]
    } Else: # If the Y is greater, or tied, prefer vertical first
    |--> Preferences: Choice 1 = Vertical[0], Choice 2 = Horizontal[0], Choice 3 = Horizontal[1], Choice 4 = Vertical[1]
    From this list of 4 choices, then you simply take the first allowed choice, and that is the ghost direction.
    This algorithm only needs 2 subtract units, and 3 value compare units, being drastically simpler than your system, requiring 2 multipliers, 4 subtractors, and 6 adders.
    If we don't enforce ABBA, but enforce ULDR (as stated in the video), we must replace the Else statement above with:
    ...
    } Elif abs(x_g - x_t) < abs(y_g - y_t):
    ...
    And add the following else statement for checks on the diagonal (with slightly abbreviated notation for readability):
    } Else:
    |--> } If x_t > x_g and y_t > y_g:
    |--> Preferences: V[0], H[0], V[1], H[1]
    } Elif x_t > x_g and y_t < y_g:
    |--> Preferences: V[0], H[0], H[1], V[1]
    } Elif x_t < x_g an y_t > y_g:
    |--> Preferences: H[0], V[0], V[1], H[1]
    } Else:
    |--> Preferences: V[0], H[0], V[1], H[1]
    This is definitely more complicated than the case above where we enforced ABBA over ULDR, but this is likely still easier / more compact than the approach presented in the video, due to only needing more compare units (which should be be quite small / fast), and a lot of the comparisons above reusing the same compare result, so only needing 3 additional comparison units W.R.T. the ABBA case.

    • @jarno_de_wit
      @jarno_de_wit 9 หลายเดือนก่อน

      Simple Python program I wrote to visualise the movement direction priorities:
      import pygame
      tie_breaker = "ULDR"
      # tie_breaker = "UDLR" # Alternative tie-breaker to consistently choose V movement over H movement
      # Coordinates: x positive right; y positive down
      tile_size = 20
      def get_dirs(pos1, pos2):
      "Simple, consistent case enforcing ABBA"
      x_g, y_g = pos1
      x_t, y_t = pos2
      horiz = "RL" if x_t > x_g else "LR"
      vert = "DU" if y_t > y_g else "UD"
      if abs(x_g - x_t) > abs(y_g - y_t): # If dx > dy
      return horiz[0] + vert + horiz[1]
      else: # If dy > dx or dx == dy
      return vert[0] + horiz + vert[1]
      def get_dirs2(pos1, pos2):
      "Case enforcing the tie_breaker"
      x_g, y_g = pos1
      x_t, y_t = pos2
      horiz = "RL" if x_t > x_g else "LR"
      vert = "DU" if y_t > y_g else "UD"
      if abs(x_g - x_t) > abs(y_g - y_t): # If dx > dy
      return horiz[0] + vert + horiz[1]
      elif abs(x_g - x_t) > abs(y_g - y_t): # If dx < dy
      return vert[0] + horiz + vert[1]
      else:
      return "".join(sorted(horiz[0] + vert[0], key = lambda i: tie_breaker.index(i))) + \
      "".join(sorted(horiz[1] + vert[1], key = lambda i: tie_breaker.index(i)))

      def get_pos(dir_, scale = 1, pos = (249.5, 249.5)):
      "Returns an offset position for text placement"
      return (pos[0] + (dir_ in "LR") * (-1)**(dir_ == "L") * tile_size * scale,
      pos[1] + (dir_ in "UD") * (-1)**(dir_ == "U") * tile_size * scale)
      def main():
      pygame.init()
      screen = pygame.display.set_mode((500, 500))
      clock = pygame.time.Clock()
      font = pygame.font.Font(pygame.font.get_default_font(), 15)
      running = True
      while running:
      screen.fill((0, 0, 0)) # Fill screen black
      pygame.draw.circle(screen, (255, 0, 0), (249.5, 249.5), tile_size / 2)
      cursor_tile = [i // tile_size for i in pygame.mouse.get_pos()]
      pygame.draw.rect(screen, (0, 0, 255), ((cursor_tile[0] * tile_size, cursor_tile[1] * tile_size), (tile_size, tile_size)))
      dirs = get_dirs((12, 12), cursor_tile)
      for i, dir_ in enumerate(dirs, 1):
      text = font.render(f"{i}", True, (255, 255, 255))
      rect = text.get_rect()
      rect.center = get_pos(dir_)
      screen.blit(text, rect)
      screen.blit(font.render(dirs, True, (255, 255, 255)), (0, 0))
      dirs2 = get_dirs2((12, 12), cursor_tile)
      for i, dir_ in enumerate(dirs2, 1):
      text = font.render(f"{i}", True, (255, 255, 255))
      rect = text.get_rect()
      rect.center = get_pos(dir_, 2)
      screen.blit(text, rect)
      screen.blit(font.render(dirs2, True, (255, 255, 255)), (0, 20))
      pygame.display.flip()
      clock.tick(60)
      for event in pygame.event.get():
      if event.type == pygame.QUIT:
      running = False
      pygame.quit()
      if __name__ == "__main__":
      main()

  • @hyankabeer5840
    @hyankabeer5840 7 หลายเดือนก่อน

    21:53 If there’s two things you learn from coding (apart from how to code obviously), they are to never assume that something works without testing it, and extreme perseverance

  • @ELITE-CHIEF-DRILL-MAN-ko3yp
    @ELITE-CHIEF-DRILL-MAN-ko3yp 4 หลายเดือนก่อน

    0:35 you could do a wireless remote with command blocks
    (I know, it’s not redstone that much but if u use the command /setblock {coordinates} redstone_block,
    It can be a redstone component)

  • @henrisendelbach
    @henrisendelbach 18 วันที่ผ่านมา

    Noteblocks also change textures on instruments. Uding blockstates, you can just push for example a gold block under it to change the texture for the final level

  • @SilasBaker-rm1he
    @SilasBaker-rm1he 6 หลายเดือนก่อน +1

    I LAUGHED OUT LOUD when I hears the Mark Rober music playing when you were explaining Blinky's chase mode! 23:36
    This content is amazing! Thanks Sloimay!

  • @TheTylerCathey
    @TheTylerCathey 9 หลายเดือนก่อน +1

    2:48 congrats on the girl man 🔥 hope yall happy

  • @AnonUsername473
    @AnonUsername473 9 หลายเดือนก่อน

    I cannot muster any words to explain how awesome this project is. Great job!
    These videos also helped me underdtand logic gates hahah

  • @yashwatal7955
    @yashwatal7955 8 หลายเดือนก่อน

    I found myself pauing the video, and just marvelling at how smart you are. The amount of times I swore out land beacuse of your cool ideas.. this is so cool man. seriously, you make me not regret taking a comp sci/comp e degree!

  • @Karmadillo-qh3jv
    @Karmadillo-qh3jv 9 หลายเดือนก่อน

    0:17 I think for me I wanna see more unique and interesting machines like docm77’s shadow item machines or the mess detectors. Or anything so absurdly silly and impossible, purely for the lols.
    Great vid! I appreciate you and the technical mc community’s tenacity and intelligence when it comes to this stuff.

  • @justinindustries
    @justinindustries 9 หลายเดือนก่อน

    Wow! This is actually awesome. I've been following your channel for a while now, and the progression is real! 😎

  • @cmilkau
    @cmilkau 9 หลายเดือนก่อน

    Absolutely amazing project! Circuitry could have been a lot simpler with more prior thinking, maybe that could've made it faster and easier to build. But the harder path was probably rewarding in its own ways too.

  • @halftoasty
    @halftoasty 7 หลายเดือนก่อน +2

    I like your funny words, Magic Man

  • @TMHMooseMoss
    @TMHMooseMoss 9 หลายเดือนก่อน

    you don't need to calculate distances to get the ghost directions. you just need to know which direction the target is, which only requires 2 subtraction operations and 4 comparison operations. this gives you an ordered list and the tiebreaker logic is baked into the operation as well. here's some psudocode:
    dX = ghoX - tarX;
    dY = ghoY - tarY; //this arrangement is for top-right origin, for bottom-right use: dY = tarY - ghoY
    if(|dX| < |dY|) { //determine which axis is more aligned
    if(dY >= 0) {out[0] = up; out[3] = down;} //the sign of the distance indicates direction
    else{out[0] = down; out[3] = up;}
    if(dX >= 0) {out[1] = left; out[2] = right;}
    else{out[1] = right; out[2] = left;}}
    else {
    if(dY >= 0) {out[1] = up; out[2] = down;}
    else{out[1] = down; out[2] = up;}
    if(dX >= 0) {out[0] = left; out[3] = right;}
    else{out[0] = right; out[3] = left;}}

  • @russ1669
    @russ1669 9 หลายเดือนก่อน

    Fantastic achievement. Thanks for the explanation. Great video.

  • @lajawi.
    @lajawi. 8 หลายเดือนก่อน +1

    28:03 A noteblock that's powered is in a different blockstate, isn't it? So you could very well make the textures for it too!

  • @GreaterD
    @GreaterD 9 หลายเดือนก่อน

    for the distance between the ghosts and the Target Tile, you could have used the Manhattan distance formula since you use a tile based coordinate system

  • @dulacgaming
    @dulacgaming 9 หลายเดือนก่อน

    I think you outdid yourself with this one. Absolutely amazing work!

  • @Soda-y6p
    @Soda-y6p 8 หลายเดือนก่อน

    Honstely amazing, sat through the video from start to finish in astonishment

  • @musclechicken9036
    @musclechicken9036 9 หลายเดือนก่อน

    For the distance calculator I had an idea. I’m not sure if this would work or if this is a good explanation, but what if you compared the dx and dy distances from the current location to the target location, chosen the biggest one, and moved parallel to to that coordinate towards the target. If you aren’t able to (it is a wall) then you would choose the other direction that is parallel to the other coordinate facing the target, and if this didn’t work, you would do the reverse of the algorithm above for the two directions facing away from the target.

  • @justsomeguy3267
    @justsomeguy3267 9 หลายเดือนก่อน +3

    About 20 minutes in, and I have a question: Is there any reason to square dx and dy? Surely, if you only care about which distance is larger, you could just do |dx| + |dy|?

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

    "just redstone" literally checks the innerworkings of the game to have animated pacman n ghosts. good job lol

  • @m4rt_
    @m4rt_ 8 หลายเดือนก่อน

    fun fact, when doing pytharogas theorem to compare differences, you don't need to do the square root, you can just compare the squared versions since how they compare won't change as long as they are both squared.
    So for example, if you want to see if a distance is 3 or more, you can just do 3*3 >= dx*dx + dy*dy
    (you could also hardcode 3*3 as 9 if you want it to be even faster.)
    Edit 19:35: ah lol, you seam to know this trick too.