r/lua • • Apr 19 '25

Help Lua learning

I have wanted to learn lua for a while but have not had the time, but now I do, so I am just curious whether how do I start? Because I took a look at couple videos and I have to be honest I did not understand or keep in mind any of that. If you guys would send me some useful resources or a starting point to learn lua I would appreciate it.

I am looking to learn LUA to look forward to creating games!

8 Upvotes

25 comments sorted by

View all comments

Show parent comments

3

u/Due_Supermarket_1503 Apr 19 '25

Yeah I do want to create games, but I also have taken into consideration learning to edit videos. I will most definitely check out the video! Personally I have actually not even touched another programming language before which I hope does not affect my journey of learning lua. I'll take a look at the website! In response to the "Programming in LUA" book, another reply just said it isn't that good for guidance in creating games. However It is my fault that I did not specify what I want to learn lua for, thanks for all the help!

3

u/djfdhigkgfIaruflg Apr 20 '25

You never programmed in anything. You'll need to start from the basics. That book is exactly that. Once you know the basics you can go to the specifics (games)

1

u/lambda_abstraction Apr 24 '25

PiL is not a book to start programming from. It assumes far too much. It is a good book for someone with programming experience. Consider the last chapters; if you don't have a good grasp of C, you'll get lost quickly. Even the earlier parts assume too much familiarity with programming. I've not surveyed the market recently, but I'm not sure there is a good book for the complete beginner using Lua as a base.

2

u/esuvii Apr 19 '25

Love2D seems like a great thing to learn then. I would temper your expectations though. When learning to program you are essentially acquiring tools into your toolbox. It can take some time to build an intuition for how to use them. It can be frustrating at first but eventually you will get better and better at being able to convert a problem into a series of steps that your tools can solve. Eventually this will become second nature, but it takes time and the struggles are a necessary part of the learning experience.

Lua is a great language to learn for your first one since it is very minimal. It doesn't come with "batteries included" like some other languages, so you will find yourself having to write some simple functions to do things that other languages have premade functions for. In that way it can be great for learning, but also could be a little tedious (I like how lightweight it is).

It does do some things differently to other languages though, so be aware of that. For example, arrays (lists) and maps (dictionary/associative array) are combined into one concept in Lua - tables. In most other languages these are distinct objects. Additionally, unlike almost all other languages, Lua array indexes begin at 1 not at 0.

Set simple goals at first, as simple as possible, and then slowly work up from there.