TIC-80 Beginner Tutorial #23 - Flags , fget () in map

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

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

  • @Phodis
    @Phodis 3 года назад +1

    Thought I'd play around with TIC80 and this was a great tutorial, thank you!.

  • @hootingsalmon0062
    @hootingsalmon0062 3 года назад

    Thank you so much for this tutorial.
    I am really struggling with collisions for my game, and this really helps
    Thanks!!!!!

    • @PotatoImaginator
      @PotatoImaginator  3 года назад +1

      Sure , thanks :)
      There are other videos like this

  • @repenetrator
    @repenetrator 3 года назад +1

    banger tutorial my good lad

  • @ATS-uy4vl
    @ATS-uy4vl 3 года назад +1

    Very good

  • @Foxnataa
    @Foxnataa 3 года назад +1

    is so good!

  • @Karol-qi5yx
    @Karol-qi5yx 3 года назад +1

    Master :)

  • @Unknown-mo2iy
    @Unknown-mo2iy 3 года назад +1

    I didn't understand the dir value can you help?

    • @PotatoImaginator
      @PotatoImaginator  3 года назад

      Sure ,
      btnp(0) - Up ( dir = 0 )
      btnp(1) - Down ( dir = 1 )
      btnp(2) - Left ( dir = 2)
      btnp(3) - Right ( dir = 3 )
      Now , dir_x={ [0] =0 , 0 , -1 , 1 }
      dir_y = { [0] = -1 , 1 ,0 ,0 }
      Now
      x=x + dir_x[dir]
      y=y + dir_y[dir]
      -- UP
      dir =0 -> x=x+dir_x[0] -> x=x
      -> y=y+dir_y[0] -> y=y - 1
      -- DOWN
      dir =1 -> x=x+dir_x[1] -> x=x
      -> y=y+dir_y[1] -> y=y + 1
      -- LEFT
      dir=2 -> x=x+dir_x[2] -> x=x-1
      -> y=y+dir_y[2] -> y=y
      -- RIGHT
      dir=3 -> x=x+dir_x[3] -> x=x+1
      -> y=y+dir_y[3] -> y=y
      Now ,
      if btnp(0) then
      dir=0
      elseif btnp(1) then
      dir=1
      elseif btnp(2) then
      dir=2
      elseif btnp(3) then
      dir=3
      end
      if dir~= -1 then ( that is dir =0 , 1 , 2 , 3 )
      x=x+dir_x[dir]
      y=y+dir_y[dir]
      end
      dir = -1 ( If no button is pressed )

  • @user-Gato_404
    @user-Gato_404 3 года назад +2

    Hi