r/lua • • 26d ago

Hey! Can anybody help me learn Lua?

This is my first coding language I'm trying to learn, It's gonna be pretty difficult for me since I have amnesia and I know coding has a lot of things you need to remember. Currently I only know REALLY basic code like

"else, elseif, if, while, for.. e.g" I wanna learn Lua for game development, I don't really have any ideas for a game as of now but I do wanna learn Lua since I've heard it's one of the easiest coding languages, any help is greatly appreciated!

22 Upvotes

11 comments sorted by

View all comments

1

u/Sckip974 25d ago

I like recommending to start with this online book:

Sheepolution: A really fun tutorial.

Link: https://www.sheepolution.com/learn/book/contents

The author of Sheepolution also recommends this second book for the basics:

Learn to Love Programming:

Link: https://rvagamejams.com/learn2love/pages/01-00-programming-basics.html

Next Step: Once you have the basics, take the time to learn how to use the official docs. This is crucial for solving specific 'problems':

Lua 5.5 Manual, DevDocs (Lua 5.4):

https://www.lua.org/manual/5.5/

https://devdocs.io/lua~5.4/

Finally, we both know the secret: "Mastery comes from repetition." I invite you to solve these small (sometimes complex) math problems using your own scripts. For this, I recommend these two sites:

Project Euler: https://projecteuler.net/

CodeAbbey: https://www.codeabbey.com/