MAKING A GAME In 3 Easy Steps Using Love2D & Lua (1/3)

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

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

  • @ttanh1255
    @ttanh1255 2 года назад +21

    I came looking for copper and found gold. This is absurdly amazing compared to many other tutorials. Can't find another tutorial to be such beginner friendly.

    • @DevJeeper
      @DevJeeper  2 года назад +2

      Haha, thank you! I'm glad to hear that you found the videos helpful :D

  • @angiii-1717
    @angiii-1717 10 часов назад

    Hi, I know the video is kinda old now. But I wanted to thank you, I'm completely new to programming and this is the only tutorial that worked for me

  • @mysterious_monolith_
    @mysterious_monolith_ Год назад

    4:15 This is the first video that I've ever seen that explains what an 'argument' is. So many other programming & game making tutorials use the term without explaining what it is. I was planning to look it up and try to find out what it means, but I hadn't gotten around to it because there is so much to learn, it wasn't the highest priority. Thanks for going into detail.

    • @DevJeeper
      @DevJeeper  Год назад

      That's nice to hear, best of luck! :)

  • @a_wild_Kirillian
    @a_wild_Kirillian 3 года назад +5

    Thanks for that superb tutorial series! You're really good at conveying information and engaging the viewer. And as pointed out it's a nice show of code structuring

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

      Glad to hear it was helpful! :D

  • @borsukk
    @borsukk 4 года назад +3

    I was scripting before in Multi Theft Auto and I have a lot knowedge, don't need watch tutorials but this one is great! I love this! Waiting for more stuff

    • @DevJeeper
      @DevJeeper  4 года назад

      That's really cool to hear, thank you! Later down the line I will be covering more advanced topics as well!

  • @HE360
    @HE360 3 года назад +4

    I'm already a programmer. But, I'm using this video to adopt a few more techniques and ideas and this video makes it easy.

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

      Happy to hear that you found it useful, even with your previous experience :)

  • @Caineghis20
    @Caineghis20 2 года назад +3

    In future videos please zoom a littlebit in. My screen is not that big and full screen is not nice, because I switch between VScode an youtube.
    But all in all thank you for this video series. I learn a lot. :)

    • @DevJeeper
      @DevJeeper  2 года назад +3

      Thank you for the feedback, this is something that has changed in the later videos :)

  • @DomingoG-n2i
    @DomingoG-n2i 3 года назад +3

    I promised my eight-year-old nephew that if he left a little fornite, I would teach him how to make his own games (on roblox, c #, c ++, at 8 I don't want to put him off), but like everything in its time, i gave him my lua guide from my youth today, he hasn't let go all day and he has already written his first lines of code on his phone. I just read the roblox api and I thought that diving it first in love2D would be a good deal because it is much more affordable for its young age. So thank you for helping me get back into it. By the way, if you have a problem with dt, put this at the start of the Player: update () block => dt = love.timer.getDelta (), hope that helps.

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

      It's a really great idea to teach kids programming, it will help them a lot in life!
      I would recommend against setting dt manually, then you will need to do it everywhere. The most likely reason it did not work for you is that you have forgotten to pass dt at some point. In love.update(dt), you need to call player:update(dt). Inside of your player file you need to declare player:update(dt) with a dt inside of it. If this does not solve the issue, you can send me the code (use pastebin or google drive) and I will have a look.

    • @DomingoG-n2i
      @DomingoG-n2i 3 года назад

      @@DevJeeper Thanks friend. I'm well placed to know that kids only have the limits that we the parents are giving to them.

  • @DevJeeper
    @DevJeeper  4 года назад +2

    No idea what Löve is? Check out my introduction video to Löve: ruclips.net/video/ZQCky-_Ad5Y/видео.html
    Little to no Lua/programming experience, check out my crash course in Lua: ruclips.net/video/xRKIIV4-cfk/видео.html
    Make sure to join our DISCORD server: discord.gg/mUaVASvG4z :)
    Full source code: github.com/Jeepzor/Pong-tutorial

  • @turtle8558
    @turtle8558 3 года назад +15

    This is the 3rd time I'm making pong to learn a language, I'm 12 lol

    • @changedev.198
      @changedev.198 3 года назад +1

      My 2nd......

    • @SophisSnow
      @SophisSnow 2 года назад

      My 1st lol

    • @amalbhandari5227
      @amalbhandari5227 2 года назад

      Bro, this is my tenth time, and I'm 12 too

    • @DevJeeper
      @DevJeeper  2 года назад +1

      Is this the secret pong-making club? :D

    • @turtle8558
      @turtle8558 2 года назад +1

      @@DevJeeper only the least skilled of programmers can join this, sadly I had to leave as I made a score based game I'm 14 now

  • @PatheticRobot
    @PatheticRobot 2 года назад

    Just got interested in programing in Lua and Löve, and your videos are helping a lot!
    Even if I'm doing everything using my phone I think I'll be able to make something.

    • @DevJeeper
      @DevJeeper  2 года назад +1

      Mad respect programming on your phone! Best of luck :)

  • @NickTrombetti
    @NickTrombetti Год назад

    the feeling of just being able to move is great

    • @DevJeeper
      @DevJeeper  Год назад +1

      It sure is! (☞゚ヮ゚)☞

  • @DevlogBill
    @DevlogBill 2 года назад

    Wow, I didn't watch the whole video but from what I had seen already it seems that it is much easier to make game with Lua in comparison to JavaScript. For example, to make a pong game you could use something called HTML CANVAS. Where you would have to perform lots of code rush to create a simple pong game, excellent video.

    • @DevlogBill
      @DevlogBill 2 года назад

      @@dreamy97836 Yea I am still learning, I never used a library or framework yet only Vanilla JavaScript. I have lots to learn. But I like the syntax of Lua and I read good things about this language. One day I will try this out.

  • @alexandruserban5227
    @alexandruserban5227 3 года назад +2

    Great videos

  • @nikolanojic6861
    @nikolanojic6861 11 месяцев назад

    Great video !

  • @franquealencar
    @franquealencar Год назад

    Hi Jeeper, i'm watched two videos before this about learning love/lua, you make a brilliant work explaining things about game dev with love and lua. I'm a guy wich love video game and think learning game dev for years. A long time search material like this, i loved your videos, hoewever this video sequence in three parts, do not have correctly english to portuguese brazilian translator , only Vietnam language to portuguese brazilian and its wrong. Please help me to understandand the class, the concepts and continue learning game dev, thank you for all!

  • @tyland6732
    @tyland6732 4 года назад +11

    this is gonna be my first game, and also i am 12 and becoming a game dev lol

    • @DevJeeper
      @DevJeeper  4 года назад +5

      That’s super cool! You are starting out earlier than I did :)
      If you run into any issues let me know and I will do my best to help you. Good luck!

    • @tyland6732
      @tyland6732 4 года назад +5

      @@DevJeeper thank you!! Your tutorials are really helpful and intuative. If it weren't for you, I wouldn't know how to call in a different file into the game. Thank you! If my game does realease soon I will tell you where you can find it! Your the absoulute best!! You also taught me how to make simple equations in the game so then the player starts in a certain spot. I can't put in words how much you have helped me. You literally taught me everything I need to know on how to make a game, and at the end of the tutorial you even showed how to decorate the game too! Without that I wouldn't have been able to call in an image, let alone have it has the player! Also the simple making of the AI helped me understand in depth on how this programming language works. You really are the best and deserve a lot more than what you have. (btw i also code on windows with atom text editor, Atom is really great!)

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

      I'm 14

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

      @@DevJeeper Hey it's me again. Some things happened to say...... basically I didn't really start this project until now. Not sure why, but I did check out some other things like Pygame before settling on LOVE2D. For some reason it won't let me multiply the speed by delta time, giving the error of player.lua:18: appempt to perform artihmetic on local 'dt' (a nil value)." I tried to search it up online on forums and whatnot, but nothing seemed to fix it. This happens every time that I try to move the paddle, and if I remove multiplying self.speed by dt then everything works fine. Not sure what the problem is.

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

      @@tyland6732 Could you give me a link to your code? I would love to take a look and help you out! :)

  • @frenzhii184
    @frenzhii184 2 месяца назад

    So my editor doesn't predict or show me options for the blue text. Do I need to find a different editor? or is there someplace I can memorize all of these? I am referencing the blue text like, isDown, getHeight ect.

  • @changedev.198
    @changedev.198 3 года назад +3

    lua isn't so different from c#, but I cant help but add a semi colon.....

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

      Good thing that semicolons don't break lua, it's simply ignored by the interpreter :)

  • @Loopa300
    @Loopa300 8 месяцев назад

    This might be very late but I want to use for example player.x and player.y instead of self.x and self.y. When I replace it it gives an error do you know why?

  • @nitro8067
    @nitro8067 Год назад

    For some reason when I run the program, it shows a black screen. Can you help me?

  • @FireballRblx
    @FireballRblx Год назад +1

    5:19 my place

  • @tri99er_
    @tri99er_ 3 года назад +2

    I have a problem. LOVE tells me "attempt to index local 'self' (a nil value)" in Player.lua. It only happens after I moved code from Player:update to Player:move(dt) and Player:checkBoundaries().

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

      Full error:
      Error
      player.lua:29: attempt to index local 'self' (a nil value)
      Traceback
      player.lua:29: in function 'checkBoundaries'
      player.lua:13: in function 'update'
      main.lua:8: in function 'update'
      [C]: in function 'xpcall'

    • @tri99er_
      @tri99er_ 3 года назад +2

      Sorry, I am an idiot and assumed you can call functions using '.', but you used ':' instead and I didn't notice it. It turns out you need to use ':' to supply self.

    • @DevJeeper
      @DevJeeper  3 года назад +3

      Nothing to say sorry about; you are not an idiot. These things happen to everyone! :)

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

      I am glad someone else had this problem and got it fixed, I was wondering what happened.

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

    Hi, I have problem understand xVel and yVel. I googled it and it's say it's the speed + direction.

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

      You could think of velocity as an objects current movement speed. X & Y let us know which axis that movement takes place on.
      Negative Y velocity = Going up
      Positive Y velocity = Going down
      Negative X velocity = Going to the left
      Positive X velocity = Going to the right
      If the Y-velocity is 100, then it is traveling down 100 pixels per second (since we multiply it with dt)

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

      @@DevJeeper so if I understand correct it's like saying speed.x and speed.y. its the direction of movement of the ball.

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

      @@darthom Correct, the direction comes from whether or not the value is negative/positive, and the number is simply how fast it is going. So 10 is slower than 100, and -10 is slower than -100.

  • @JellybeanSTUDIOS
    @JellybeanSTUDIOS 3 года назад +2

    error : main.lua:4: attempt to index global 'Player' (a nil value)
    help.

    • @DevJeeper
      @DevJeeper  3 года назад +2

      The error only tells me part of the problem, kind of like an editor reviewing your book and saying "There are some problems on page 437, paragraph 3". Without the book, or in this case the code I can only guess. So if none of my guesses solve the problem, please send me the code (preferably with a google drive link). Possible reasons:
      You forgot to require the player file in main.lua.
      You named the table "player" but call it "Player", it's case sensitive.

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

      @@DevJeeper I got the same error, here is the code I wrote:
      Player = {}
      function Player:load()
      self.x = 50
      self.y = love.graphics.getHeight() / 2
      self.width = 20
      self.height = 300
      self.speed = 500
      end
      function Player:update(dt)
      end
      function Player:draw()
      love.graphics.rectange("fill",self.x,self.y,self.width,self.height)
      end
      And this is the error:
      Error
      player.lua:4: attempt to index local 'self' (a nil value)
      Traceback
      player.lua:4: in function 'load'
      main.lua:7: in function 'load'
      [C]: in function 'xpcall'
      [C]: in function 'xpcall'

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

      Edit: I think I found the error, inside main.lua I accidentally wrote Player.load() /.update() /etc instead of Player:load()

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

    When I first installed Atom It didn't have an option for Lua coding but I managed using community packages but I'm starting to think it's breaking some things and it's also making me uncomfortable with the "style" I guess, can you tell me how you got Lua on your Atom?

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

      For the syntax highlighting I use this package: gyazo.com/a75484c643f67f9e9becf6505537a79c
      On top of that I have made my own stylesheet which sets the colors (to the ones you see in the video).
      Is this something you would like me to cover in a video?

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

      @@DevJeeper oooooh yes please! Thanks!

  • @KevanEvans
    @KevanEvans 2 года назад

    hey i deleted my last comment for some reason but now i fixed it but i have a new problem
    what is that symbol at 5:01 next to self.speed?

    • @DevJeeper
      @DevJeeper  2 года назад

      As I say in the video, we multiply it, aka *
      :)

    • @KevanEvans
      @KevanEvans 2 года назад

      @@DevJeeper sorry idk much about lua language

  • @changedev.198
    @changedev.198 3 года назад +1

    Do you have a discord server?

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

      No I don't have one... yet :)

  • @dodoseal
    @dodoseal 2 года назад

    Great Tutorial but something isn't working for me. When I draw the rectangle, it doesn't show up.

    • @DevJeeper
      @DevJeeper  2 года назад

      Since you asked another question in the next video I assume you resolved this problem?

    • @dodoseal
      @dodoseal 2 года назад

      @@DevJeeper yeah. I know you needed to call the functions in the main.lua. I know lua I just don’t know the love version of it.

  • @drikting
    @drikting 2 года назад

    Hmmm am I missing something? Followed up to the point of drawing the rectangle but nothing showed up, just a blank black screen and no error even with console = true, no console window popped up on Mac. And yes, main.lua file has the Player functions inserted as taught.
    Also tested with a previous Love2d version on replit with the same blank screen result.
    Any advise? :) Thanks for the tutorials!

    • @DevJeeper
      @DevJeeper  2 года назад

      Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord or alternatively email :)

  • @gideont1144
    @gideont1144 Год назад

    what does attempt to index global 'Player' (A nill value) mean

    • @DevJeeper
      @DevJeeper  Год назад

      Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord 🙂

  • @winksplorer
    @winksplorer 4 года назад +2

    Help! My Player Wont Move Infinitely, it only moves a couple of pixels before its not moving!

    • @DevJeeper
      @DevJeeper  4 года назад

      I would love to help, but I need to see your code . Send it with google drive or pastebin 👍

    • @winksplorer
      @winksplorer 4 года назад +2

      @@DevJeeper never mind! i just did some weird things which caused it too, btw this tutorial helped me make a space game in love2d

    • @DevJeeper
      @DevJeeper  4 года назад +1

      Thanks for letting me know, and good job on solving it yourself. Awesome to hear that you used the videos to create something entirely different on your own! I would love to try it out if you want to share it :)

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

    Is it OOP in Lua ? "Self", reminds me Python language.

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

      Technically there is no object oriented programming in Lua since there are no "real objects". However, lua gives you all of the tools to emulate it. Colon simply passes the table as an argument which is named self. You could get the exact same result by doing:
      function Player.printHealth(self)
      print(self.hp)
      end
      and then calling it:
      Player.printHealth(Player)
      or
      Player:printHealth()

  • @theBigNine
    @theBigNine 2 года назад

    Hello, first of all, thank you so much for this tutorial! Glad to found a 'lua' tutorials for beginner like me. Thanks :)
    .
    By the way, I have some questions regarding the functions inside the Player:update function
    this code:
    ---
    function Player:move(dt)
    if love.keyboard.isDown("w") then
    self.y = self.y - self.speed * dt
    elseif love.keyboard.isDown("s") then
    self.y = self.y + self.speed * dt
    end
    end
    ---
    1. First question is, can you (or maybe someone) explain the logic? I could not understand this function. I know that the self.y is the coordinate of the player in regards to y axis (CMIIW) and self.speed is how fast the player move on pixel/second (CMIIW).
    but how does this two (self.y and self.speed) make the player move up and down when there is no definition of direction within the function (like self.y + 300 or self.y -300)? I hope my question makes sense :)
    i just can't understand how that 20x100 white box could move up and down, when only it self.y (coordinate) and self.speed (speed) use in the function without actually determine the direction of the movement in the y axis (like -y or +y)?
    would be really helpfull if someone could elaborate, i want to include this in the comment of the code. thanks again.

    • @DevJeeper
      @DevJeeper  2 года назад

      self.y is set to self.y minus or plus the speed. Since speed is just a number, it simply decreases or increases the y position :)

    • @theBigNine
      @theBigNine 2 года назад

      @@DevJeeper Oh, so in other words, self.speed is the one that determine the direction of the movement of the box in y axis in the code:
      self.y = self.y - self.speed * dt
      ? Thanks for the answer!

    • @DevJeeper
      @DevJeeper  2 года назад

      Correct, there you subtract it, meaning it goes up. If you did + self.speed it would go down

    • @theBigNine
      @theBigNine 2 года назад

      @@DevJeeper thanks for the explanation :)
      .
      also thanks for all the efforts in making lua-love2D tutorials :) it helped me a lot in learning lua and also in programming :))

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

    how can i put highscore ?

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

      Sorry for the late reply, I have added it to my todo-list and will cover it in a future video!

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

    Quite late to this but the big problem i have right now is that the object wont move

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

      If you send me your code (Preferably through Discord or mail) I will help you out! :)

  • @dakumasuta1303
    @dakumasuta1303 2 года назад

    the white tile dosent appear

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

    why my letters dont have colors like yours?

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

      I made a gif for you which hopefully explains it: gyazo.com/a826070355e7b306f92366e7c7aaa594
      Let me know if you need any further help :D

  • @snakelele4148
    @snakelele4148 4 года назад +1

    I've copied your code exactly and I'm getting the error "player.lua:21: attempt to perform arithmetic on local 'dt' (a nil value)". The only way to fix this is to take out dt in the line "self.y = self.y - self.speed * dt" but obviously that isn't ideal. Is there any way I can fix this?

    • @DevJeeper
      @DevJeeper  4 года назад +2

      For me to be able to say what the reason is with certainty I need to see your code. The error code allows to make a couple of guesses though.
      First of all, the problem is that “dt” is equal to nil, meaning it’s not available in the scope of the function. My best guess is that you either forgot to include “dt” as an argument when calling the function, or in the function itself. Alternatively you use a colon in the function but a dot when you call it.
      If neither of these are the cause then I need to see the code to help you.

    • @snakelele4148
      @snakelele4148 4 года назад +1

      @@DevJeeper i.imgur.com/a23udeK.png here's a link to a snapshot of my code. I'm sure its identical to yours

    • @DevJeeper
      @DevJeeper  4 года назад +4

      It would go faster if you included the full code, there are multiple different things that could be wrong. Now right now the most likely reason is that you called "Player:update()" in the main.lua file, omitting to pass "dt".

    • @snakelele4148
      @snakelele4148 4 года назад +2

      @@DevJeeper That is actually exactly it thank you so much. Comparing my code to yours was like the most annoying game of spot the difference haha

    • @DevJeeper
      @DevJeeper  4 года назад +2

      @@snakelele4148 You are most welcome! Getting an error with "dt" being nil is actually a fairly common thing, because it's very easy to miss passing it somewhere in the chain.
      To fix it one should do what we just did, start from where the crash occurs and work your way backwards to love.update; double checking that dt is passed along each step of the way.

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

    I cant see the rectangle, i think it could be the colour? I will try and see again

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

      Did you manage to sort it out? :)

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

      @@DevJeeper yes, thanks, there was a comment further down that asked. I forgot to call the functions in main.lua

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

      @@toastersunited Great, well done for sorting it out! :)

  • @Prajwal____
    @Prajwal____ 2 года назад

    It is good but, why should one use lua over other game engines, which give you a nice interface, animation capabilities, and all...??

    • @DevJeeper
      @DevJeeper  2 года назад

      Lua is a programming language, Löve is a framework.
      Frameworks are more lightweight than an engine such as unity. I prefer Löve since it allows me to write the entire structure myself, I love the fact that you make a new project by literally just creating a new folder. There are also libraries that you can use for common things such as animations and gui.

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

    for some reason, the script doesn't work.. i typed it out and everything, i understand it too.. i also tried copy and pasting from the link in the description with no success. i've saved the script as well. could you please help? loving the series btw! you've earned a sub

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

      I would love to help! However I need you to link me your code (preferably on pastebin or google drive) and tell me a little bit more about what it is that doesn’t work.

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

      @@DevJeeper pastebin.com/wqaL8Hfc

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

      @@DevJeeper actually, i believe i found the problem for the rectangle drawing out part. i did "function Player:draw()" instead of "function love.draw()". would this work the same?

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

      Your main file seems to be empty, apart from the require of the player file. You need to indeed declare love.load, update & draw there. Then you should call the players functions there. This is something which I cover in the video so if you feel uncertain I suggest rewatching it :)
      Let me know if you need more help or pointers and I will do my best to help you :D

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

      @@DevJeeper appreciate the help! :D

  • @chillingbird8212
    @chillingbird8212 2 года назад

    idk why but the rectangle doenst appear even though i did every thing like you. plz help.
    Also your video is awesome

    • @DevJeeper
      @DevJeeper  2 года назад

      Hey there! Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord or alternatively email :)

    • @chillingbird8212
      @chillingbird8212 2 года назад

      @@DevJeeper sorry i was dumb enough to forgot to put the Player:draw(), Player:update(dt) and Player.load() in the main .lua functions.
      But when i did this its give me this error code:
      Error
      main.lua:4: attempt to index global 'Player' (a nil value)
      Traceback
      [love "callbacks.lua"]:228: in function 'handler'
      main.lua:4: in function 'load'
      [love "callbacks.lua"]:136: in function
      [C]: in function 'xpcall'
      [C]: in function 'xpcall'

    • @DevJeeper
      @DevJeeper  2 года назад

      @@chillingbird8212 Sorry but I still need to actually see the code in order to help you!

    • @chillingbird8212
      @chillingbird8212 2 года назад

      @@DevJeeper srry i was dumb enough to put local before Player = {}

    • @DevJeeper
      @DevJeeper  2 года назад

      You are not dumb! Making mistakes is part of programming, everyone makes them. Finding them and fixing is just part of the game :)
      Well done for figuring it out your self!

  • @Sentient_Rock
    @Sentient_Rock Год назад

    what is the run.bat file for?

    • @DevJeeper
      @DevJeeper  Год назад

      if you double click it, it will run the game. Small quality of life thing. Another option is to setup your IDE/Editor to do it for you.

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

    2:27 pretty much same as on Roblox...

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

      Yeah for people with any kind of game development experience this will feel quite natural (as it's very common). However, people who don't have that will usually think of the Y-axis flipped to this, since this is more common in other areas.

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

    I already have a love-hate relationship with lua. It's giving me an error saying:
    Error
    player.lua:5: attempt to call field 'getheight' (a nil value)
    Traceback
    player.lua:5: in function 'load'
    main.lua:4: in function 'load'
    [C]: in function 'xpcall'
    [C]: in function 'xpcall'
    And I don't fully understand it at all. Even if I copy the parts from your github project into a new project it doesn't work, so I can't even get past the part where the engine draws a rectangle

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

      The problem is "getheight'", it should be camelCased - "getHeight" Let me know if you need any further help :)

  • @mr.mario323
    @mr.mario323 2 месяца назад

    why is this get a error?

  • @lutongbahay9448
    @lutongbahay9448 Год назад

    it prints weird shape help!

    • @DevJeeper
      @DevJeeper  Год назад

      Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord 🙂

  • @GoddessCynthia
    @GoddessCynthia Год назад

    this is a great tutorial, but please slow down at some parts. It's really hard to follow and I made a lot of simple mistakes.

    • @DevJeeper
      @DevJeeper  Год назад

      Thank you for the feedback!

  • @smellyfishstiks
    @smellyfishstiks 4 года назад +4

    I haven't played around with stuff like "self" before : p

    • @DevJeeper
      @DevJeeper  4 года назад +2

      While it isn't really needed in this tutorial, it's really good to get used to using "self" since it kind of is a cornerstone when you start coding object oriented.

    • @smellyfishstiks
      @smellyfishstiks 4 года назад +1

      @@DevJeeper I do have it so tables have their own functions that get called later like:
      t={}
      t.draw=drawtri
      -- later ...
      for i=1,#tri do
      t=tri[i]
      t:draw()
      end
      So I kinda do something like that?

    • @DevJeeper
      @DevJeeper  4 года назад +3

      Yeah you could say it's kinda like that :)
      The the next tutorial series (after Pong) will be focused on more object oriented programming. I will try my best to explain in in detail then!

  • @pche1aLD
    @pche1aLD 2 года назад +1

    yes yes yes yes yes yes

  • @marn200
    @marn200 4 года назад

    This is a great tutorial for both Lua and love2d, but after you start dividing thing in different functions, my syntax isn't right anymore. And could you please use comments? It makes things easier when i see this project again after 2 months.
    Error
    Syntax error: main.lua:22: function arguments expected near 'end'
    Traceback
    [C]: at 0x010a70db20
    [C]: in function 'require'
    [C]: in function 'xpcall'
    [C]: in function 'xpcall'
    some more information:
    function Player:update(dt)

    • @DevJeeper
      @DevJeeper  4 года назад +3

      Hey there, thank you for the kind words!
      I have added a link in the description to this episodes code, and I have gone ahead and commented it. The reason I don't comment code during the tutorial is best for your learning to make your own comments. I will explain the code, and then you can put it down with your own words. Now when it comes to your error, it's very difficult for me to know what your problem is, because error messages only tell me where in your code there is an issue, not necessarily what it is. If you could send me your code, I will have a look at it and help you figure out the problem!
      Thank you for the feedback, I have had some people say its too fast (and some that thought it was too slow), but I will keep it in mind for the next tutorial series! :)

    • @marn200
      @marn200 4 года назад +1

      @@DevJeeper Thank you, you're one of the first person with coding tutorials that actually responds to questions.
      I put some additional code in there about moving, and it worked before the function switching. I don't know what went wrong, but i started over from your code and now it works again.

    • @DevJeeper
      @DevJeeper  4 года назад

      @@marn200 Awesome that you managed to sort it out yourself! It's very often small mistakes that are easy to make, but difficult to find. I do plan to continue responding to all comments, so I'm glad to hear it's appreciated! :)

    • @skytheambatablow
      @skytheambatablow Год назад

      @@DevJeeper ive copied your code but then this error happens again?

    • @DevJeeper
      @DevJeeper  Год назад

      @@skytheambatablow Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord 🙂

  • @norakssolucani
    @norakssolucani Год назад

    ö

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

    From the VERY START of this video I can tell the title of this video is false and a game is not created in "3 easy steps". It's more like 12 to 20 easy steps including; listening to different sets of instructions. If such a game were made in 3 easy steps, easily and only in the 3 steps only, you would not still be reading this comment here, you would have already created a new game to completion.

    • @DevJeeper
      @DevJeeper  3 года назад +2

      I’m assuming your joking, but on the off-chance that you are serious:
      The series is split into 3 parts: Making the player, making the ball and making the opponent paddle.
      I have done my best to simplify the logic as much as possible and keep the videos short. I’m sorry if you found it too difficult, this was the first series I made :)
      Feel free to come with some feedback on parts you feel where not explained enough!

  • @chemicalstrike1229
    @chemicalstrike1229 2 года назад

    Thank you for a very awesome tutorial! Its just that when I run it it says this
    Error
    player.lua:1: attempt to call global 'player' (a nil value)
    Traceback
    [love "callbacks.lua"]:228: in function 'handler'
    player.lua:1: in main chunk
    [C]: in function 'require'
    main.lua:1: in main chunk
    [C]: in function 'require'
    [C]: in function 'xpcall'
    [C]: in function 'xpcall'
    Can you please reply and help me on this?
    Thank you

    • @DevJeeper
      @DevJeeper  2 года назад

      Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord or alternatively email :)

  • @jobadavies1003
    @jobadavies1003 2 года назад

    When I try this it just tells me "Error
    Syntax error: main.lua:3: '=' expected near 'love'
    Traceback
    [C]: at 0x613dd550
    [C]: in function 'require'
    [C]: in function 'xpcall'
    [C]: in function 'xpcall'"

    • @DevJeeper
      @DevJeeper  2 года назад

      I need to see what ”this” is :D
      Could you send me a link to your project and I will have a look & help you figure it out. RUclips deletes a lot of comments with links, so the best would be through Discord or alternatively email :)

  • @drnotuseless
    @drnotuseless 2 года назад

    Main.lua:4 attempt to index global "Player" a nil value

    • @DevJeeper
      @DevJeeper  2 года назад

      "Hey you said Player, but it doesn't exist" -> Maybe you named it player with lowercase?

  • @dr.peppergaming1680
    @dr.peppergaming1680 2 года назад

    I don't understand why this is happening. Any help would be appreciated.
    Error
    player.lua:29: attempt to index local 'self' (a nil value)
    Traceback
    [love "callbacks.lua"]:228: in function 'handler'
    player.lua:29: in function 'checkBoundaries'
    player.lua:16: in function 'update'
    main.lua:9: in function 'update'
    [love "callbacks.lua"]:162: in function
    [C]: in function 'xpcall'

    • @DevJeeper
      @DevJeeper  2 года назад

      I can make a guess, you forgot to use a : when declaring or calling the 'checkBoundaries' function. For example typing Player.checkBoundaries instead of Player:checkBoundaries.
      If that is not the case, then I will need to see your code to help you figure it out.

  • @jnkmal9519
    @jnkmal9519 2 года назад +1

    I refuse to use love because naming your language love is stupid and I would feel stupid using it.

    • @DevJeeper
      @DevJeeper  2 года назад

      The programming language is named ”Lua”. The framework is named ”Löve”. I’d say you should choose based on other factors than names, but you do you!

  • @therealrgb2354
    @therealrgb2354 2 года назад

    if have problemms getting deldta time us this
    something * love.timer.getDelta()
    -guy from stackoverflow thx a lot almost had a heart attack

    • @DevJeeper
      @DevJeeper  2 года назад

      No, you shouldn't do that (at least not for the purpose that you are doing it).
      If you are "having problems getting delta time", then it is because you are forgetting to pass it along, or forgetting to declare the argument. Instead of making a "dirty hack" to get it to work, you should remove it and search for the error you made. If you want help finding it you can join the discord server and post your code there!

    • @therealrgb2354
      @therealrgb2354 2 года назад

      @@DevJeeper "dirty hack?" also yes itry what you siad just cound'nt find any info online

    • @therealrgb2354
      @therealrgb2354 2 года назад

      @@DevJeeper also link to discord pls

    • @DevJeeper
      @DevJeeper  2 года назад

      @@therealrgb2354 discord.gg/mUaVASvG4z