Drawing Walls - 3D in Pico-8 #1

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

ความคิดเห็น • 43

  • @abelperez1827
    @abelperez1827 3 ปีที่แล้ว +38

    Lets goooo, the pico 8 community needed a updated video on raycast

  • @Synthxrt
    @Synthxrt 2 ปีที่แล้ว +22

    pico 8 is the best thing thats happened to me as a beginner who always wanted to get into game dev, its simple enough that i can learn and let my creativity loose but powerful and capable enough that i can still do challenging projects and really put my determination and skills to the test.

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

      same dude, I love this thing

  • @just_banana3624
    @just_banana3624 3 ปีที่แล้ว +40

    This is underrated.

    • @sIak-
      @sIak- 3 ปีที่แล้ว +1

      No cap

  • @coolblubird
    @coolblubird 3 ปีที่แล้ว +20

    I legit know nothing about raycast or how this works but this is definitely helping a lot, i cant wait to see future videos.

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

      I'm glad it helped, more is on the way.

    • @leandrojose3887
      @leandrojose3887 3 ปีที่แล้ว

      Como é possível um sistema 8 bits fantasia manipular um sistema 3d melhor que sistemas 16 bits como Mega e SNes??

  • @_felix128old2
    @_felix128old2 3 ปีที่แล้ว +8

    part 2: rtx in pico 8

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

    Amazing video. Wolfenstein3D looks less like coding black magic and more like math now

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

    VERY helpful. Please carry on doing these kinds of videos

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

    Can't wait for part 2. I think this channel will be one of my favourites!

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

    I watched javidx9s video on ray tracing using this same method but wasnt able to translate his code so this helps alot

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

    Cool wolf3d recreation in the start ;)

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

    This is awesome! Really well explained.

  • @mediocre.leader
    @mediocre.leader 2 ปีที่แล้ว +1

    we are closer to doom on pico 8

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

      look up poom

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

    Interesting.
    Some idea I used:
    You can just draw boxes where there are boxes in a fashion you define. Like a special render of a string array:
    (1)"wwwwwddwwwwww"
    (2)"w w"
    (3)"w ii w"
    (4)"w w"
    Any turn is just an angle and you limit the drawing to the angle (viewport) and update when changes happen. It's important to update visible monsters, though.

  • @nemene8585
    @nemene8585 3 ปีที่แล้ว +1

    You are a madman

  • @itspop4real272
    @itspop4real272 3 ปีที่แล้ว +1

    rly good video, i understand being awkward on a video cuz ur new, dont worry, its rly good, u got this :D

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

    Impressive!

  • @lamadomangue
    @lamadomangue 3 ปีที่แล้ว +2

    amazing!! keep it up my mannn thank you!

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

    Is there a code for the player movement? It looks like there's some code that was already assumed to be implemented (i.e. player x/y and player angles).

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

      A raycasting game(this is technically ray marching, but it doesnt matter) is just a 2d game built on a grid. Like looking at a 3d game top down. Just add to the x and y, with a little rotation sin()/cos() magic, and it moves like normal!

  • @DerClaudius
    @DerClaudius 3 ปีที่แล้ว

    I'm not even using pico-8, but that's good shit, thanks

  • @imyasuka
    @imyasuka 3 ปีที่แล้ว

    you can remove the fisheye effect.

  • @imlxh7126
    @imlxh7126 3 ปีที่แล้ว +1

    HELLOOOOOOO I'VE BEEN WAITING FOR SOMETHING LIKE THIS

  • @D0S81
    @D0S81 ปีที่แล้ว

    spacecat?

  • @TimBynum01
    @TimBynum01 3 ปีที่แล้ว

    amazing, thank you!

  • @charl2182
    @charl2182 3 ปีที่แล้ว

    pico from game

  • @achtunger5528
    @achtunger5528 3 ปีที่แล้ว +1

    Great.
    *Now make Wolfenstein 3D.*

    • @devquest9126
      @devquest9126  3 ปีที่แล้ว

      I'm not quite there yet, but I think you'll approve of the textures I used in section 2.

  • @ashtmslf2315
    @ashtmslf2315 3 ปีที่แล้ว

    somebody will recreate wolf-3d on pico 8

    • @devquest9126
      @devquest9126  3 ปีที่แล้ว

      They've already done Doom, I'm sure pico-8 Wolfenstein is out there somewhere too.

  • @Kyss007
    @Kyss007 3 ปีที่แล้ว

    im blinking fast and looking confused

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

    This, and I kid you not, is pretty much exactly how the old doom arcade games work

    • @hansdietrich83
      @hansdietrich83 3 ปีที่แล้ว

      No shit, sherlock...

    • @charbomber110
      @charbomber110 3 ปีที่แล้ว

      DooM arcade games??? Where?????

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

      ​@@charbomber110 is you are have the stupids?

  • @bjh3661
    @bjh3661 3 ปีที่แล้ว +1

    lost me at 2.35

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

      Sorry about that, I'm not very good at explaining things. The goal of the algorithm is to check every point where the ray intersects the grid, and then see if there's a wall tile at that intersection point. That way we can find the closest point where the ray hits a wall, and then we will know what to draw on the screen.
      It turns out that if you count the horizontal and vertical intersections separately, it's easier to iterate through them all. That's what the pink and orange markings are, the intersections with vertical lines and the intersections with horizontal lines, respectively. The distance from one pink marking to the next is always the same, so we can just add that amount to our distance over and over to keep finding the next pink marking along the line. We can do the same for the orange markings as well, with a separate variable, and that way we know we'll check every possible intersection point.
      When I talk about moving up and moving to the right, that's because we're also keeping track of the tile that the ray is hitting at our current distance. If the tile the ray hits is empty, we can move on to check the next tile. We're always working with the shorter of the two distances I talked about earlier, whichever one that happens to be. Which one of the two we just checked can tell us whether the tile above or the tile to the right is the correct next one along the ray.
      If we do all this correctly, what we end up with is an algorithm that keeps track of a tile location, and every iteration it moves to the next tile along the ray, using two distance variables to make sure it is checking the right tiles. As soon as it finds a wall tile, the loop stops because that's the point where the ray hits a wall. At that point, the shorter of the two distance variables is the total distance the ray has traveled uninterrupted before hitting the wall, so we can use that knowledge to draw it on the screen properly.
      Sorry for the essay, I just wanted to be thorough. I hope this clears things up at least a little. Thanks for the feedback.

  • @errantwashere
    @errantwashere 3 ปีที่แล้ว

    Errant was here

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

    you should fix the fisheye effect