How to Organize & Style your Code in Roblox Development (and when to use OOP)

  Рет қаралды 60,126

B Ricey

B Ricey

Күн бұрын

Пікірлер: 128
@rickjr426
@rickjr426 2 жыл бұрын
I struggle with a lot of impostor syndrome when I code and the topics you talked about at the end really gave me a boost of confidence, you're awesome man ty
@ikqqslate_
@ikqqslate_ 2 жыл бұрын
sus
@YourNumberOneRated1997Salesman
@YourNumberOneRated1997Salesman Жыл бұрын
Impostor what????
@kthulu2
@kthulu2 Жыл бұрын
^^
@holywater2977
@holywater2977 Жыл бұрын
@@ikqqslate_ Impostor syndrome, also known as impostor phenomenon or impostorism, is a psychological occurrence in which an individual doubts their skills, talents, or accomplishments and has a persistent internalized fear of being exposed as a fraud.[1] Despite external evidence of their competence, those experiencing this phenomenon do not believe they deserve their success or luck. They may incorrectly attribute it to the Matthew effect, or they may think that they are deceiving others because they feel as if they are not as intelligent as they outwardly portray themselves to be.[2] Impostor syndrome can stem from and result in strained personal relationships and can hinder individuals from achieving their full potential in their fields of interest.[3] When impostor syndrome was first conceptualized, it was viewed as a phenomenon that was common among high-achieving women. Further research has shown that it affects both men and women, in the collective sense that the proportion affected are more or less equally distributed among the genders.[1][4] Individuals with impostor syndrome often have corresponding mental health issues, which may be treated with psychological interventions, though the phenomenon is not a formal mental disorder.[5]
@vermilion4215
@vermilion4215 Жыл бұрын
@@YourNumberOneRated1997Salesman Feeling like you call yourself a programmer when you aren't really one
@imthebestmayne122
@imthebestmayne122 Жыл бұрын
Your channel really gives me the motivation I need. I think I have commented this once before, but you actually have the best tutorials for LUAU programming on KZbin.
@BRicey
@BRicey Жыл бұрын
I appreciate that!
@KiriNini
@KiriNini Жыл бұрын
You're probably the most underrated youtuber I have ever stumbled upon ever
@BRicey
@BRicey Жыл бұрын
Lol thanks
@MGMac_
@MGMac_ 2 жыл бұрын
Thanks, these tutorials have really helped me understand how to implement my Lua knowledge into actual game design
@BRicey
@BRicey 2 жыл бұрын
I'm glad I could help!
@Entihave
@Entihave Жыл бұрын
I've been developing Roblox games for 4 years now, this is the big problem for my game development, thank you so much!
@absolutelybagel2218
@absolutelybagel2218 Жыл бұрын
definitely some underrated scripting tutorials
@groundbreakerexplore
@groundbreakerexplore 2 жыл бұрын
Thanks, I learned new ideas. This will help me for my next project. Stay safe bro.
@Marcus001
@Marcus001 2 жыл бұрын
You are hands down THE BEST Lua tutorialist on KZbin, you are Lua version of Corey Schafer
@nineveh17
@nineveh17 2 жыл бұрын
Love the vids keep helping us young devs
@blizzard4551
@blizzard4551 2 жыл бұрын
Go play more apex legends
@Chickengbs
@Chickengbs 2 жыл бұрын
@@blizzard4551 go watch anime
@nezzled
@nezzled Жыл бұрын
​@@blizzard4551 bros salty because it's above his level of comprehension 🗿
@blizzard4551
@blizzard4551 Жыл бұрын
@@nezzled you guys got it all wrong he has the same name with a famous apex legends content youtuber lmao
@blizzard4551
@blizzard4551 Жыл бұрын
@@nezzled and he hasn't uploaded apex in a while 💀💀💀
@lukeewhy
@lukeewhy 2 жыл бұрын
thanks, helped a lot with OOP, will try to implement it in my game
@BRicey
@BRicey 2 жыл бұрын
Glad it helped!
@refusalstudios
@refusalstudios 2 жыл бұрын
I know it's my birthday when b ricey posts
@refusalstudios
@refusalstudios 2 жыл бұрын
@SortaIrish they sure do this guy is literally ahead of the technology while all these other youtubers and explaining how to make a kill brick
@BRicey
@BRicey 2 жыл бұрын
Well with my upload schedule it might as well be...
@Marcus001
@Marcus001 2 жыл бұрын
@@refusalstudios This This This This This This This
@LeapInno
@LeapInno Жыл бұрын
Really cool explanation to this.
@assassin030300
@assassin030300 2 ай бұрын
As an experienced developer, primarily working in Lua, C++, C, and C#, I've always valued clean, simple, and maintainable code. However, I’ve noticed that as you start creating highly advanced and interconnected systems, especially in Roblox Lua, things get significantly more challenging. When building complex projects with 20 to 80 interdependent systems (or even more), it becomes increasingly difficult to manage how each system interacts and depends on others. Even outside of Roblox Lua, similar issues arise as the complexity scales. But within Roblox, the limitations and idiosyncrasies of the platform make it even harder to keep the codebase clean, optimized, and free from performance bottlenecks. For a solo developer with advanced coding skills, managing this level of complexity in Roblox Lua without compromising on code quality and performance can be a major challenge.
@BRicey
@BRicey 2 ай бұрын
Yeah lua was self-proclaimed NOT made for large projects, and a game by definition is one of the largest programming projects one could undertake. It's a bit awkward in the context it was shoved into, but I still love lua as a configuration language for stuff like Neovim and a good intro language to scripting. Hopefully as Luau develops it can address some of the scaling issues, especially with stuff like types.
@cluelesscactus2098
@cluelesscactus2098 Жыл бұрын
Extremely helpful tutorial, thank you!
@kjanahan3776
@kjanahan3776 Жыл бұрын
i think im getting very close to taking up a commission or part-time job that includes multiple scripters
@roliuu
@roliuu 3 ай бұрын
As a C++ dev, UML diagrams help with having to do refactoring way less in lua too. Just plan out the components as input and output boxes, then think about how they are modularly grouped. Though I learned in this video that there are technically constructors and destructors in luau. Ofcourse planning stuff out requires experience and I like to use roblox to practice overall structure of games, since there is less I have to worry about Refactoring the inside of the component makes sense though, but also having the proper structure preplanned means less changing of directories and etc, though sometimes an oversight might happen, which mostly is an easy fix, since the structure already is very modular I also am that dev that thinks that if you have to comment something, there is a good chance the naming of variables and methods is bad, abbreviating is what causes code to be harder to read for example. Its good to comment out meaningful debug prints if you ever comeback to that point in code to modify it. Comments before the function are useful if you can write something meaningful that isn't already in function's name, like the unit for example - seconds, or what it can return - number or nil for an error, just the average C++ comments before a more complex function that clearly needs it Ofcourse this is all assuming this is a bigger project, otherwise if the naming is good, there might be no comments needed or anything complex This comes from smbd who did the refactoring approach on a SDL2 C++ game engine, and thats just too time consiming. Actually taking the time to plan it out on a big project makes sense, it costs less time in the future, like with NASA taking their time to make sure it will work in the end, instead of paying it with time when its refactored every time. Not saying this is a bad approach for a begginer learning new stuff though! Refactoring/rebuilding the project can help aton. But after a lot of practice, its way better to plan ahead on bigger projects. Everyone codes different though, so im not forcing anything, thats how I do things, as long as something works for smbd, thats perfect. I do have bottom up thinking, so that may be another reason why I preffer my method. I hope I gave proper arguments to why I think planning it out might have benefits in the long run! ^^
@Tettzz
@Tettzz 3 ай бұрын
As you said my biggest problem is trying to make everything perfect.
@Dark-zt2ok
@Dark-zt2ok 2 жыл бұрын
IT’S ALIIVVVEEEEE!!!!
@memes_gbc674
@memes_gbc674 5 ай бұрын
PSA: use "--!strict" at the start of a script, it enforces lua type safety and shows you errors before they happen
@alexlipcorn7367
@alexlipcorn7367 Жыл бұрын
awesome tutorial, good explanation of basic OOP in roblox
@trashmanjoe3193
@trashmanjoe3193 Жыл бұрын
🙏 you are great. thank you for making this. i really needed it.
@WanoFax
@WanoFax Жыл бұрын
fax, people do really advanced and complicated things but like at the end of the day thats nice but it makes it over complicated and at the end of the day the game just needs to be released...
@treker41ify
@treker41ify Жыл бұрын
What do you mean at 9:59 that java forces you to keep classes to their own scripts(I assume you mean methods)? Do you mean like every method we want for the object we have to keep in the same class? Cuz in java we could work around that by just creating a class with static methods to call at any time and use these methods for the other classes if we wish to do so. An example would be the Math class in java or creating for example a custom sorter class with static methods that sorts collections with user-defined methods.
@AmRobloxDev
@AmRobloxDev Жыл бұрын
You are so cool. Thanks for the very helpful tips.
@gordogonk8068
@gordogonk8068 3 ай бұрын
I'm pretty new to roblox studio and I'm getting tripped up on when you use a . Vs a : it seems like . Is properties and methods, when : is event related
@isopodder
@isopodder Жыл бұрын
wow, I can't believe I didn't know about this
@endproGM
@endproGM Жыл бұрын
Is all of this just for organization and ease of access purposes or does it have performance benefit?
@FastDuckProgrammer
@FastDuckProgrammer 5 ай бұрын
Clean code kills performance just use functional or procedural programming
@BRicey
@BRicey 5 ай бұрын
I wouldn't say that... also functional code (although I absolutely love it) doesn't mean better performance (I guess unless you have like 80 CPU cores for parallelization). It's always tradeoffs, but oftentimes if performance isn't an issue clean code is better
@danward8807
@danward8807 25 күн бұрын
how can i do this in roblox studio i have an idea for making a world where there are a millions of little spheres that can bond or attract to other tiny spheres and interact with each other basically like having air particles in the air but adding forces to make them move so i can make "oxygen molecules" or maybe sun light or if i get far enough i want to create a sun that spawns hundreds or millions of particles that fly off the sun and can be collected as "energy" but i want the "sun" to have a limit of a certain amount of particles like the real sun and when this "energy" is depleted it transfers to a device that simulates "light" making "photons" but i will make those "particles" bright neon colors to simulate heat and light that fills a bulb but then after time goes on the "particles" start to delete themselves and loses "energy" over time which takes the "suns" "particles" basically transferring "light" into gravitational energy that falls from the sky and theoretically having a "solar panel" that attracts the particles that are lost from the sun and over the course of a couple days the "sun" dims and the limit on particles radiating off the sun goes from 100% down too at least 75% and so on and so forth if that makes sense
@CloverKismet
@CloverKismet 2 жыл бұрын
How does this happen.. I literally just had my first college lecture on OOP this morning! xD
@BRicey
@BRicey 2 жыл бұрын
Nice!
@datasussy7878
@datasussy7878 2 жыл бұрын
very cool!
@ayoubtherobloxian2155
@ayoubtherobloxian2155 Жыл бұрын
I have a quick question, How do i open the output cause for me it does not show it for some reason
@qxxrd
@qxxrd 2 жыл бұрын
Hey, B Ricey, I mainly came here to ask you if you could make a tutorial or let us know how to use the keyword "do" by itself. I've seen it being used a couple of times before and was wondering what purpose it really has.
@ImUkoo
@ImUkoo Жыл бұрын
it means what it says.. while true "do" which means DO it ! lol. like for _,v in ipairs(workspace:GetChildren()) do ... end
@artex_112
@artex_112 Жыл бұрын
It literally does something and then ends nothing more, it can be used to separate scopes so you don't accidentally reuse them when they are not needed.
@Smurfis
@Smurfis 5 ай бұрын
Interesting to see how you would do it if you rewrote the 1000 line code into refactored code and showed us I always find my modules then don’t work and everything stops working and I have no errors reporting so I’m clueless
@justaguy4575
@justaguy4575 6 ай бұрын
this helped my spaghetti code, thanks
@BayRBLX
@BayRBLX 2 жыл бұрын
7:00 it launched by the way
@BRicey
@BRicey 2 жыл бұрын
Omg your right its a miracle... eh whatever the metaphor still stands
@LearnandDevelopGame-f6e
@LearnandDevelopGame-f6e Ай бұрын
Knit framework is no more get update, do you have suggestion for alternative?
@kevingamer2337
@kevingamer2337 4 ай бұрын
what are the benefits of using private variables?
@this_is_cricket
@this_is_cricket 2 жыл бұрын
This was very good
@EntityDeveloper
@EntityDeveloper 2 жыл бұрын
can you make a tutorial on how to make a unique tycoon game like restaurant tycoon?
@BamboozledLS
@BamboozledLS 2 жыл бұрын
Is there a possiblity that you update ur Tycoon Series some stuff you did there doest work or just Outdated just cerious
@googoogaagaayt
@googoogaagaayt 10 ай бұрын
"We don't talk about java" also him:"I have a lot of experience in Java"
@BRicey
@BRicey 10 ай бұрын
Thus is the greatest paradox of life: when school and your robotics team force you to learn a language u hate, you must master it or be mastered
@grgroyale
@grgroyale 2 жыл бұрын
Do you have any tips to improve my logic and scripting skills?
@BRicey
@BRicey 2 жыл бұрын
Practice, but honestly more importantly, look at other's code, browse good github repos, and just overall learn from the best.
@grgroyale
@grgroyale 2 жыл бұрын
@@BRicey I am looking at other's scripts I am having hard time when it comes to math. I don't know if you know about those fighting games that have rocks after an impact, but basically I searched up on yt how to make one of these effects and they used math but not in the way I learnt at school. I can't seem to understand the math behind effects and other stuff. Another example about lighting effect using cylinder, I just can't understand what they are doing and that is really demotivating.
@grgroyale
@grgroyale 2 жыл бұрын
I guess the real question is how I use math in game development
@notimportant1542
@notimportant1542 2 жыл бұрын
@@grgroyale eyy same the math is where I struggle at the moment
@TheGreenNinja_14
@TheGreenNinja_14 2 жыл бұрын
Can someone get banned for leaving commentaries with swear words on a script?
@IncryptDubstep
@IncryptDubstep 2 жыл бұрын
This was something roblox talked about implementing, however, its unsure if they ultimately will.
@ICM9
@ICM9 11 ай бұрын
I would lean toward not doing so just to be safe. Either way, I’m not sure why you’d ever *need* to leave explicit language within your code anyways lol. Good professional practice anyways.
@treyg5265
@treyg5265 6 ай бұрын
They might do it now that they are monitoring developers' code.
@KageNoDragon
@KageNoDragon Жыл бұрын
5:01 yeah make 101 places like me until you get an idea, Btw i still got no idea ; - ;
@theman7318
@theman7318 10 ай бұрын
thanks now i can code like gnome code
@kthulu2
@kthulu2 Жыл бұрын
amazing video
@despwned_PL
@despwned_PL 2 жыл бұрын
When will you show how to make animation in vector3?
@piky-rt4vn
@piky-rt4vn 2 жыл бұрын
Hey could you make a video on state machines and how to implement one into roblox studio
@BRicey
@BRicey 2 жыл бұрын
Good idea!
@BSSMacroless
@BSSMacroless Жыл бұрын
why is your icons on roblox studio different than mines
@MrLubbs
@MrLubbs 11 ай бұрын
Good advice
@ReptilesEat
@ReptilesEat 3 ай бұрын
i don't know what i learned watching this
@rasyajusticio
@rasyajusticio Жыл бұрын
How can I solve my problem with OOP. I created my object (also creating an Instance), return that object (maybe call it metatable), and then store that object inside "Main" table. And when the Instance attached to that object (metatable) for some reason got destroyed, the object (metatable) for that doesn't get removed from "Main" table. I have tried checking if Instance is nill or not when I tried to do something with the object (metatable), but that didn't work. Do not ask me why the Instance can be destroyed not by the assigned object (metatable).
@XaneMyers
@XaneMyers Жыл бұрын
This reminds me of one of my OOP classes. I made a UI button class which replaces a placeholder instance with a set of styled instances (background, label, transparent layer to brighten the button when it's highlighted, etc.), then it destroys the original button. The button itself works and responds to clicks, but for some reason, it can't detect when the new button instances get destroyed (using the Destroying event). I tried to program it so it would destroy the button object if that happened, but that doesn't happen. My hackish fix was to add an array to my Window object class, which it iterates through when it closes, forcing any buttons in it to destroy themselves. I don't know why the Destroying event ignores what it's supposed to react to like this, but I have a feeling this issue will affect me again with later objects…
@hoopiskey3661
@hoopiskey3661 3 ай бұрын
Does roblox have auto boxing and wrapper classes?
@BRicey
@BRicey 3 ай бұрын
It's not strongly typed so it doesn't have a need for either. I mean you can manually make wrapper classes if you want
@texttospeechexplanations5986
@texttospeechexplanations5986 2 жыл бұрын
yo can you make a tutorial on the tycoon series where you can reset your data or as in restart your tycoon progress i really need that so far also nice video
@Rkyiel
@Rkyiel 7 ай бұрын
thank you man
@AdamAdam-kx4fs
@AdamAdam-kx4fs 2 жыл бұрын
Quick Question: Can you explain to me how you can teleport your camera to a part but also freeze it when it has been teleportded, this happens when you touch a part.
@maltisme
@maltisme 2 жыл бұрын
press F when u have the part selected
@artex_112
@artex_112 Жыл бұрын
Do you mean like in-game? Use a local script inside the script change players camera type to Scriptable then take the parts CFrame value and set it as Cameras CFrame. When you dont need it anymore just reset the camera type
@maltisme
@maltisme 2 жыл бұрын
Could you please make a video explaining how to make buttons that will only appear after a rebirth? (also buttons that appear after multiple rebirths please). It would help me a ton! :D
@-------_________----------
@-------_________---------- Жыл бұрын
With a variable
@jeremiahholm4982
@jeremiahholm4982 2 жыл бұрын
how do you have custom editor ui??
@BRicey
@BRicey 2 жыл бұрын
They just recently updated all of the icons for the editor
@jeremiahholm4982
@jeremiahholm4982 2 жыл бұрын
@@BRicey really?! Mine didn't update
@ritsu9837
@ritsu9837 2 жыл бұрын
hello bricey, I used oop for my gun client is that good?
@BRicey
@BRicey 2 жыл бұрын
Yea sure if you needed it
@JohnPaul-v2f
@JohnPaul-v2f 5 ай бұрын
yeah
@liam2795
@liam2795 Жыл бұрын
how old are you ?
@JohnPaul-v2f
@JohnPaul-v2f 5 ай бұрын
ill need diz
@eddiehazard3340
@eddiehazard3340 7 ай бұрын
I really like your videos, but had to quit on this one.. too much spit in your mic technique.. sorry bro.. you gotta work on mic technique.
@insaneicle
@insaneicle Жыл бұрын
"LUAU"??? DAWG ITS LUA-U
@wav8518
@wav8518 11 ай бұрын
Wtf???
@Venopon
@Venopon 2 жыл бұрын
I don't use Knit so uhh.
@steroid2884
@steroid2884 2 жыл бұрын
What do you mean Knit isn’t even used in the video 💀
@SPOOKEXE
@SPOOKEXE 2 жыл бұрын
@@steroid2884 at 18:15, he does bring it up
@resh-1
@resh-1 Жыл бұрын
👀
@windowswastaken
@windowswastaken Жыл бұрын
Funny how i didnt understand shit
@izan7925
@izan7925 2 ай бұрын
Ok
@Gegoo
@Gegoo Жыл бұрын
Lawless 🤣🤣😂😂
@HasTheTimeGone
@HasTheTimeGone 2 жыл бұрын
Yooo
@not_eagleye
@not_eagleye 8 ай бұрын
skibiditoilet.__index = skibiditoilet
@FlawyClips
@FlawyClips 6 ай бұрын
beyond brainrot
Composition Over Inheritance - OOP in Roblox Studio
17:31
B Ricey
Рет қаралды 23 М.
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
ССЫЛКА НА ИГРУ В КОММЕНТАХ #shorts
0:36
Паша Осадчий
Рет қаралды 8 МЛН
METATABLES | What are they and how can we use them?
18:40
Crusherfire
Рет қаралды 29 М.
What is Object Oriented Progamming?
13:27
GnomeCode
Рет қаралды 47 М.
you SUCK at organizing scripts... Let's fix that!
13:12
Crusherfire
Рет қаралды 25 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 789 М.
every step to actually make your dream game (then sell it)
24:27
The MUST Follow Roadmap For ALL Solo Developers
14:41
DevWorm
Рет қаралды 33 М.
Roblox Devs, stop misusing :WaitForChild()!
17:13
Crusherfire
Рет қаралды 78 М.
The Problem With Procedural Generation
17:57
Acerola
Рет қаралды 308 М.
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН