How I Coded Doom in JavaScript (Beginner)

Поделиться
HTML-код
  • Опубликовано: 12 май 2024
  • Follow along by entering the code into the free online code editor at editor.p5js.org
    My code: editor.p5js.org/moonloops/ske...
    #p5js #3d #javascript #coding #codingtutorial #doom #javascriptgame
  • НаукаНаука

Комментарии • 21

  • @mohamadabdeen6906
    @mohamadabdeen6906 20 дней назад

    first time hearing of p5 ,and first timing trying to implement a game ,i had fun thank you for this great video .

  • @itzindiandude
    @itzindiandude 4 дня назад

    greatttttttt🔥🔥🔥🔥🔥

  • @user-is3xy7uf1z
    @user-is3xy7uf1z 24 дня назад +13

    this isn't doom, this is wolfenstein 3d. doom uses binary space partitioning (BSP) to make areas with different heights

    • @moonloopsdev
      @moonloopsdev  24 дня назад +7

      yes, you're right. I considered calling it Wolfenstein 3d (which celebrated 32 years on the 5th of May) ... but I worried not many people would know what that was! (p.s. how good was Wolfenstein 3D!)

  • @itzindiandude
    @itzindiandude 4 дня назад

    🐐🐐🐐🐐🐐🐐🔥🔥🔥🔥

  • @user-dm3fd2ib8g
    @user-dm3fd2ib8g 22 дня назад

    Looks good, but you check collision with each wall, even the one on the other side of the map.

    • @moonloopsdev
      @moonloopsdev  22 дня назад

      Yes, that's a good point. How would you improve on it? :)

    • @Mano-us7ct
      @Mano-us7ct 22 дня назад

      ​@@moonloopsdev Make the character check if the move he is trying to complete is possible or not.

    • @moonloopsdev
      @moonloopsdev  22 дня назад

      It’s a good idea. I’m just wondering though how we would know if a wall is close to us or not? Wouldn’t we still need to loop? (Maybe there is a better way to do it, I just can’t think of it right now.)

    • @moonloopsdev
      @moonloopsdev  22 дня назад

      Never mind, a potential answer just came to me: maybe we could have a grid system? That way we’d only need to check walls in the same, or adjacent grids?

    • @Tobsson
      @Tobsson 21 день назад

      ​@@moonloopsdevthats it. A matrix will solve this issue.

  • @digitic3551
    @digitic3551 21 день назад

    amazing how you did it without using three.js

    • @moonloopsdev
      @moonloopsdev  21 день назад

      It’s p5.js - webgl is built in! Really easy and fun to play around

  • @wolf7115
    @wolf7115 23 дня назад

    Is there anything that JavaScript can't do?

    • @moonloopsdev
      @moonloopsdev  23 дня назад +1

      Haha, if only it could clean my wardrobe

    • @pje_
      @pje_ 21 день назад

      it cannot install a system on your computer

    • @moonloopsdev
      @moonloopsdev  21 день назад

      Actually, it can! Have a look at www.electronjs.org/

    • @pje_
      @pje_ 21 день назад

      @@moonloopsdev without electron, plain js

    • @moonloopsdev
      @moonloopsdev  21 день назад

      @pje_ haha, ok, you’ve got me there 🤣