#Open Source Games to learn code structure

1 messages · Page 1 of 1 (latest)

red crag
#

I need to find a good well made game to learn how I should structure my code how scripts should interact with each other if there is a better way to learn code structure feel free to tell me

cobalt scarab
#

functions

red crag
cobalt scarab
red crag
cobalt scarab
#

then what

red crag
cobalt scarab
#

??

#

what

red crag
#

Wdym what?

cobalt scarab
#

“the explorer how should structure” wdym

#

confused by your wording

red crag
#

Autocorrect

#

Fixed

cobalt scarab
#

still doesnt grammatically make sense

#

are you trying to structure like

#

code??

red crag
#

Script related

cobalt scarab
#

oh so how to structure modules and code

red crag
#

Gimme a minute I’ll continue communicating through laptop

cobalt scarab
#

code you can just do with functions obviously

#

modules just put them in folders and organize em

#

in areas that will work

red crag
#

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

prime ingot
red crag
cobalt scarab
glad grotto
#

But type checking is the only thing left I need to learn

red crag
red crag
proven dagger
red crag
#

do i need to use them alot?

proven dagger
red crag
proven dagger
#

also helps with objects

red crag
proven dagger
#

why do string.find(s,...) when you can instead do s:find(...) ?

red crag
proven dagger
#

this avoids needing reference to string library

#

you only need object

#

that's one big thing

red crag
#

only oop

proven dagger
#

the basic take-home points are it avoids repetition and it's useful for objects + oop + inheritance

red crag
red crag
#

thanks

#

your a very nice dude

#

actually

proven dagger
proven dagger
red crag
#

i dont know if im writing stuff correctly

#

i might be doing an unoptimized way of coding

proven dagger
proven dagger
red crag
#

please 🥺

proven dagger
#

this doesnt help

#

if you want to learn luau and git gud at it

#

Make stuff.

red crag
proven dagger
#

there really is nothing else to it

proven dagger
red crag
proven dagger
#

do it in the bad way

#

its fine

proven dagger
# red crag why?

because after having done it the wrong way, you will learn first-hand why it's wrong

proven dagger
#

someone telling you what the correct way is will never, ever teach you why that way is correct

red crag
proven dagger
#

you could be coding for 20 years and you still suck

#

what counts is not how perfect your code is

red crag
proven dagger
#

the only thing that counts is the games you make

#

so just focus on that

red crag
#

because most of the time im in studio thinking of what to make

proven dagger
#

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

proven dagger
#

i'm not suggesting you do anything i haven't already done myself at great length

#

there's no shortcut

red crag
#

is there any solution

#

please solve my life problems

proven dagger
#

ask a counsellor or psychologist...

red crag
red crag
#

since everything has been solved

glad grotto