#Open Source Games to learn code structure
1 messages · Page 1 of 1 (latest)
functions
What
structure your code: functions
interactions with eachother: remote events or modulescripts
You don’t understand what I mean mate
then what
Mate the explorer how to structure modules how to structure data interactions
Wdym what?
oh so how to structure modules and code
Gimme a minute I’ll continue communicating through laptop
code you can just do with functions obviously
modules just put them in folders and organize em
in areas that will work
finally
someone sent what i was looking for
i only wanted to learn how to structure proper games
i already know how to structure my code
thanks @proven dagger
Look for some uncopylock place
They all have bad structure
this just looks like advanced scripting to me but sure whatever works for you
this is normal
I understand this structure well
But type checking is the only thing left I need to learn
wait u faced the same problem?
type checking is easy actually
until you start trying to type for metatables correctly 
i avoided metatables
do i need to use them alot?
they exist to avoid repetition
can u give an example use case
also helps with objects
example use case please
what isn't an example? strings?
why do string.find(s,...) when you can instead do s:find(...) ?
where can i use and why would i uee it?
this avoids needing reference to string library
you only need object
that's one big thing
do i need to do it with oop?
only oop
i don't really have time to write you up an exposé that could be summarized by google's gemini
the basic take-home points are it avoids repetition and it's useful for objects + oop + inheritance
can you please send me a roadmap to learn luau better since im ass master
sure
may seem like a cop-out but its not, i'm being serious. just read the docs, make games, and bad code is fine. if you keep at it, eventually your code won't be bad anymore because you've just made so many things
really
i dont know if im writing stuff correctly
i might be doing an unoptimized way of coding
this is fine. make stuff incorrectly.
so do it unoptimized.
will u be able to rate my code?
please 🥺
no like tell me if im doing something i shouldnt do
there really is nothing else to it
no im saying, do stuff you shouldnt do
why?
because after having done it the wrong way, you will learn first-hand why it's wrong
peak advice actually
someone telling you what the correct way is will never, ever teach you why that way is correct
why do i feel like i suck at coding after 2 years
that's normal
you could be coding for 20 years and you still suck
what counts is not how perfect your code is
do you know any project list to follow?
because most of the time im in studio thinking of what to make
if a game you made sucks, or your code sucks and you can specify exactly why it sucks, and so you take what you learned from that and apply it to the next game. rinse repeat.
no one ever gets it perfect and correct the first time.
doesn't matter who it is, no one is that perfect.
so accept it
how are u so wise
?
because i've already done everything i suggested
i'm not suggesting you do anything i haven't already done myself at great length
there's no shortcut
why do i sometimes feel scared to work with teams
is there any solution
please solve my life problems
ask a counsellor or psychologist...
thanks
how can i close this thread?
since everything has been solved
What problem