How can I get better at coding?

Hello! I have been learning coding for a while now and I am stuck at one point which I can’t find any source or anyone that can help me to get better.

I searched for help on Hidden Developers and the only answer that I got was “practice”, I want to get in to more advanced stuff, ex: Genre techs.

5 Likes

The best way to get better is stop trying to focus on getting better, yes it’s good to learn specific things but getting “better” doesn’t mean just knowing how stuff like metatables work. you need practical experience with making actual games. You will find out when you make a game theirs loads of stuff you need to know however you will have a more clear understanding of the specific things you need to do and over time you will gain lots of experience out of making games. Don’t expect your first games to be insanely good just enjoy the process and eventually you will become good without even realizing it

9 Likes

Coding is a skill that you gradually improve on, forcing improvement can lead to the knowledge you have obtained to be easily forgotten. Practice is important to gradual improvement, especially if your practice goes out of your comfort zone (trying out new things in coding, such as making something you never made before). Another thing that can prove to be helpful are advanced guides or reading through code from others to learn how they did something that you never knew how to, if there are open sourced things for that.

Another thing that can definitely help is to make small projects, don’t just start with a big project, it can strain you and discourage you, it’s always best to take the “baby steps” in really any skill you want to improve on. You may introduce yourself to many mistakes along that way, but that’s typical for anyone when they’re trying something new, don’t be discouraged by them, try to fix them or come for help at anyone, the Developer Forums, a friend, etc.

4 Likes

The reason why most scripters are great at what they do is because they keep practicing & learning everything that they come across each moment, it also motivates you into improving your scripting/coding (Heck I’m sure literally everyone here who has made their first game didn’t even know where to start from) but regardless if it’s made of free models, or you made it yourself at least you tried to make a game and you got to experience what it felt like to have one

Start with something simple, like messing with variables:

local Variable = "Hello"
print(Variable)
--Prints "Hello" in the Output

Then slowly make your way across more things as you go along, such as math, coroutines, functions, and etc

Practice & keeping up to your knowledge with coding, no matter how much you know will definitely make an improvement each day :upside_down_face:

2 Likes

Hello, I have been learning to program for 3 months now and it is still quite difficult, very recently I have learned to do coroutines and it is very useful, I will share the code for you to try it in ‘lua ide online’ (link: Online Lua Compiler - Online Lua Editor - Online Lua IDE - Lua Coding Online - Practice Lua Online - Execute Lua Online - Compile Lua Online - Run Lua Online (tutorialspoint.com)) and learn too!!

it is very simple, hope it is very useful, greetings!

---------------------------------------------------
-- Creates a coroutine with function f as the entry
---------------------------------------------------
function f ()
   print("f, A")
   coroutine.yield()
   print("f, B")
   coroutine.yield() -- yielding
   print("Etc...")
end
 
---------------------------------------------------
-- Creates a coroutine with function f as the entry
---------------------------------------------------
 
c = coroutine.create(f)
type(c) -- thread

print(coroutine.status(c)) -- suspended
coroutine.resume(c)
print(coroutine.status(c)) -- suspended
coroutine.resume(c)
coroutine.resume(c)
print(coroutine.status(c)) -- dead
2 Likes

These are basic stuff I already have learned this stuff.

3 Likes