I was introduced to Lua back in Rio during my graduation at PUC, by its own creator! Roberto Ierusalimschy. Fantastic language and fantastic teacher
@quentinlucca62713 жыл бұрын
I guess Im randomly asking but does anybody know of a trick to log back into an instagram account? I was stupid forgot my account password. I appreciate any tricks you can offer me
@lufsss_2 жыл бұрын
Quem diria que Lua se tornaria uma linguagem tão conhecida mundo afora!
@requi23836 жыл бұрын
I am completely in love with Lua too, I am happy that I am not the only one!
@mansodev4 жыл бұрын
The community is quite small, but it’s faster and more lightweight than python (but that doesn’t mean python is bad) and is why I chose it.
@ShemarMcLean6 жыл бұрын
I'm soo glad there's a talk about this
@shubhammittal97647 жыл бұрын
Does creating games seems more fun than playing it, or I am just going nuts? (which I often do)
@coltonoscopy7 жыл бұрын
I tend to get a lot of enjoyment out of both :)
@shubhammittal97647 жыл бұрын
Thanks for introducing Lua to us, will explore it after I've completed cs50 :)
@coltonoscopy7 жыл бұрын
Hope you have fun! :D
@waltermelo10336 жыл бұрын
creating a game for me is a game by itself
@harjitsingh73086 жыл бұрын
Colton Ogden hey colton, just have a quick question how would i usee moonscript with löve ? (Btw moonscript is a language that compiles to lua, it takes away the need of most of the syntax for curly braces etc and makes life easier lol)
@vaishnav_mallya6 жыл бұрын
Thank you CS50 and Colton for this amazing course 😁. It's really helpful for beginners like me to get started. I have been trying to get into gamedev for months but stumble, trip and fall because I tried to jump to higher rungs instead of climbing from the bottom. Love2D is awesome way to get started and I've felt it. Completed pong and can't wait to make other games in the course.
@52factorial-prob6 жыл бұрын
great video for a great project. The guys who maintain LOVE need some LOVE because they rock. Games in 2018 suck major ass unfortunately. So, i challenge people to make games we would rather player using awesome tools like LOVE. Game Dev faces on, go go go.
@gwrydd Жыл бұрын
3:20 you missed out that the same thing you explained prior (globals vs locals) also applies to functions local function say(...) --local functions print(...) end function say(...) --global function print(...) end
@lua2wood4 жыл бұрын
Thank you guys for falling in love with me!!
@victornoagbodji4 жыл бұрын
🙏 this is a solid introduction. thank you!
@tofu20644 жыл бұрын
omg lua fan base!!!!!!! what???!!!!☺️☺️☺️☺️
@jared_per4 жыл бұрын
Yeah! Lua absolutely deserves a strong fan base!
@abhishekamoli29112 жыл бұрын
@@jared_per is there is any future of Lua. I am new i don't know much about programming. Is Lua worth it ?
@jared_per2 жыл бұрын
@@abhishekamoli2911 I personally think it's worth it. Though it is less popular than a lot of other languages, it is still very useful. Depending on your skill level and need, it can vary how useful it will be for you. But it's used commonly in gameDev, Adobe Photoshop Lightroom uses it. one of my favorite strategy games uses a modified LUA. In terms of popularity, it's (unfortunately) not growing growing much, but it's not dying either. I personally think it should get a lot more attention than it does, but I am biased because it's my first language I learned.
@abhishekamoli29112 жыл бұрын
@@jared_per thanks for replying sir I have just started programming and i am very confuse which language should I learn first. Thanks for giving me your opinion it means a lot to me.
@jared_per2 жыл бұрын
@@abhishekamoli2911 I'm very happy that I started with Lua. Getting started with it is much easier than something like C#. You don't have to worry about type setting and such. You just... program.
@FuzzyImages2 жыл бұрын
OK... why wasn;t this at the start of the CS50G course? It tosses you into pong and I was so confused how things worked in Lua when trying to work on project 0!
@pacrox22 Жыл бұрын
Great lecture. You should do part II coding the enemies and their AI.
@ThatOneRobloxDev Жыл бұрын
Lua is also integrated into the Roblox Studio game engine. It is much similar to Love2D but its 3D and integrated as a game engine with pre-made UI
@notiashvili6 жыл бұрын
Great stuff. Just wondering why you used string keys in the sounds table instead of just doing: sounds = { jump = love.audio.newSource(a, b), hit = love.audio.newSource(a, b), coin = love.audio.newSource(a, b) } This way seems better since some editors would even auto suggest the sounds whenever we accessed self.sounds. Is there more to it that I'm not seeing?
@coltonoscopy6 жыл бұрын
thanks Nika!! You could definitely do it that way, but then you're limited to naming your keys with symbol limitations (i.e., no dashes or other characters you couldn't put into a variable name, including spaces). Also, if you want to have maybe 10 sound effects that are similarly named (hit1, hit2, hit3), you could programmatically access them if they were in string format but not so if they were symbols, if that makes sense? For many use cases though, the distinction doesn't necessarily matter; I just default to this method!
@notiashvili6 жыл бұрын
Thanks for the reply! I didn't take variable naming restrictions into account, now that you explained it, that seems like an obvious reason why one would use string keys. What I didn't get is the "hit1, hit2, hit3" example where you wrote that one could access them programmatically I can access sounds.jump just as well as sounds["jump"]. The advantage I see of the string key here may be with the ability to to access each sound with a variable. Like: -- Say we have some local variable 'currentSound' somewhere in the scope if player.isRunning then currentSound = "running" -- maybe some more cases here... elseif player.isWalking then currentSound = "walking" end self.sounds[currentSound]:play() Probably not what you meant, but am I close? (You don't have to answer, already thankful for the reply)
@coltonoscopy6 жыл бұрын
Hey Nika, the programmatic access I'm referring to could vary case by case, but one I just used in the most recent lecture example actually is there are five sounds called 'wood1', 'wood2', 'wood3', etc., and I can randomly choose one of them by simply appending a math.random(5) call to the string 'wood' and then indexing the sounds table with that new generated string, which isn't possible with variables! You could also just lump all of these in a nested table of their own and then simply do a gSounds['wood'][math.random(#gSounds['wood'])], but that starts to obviously get a little bit hairy! Hope that helps!
@notiashvili6 жыл бұрын
Thanks! I realize there are many ways to go about solving this certain problem but I wanted to know your reasons for going with the one you use. Also, playing a random sound from a nested sounds table doesn't have to be that messy. You could easily set the __call function of the inner table to play a random sound from its children. Like: ``` sounds = { hit = { love.audio.newSource(a, b), love.audio.newSource(a, b), love.audio.newSource(a, b) } } setmetatable(sounds.hit, { __call = function(self) self[math.random(#self)]:play() end }) -- This metatable can even be abstracted away so you could simply call -- setemtatable(sounds.hit, randomSoundMetaTable) ``` so now instead of sounds.hit[math.random(#sounds.hit)]:play() you would only have to do sounds:hit() or when using string keys, simply sounds["hit"]() -- the self argument is implicit here, I suppose I get that having to set the metatable on every nested sound table would be a pain, but one could just loop through the sounds table once inside love.load() and just setmetatable. Less hair, less string concatenation and more lua magic. I just set up a working example here if you want to check it out: github.com/Nikaoto/sounds-table
@coltonoscopy6 жыл бұрын
Hey Nika, that's a great approach to the problem! It then lets you also place the :stop() method inside the __call function to clean up examples that call it every time we call play() as well :) While I think this is great for a real-world code base, or a more advanced class, I think it's a little too fancy for this intro class; indeed, we deliberately strayed from using metatables altogether in favor of using HUMP's "Class" library, which we've bundled with every distro, just to make things a little closer to what folks have expected from CS50's use of Python classes (or maybe folks with a Java background or the like). But if I were making a commercial game in Lua, I would definitely use your approach for this use case to clean up the code! Thanks for putting together that demo! :D
@DadoSutter6 жыл бұрын
Great talk, thanks for sharing! Is there a link for the code used on the presentation? Thanks again for this.
@SamVillage4 жыл бұрын
0:33 github.com/CS50/Mario-demo
@DASARITUTS7 жыл бұрын
dear coloton how many inches in size the TV your using in your lecture.
@coltonoscopy7 жыл бұрын
85"!
@DASARITUTS7 жыл бұрын
thanks you coloton i am an Asst.professor and I wanted to use a TV for my edu. channel kzbin.info I hope you like my work.
@canilusthesomething76524 жыл бұрын
oh my god lua is so hot
@yash11523 жыл бұрын
17:12 sprite sheet (ahw, nice. so this is what those little image in the games folder are called) 17:13 lua is one indexed
@thecastiel692 жыл бұрын
I can see 3 persons and a camera on the screen
@yash11523 жыл бұрын
1:00:38 "... divided by [INAUDIBLE]" oh lol, it's: "... divided by self dot tile-height"
@not_amanullah8 ай бұрын
Thanks
@liamjonah024 жыл бұрын
What Text Editor Do You Use With Lua and love?
@Linguaholic4 жыл бұрын
Check out ZeroBrane
@naserdakhel50514 жыл бұрын
In this video he's using VS Code, you need to install a couple plugins to make it work easily.
@naserdakhel50513 жыл бұрын
@BloxyHD Oh, Looking at it again I think you're right!
@lowrhyan5673 жыл бұрын
Just use neovim noob
@arkahv2 жыл бұрын
Any, but choose Atom if you want customizablity
@hrnekbezucha2 жыл бұрын
Shame the git repo isn't linked in the description
@DavidMadrigalHernandez7 жыл бұрын
Is there a list if packages that he's using for Atom? His setup looks REALLY nice. :)
@coltonoscopy7 жыл бұрын
No real packages in use here, except maybe syntax highlighting for Lua (don't recall if Atom ships with it)! :)
@zev1082 жыл бұрын
where is the link to the git repo ?
@elrbybark7 жыл бұрын
what is the ide he is using..
@coltonoscopy7 жыл бұрын
What do you mean Atef? :)
@elrbybark7 жыл бұрын
I meant the IDE but the auto correction lol..
@coltonoscopy7 жыл бұрын
oh haha just Terminal + Atom :)
@KanagawaMarcos7 жыл бұрын
By the way, there's a package for Atom which add a lot of tools for LOVE2D game development, such as a simple play button for testing your game.
@3finggaz6 жыл бұрын
anybody have this running the github lovedemo ? : Error push.lua:101: attempt to call field 'getPixelScale' (a nil value) Traceback push.lua:101: in function 'initValues' push.lua:48: in function 'setupScreen' main.lua:26: in function 'load' [C]: in function 'xpcall' [C]: in function 'xpcall'
@_mickmccarthy6 жыл бұрын
Have you just downloaded Love? If so, you may be running Love v11, which just came out. I can run it fine with 0.10 which was the previous version.
@3finggaz6 жыл бұрын
yeah you're right, with the previous version it's work fine. thank you !
@SantiagoGonzalez226 жыл бұрын
Thanks for the video! Can anyone share the link to download the source code please?
@levynkhs88205 жыл бұрын
Created one game which is the pong,since that day i never stopped playing because i learned how to code and make this game.im using windows so its a real pain in the ass to configure it and each time you have to go on folder that your main.lua program is and the press shift right click the command promp and press love . In mac you only have to press start i think
@adityamehra72384 жыл бұрын
which text editor is being used here?
@onoonoonoO4 жыл бұрын
@@adityamehra7238 try zerobrane
@aftalavera10 ай бұрын
There goes the Harvardhood!
@colab_ora23 күн бұрын
wow, such a nice class! someone maybe have the github with the code?, i will thanks a lot 🙏
@PySnekАй бұрын
Thanks to all the unnecessary OOP, he somehow achieved to make very simple love2d Lua look nearly as complicated as C code.
@PatrickAngel5256 жыл бұрын
Love the presentation, and I know the video is very long, but you should've taken your time as you talk very fast
@sciencevidyarthi40613 жыл бұрын
I like LUE
@Foxtro3 жыл бұрын
LUE
@Noob-ix1bf2 жыл бұрын
#Lua
@doctorbeans92744 жыл бұрын
Yeah I also want to fall in lion with lua
@duxofducks2 жыл бұрын
3:45 Do this body
@Djheffeson4 жыл бұрын
14:02 what? lol
@GhostScoutGS5 жыл бұрын
i will try to learn this and make the best roblox game ever
@nevoyu4 жыл бұрын
By no means an expert, but he could do better here. 5:06 line 61 rather than having it look like what's shown he can instead do local person = { name = 'Colton Ogden', age = 26, height = 69.5, } this way is a bit more efficient in key strokes and some performance applications since lua will create one table "person" and associate "name", "age", "height" with just that table. Whereas what his example shows are 4 different tables
@TheViktorPutin2 жыл бұрын
year old comment, I know, but I believe Colton is doing this to illustrate that you can declare and append variables to a lua table without having to declare your variable with those values initially. it helps to know that you can simply do: person.name = var or person["name"] = var
@moshamiracle5 жыл бұрын
Что он все, когда описывает, с питоном сравнивает.
@hexbit016 жыл бұрын
Sheldon Cooper is you? 😂😂😂😂😂😂😂
@coltonoscopy6 жыл бұрын
Who told you??? XD
@Matrixprogrammmer6 жыл бұрын
Colton you're awesome XD
@W_0_W6 жыл бұрын
OOP in Lua is very ugly and painful. Use Moonscript if you really need OOP.
@SteveRHanson5 жыл бұрын
python >>>>>>>>>>> lua
@moshamiracle5 жыл бұрын
lol ))
@mason38725 жыл бұрын
C# >>>>>>>>>>> python Even though they are basically the same
@moshamiracle5 жыл бұрын
@@mason3872 lua >>>>>>>>>>> C# inf loop
@boots33725 жыл бұрын
Yes. Python is far more fun and easy to work with. It's also dogshit slow compared to LuaJIT. If that matters to you, then it matters a lot. If it doesn't then Python is far superior imo. If Python could come anywhere near LuaJIT I'd be in heaven.
@Cerbyo5 жыл бұрын
this is unacceptable, you are offering advice and a tutorial pretty much here. How are people supposed to make their own decisions on teh content if you don't allow users to comment and share thoughts on it? I get that you could be getting trolled unfairly, but if all videos do this then people will be continuously learning information they think is credible and it turns out being wrong. We can't have that happen! We must have a dialogue open at all times! If your video is purely entertainment, then sure kill the comments and the ratings...people can decide if they like it by watching it. Educational videos must be treated differently though.
@randominternetuser51235 жыл бұрын
Cerbyo but...you can comment on this video...
@WREFMAN2 жыл бұрын
@@randominternetuser5123 lol
@seniorpz19692 жыл бұрын
@@randominternetuser5123 🤣
@aftalavera10 ай бұрын
This ought to be a joke!
@salsagal6 жыл бұрын
Arrays start at 0.
@maximbrykov6 жыл бұрын
"However, it is customary in Lua to start arrays with index 1. The Lua libraries adhere to this convention; so, if your arrays also start with 1, you will be able to use their functions directly" www.lua.org/pil/11.1.html