Drawing Walls - 3D in Pico-8 #1

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 43

  • @abelperez1827
    @abelperez1827 3 роки тому +39

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

  • @Synthxrt
    @Synthxrt 2 роки тому +23

    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.

  • @just_banana3624
    @just_banana3624 3 роки тому +40

    This is underrated.

    • @sIak-
      @sIak- 3 роки тому +1

      No cap

  • @coolblubird
    @coolblubird 3 роки тому +21

    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 роки тому +5

      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??

  • @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!

  • @samueldykes2938
    @samueldykes2938 3 роки тому +3

    This is awesome! Really well explained.

  • @_felix128old2
    @_felix128old2 3 роки тому +8

    part 2: rtx in pico 8

  • @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.

  • @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

  • @RetsaGames
    @RetsaGames 3 роки тому +3

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

  • @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

  • @CutieFakeKirby
    @CutieFakeKirby 3 роки тому +3

    Cool wolf3d recreation in the start ;)

  • @lamadomangue
    @lamadomangue 3 роки тому +2

    amazing!! keep it up my mannn thank you!

  • @nemene8585
    @nemene8585 3 роки тому +1

    You are a madman

  • @mediocre.leader
    @mediocre.leader 2 роки тому +1

    we are closer to doom on pico 8

    • @ovecka17
      @ovecka17 2 роки тому +1

      look up poom

  • @imlxh7126
    @imlxh7126 3 роки тому +1

    HELLOOOOOOO I'VE BEEN WAITING FOR SOMETHING LIKE THIS

  • @marcuskobel6562
    @marcuskobel6562 2 роки тому +1

    Impressive!

  • @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.

  • @D0S81
    @D0S81 Рік тому

    spacecat?

  • @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!

  • @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?

  • @TimBynum01
    @TimBynum01 3 роки тому

    amazing, thank you!

  • @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.

  • @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.

  • @Kyss007
    @Kyss007 3 роки тому

    im blinking fast and looking confused

  • @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.

  • @elnico5623
    @elnico5623 2 роки тому

    you should fix the fisheye effect

  • @errantwashere
    @errantwashere 3 роки тому

    Errant was here