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

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ธ.ค. 2024

ความคิดเห็น • 128

  • @rickjr426
    @rickjr426 2 ปีที่แล้ว +125

    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 ปีที่แล้ว +22

      sus

    • @YourNumberOneRated1997Salesman
      @YourNumberOneRated1997Salesman ปีที่แล้ว +5

      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 ปีที่แล้ว +26

      @@YourNumberOneRated1997Salesman Feeling like you call yourself a programmer when you aren't really one

  • @imthebestmayne122
    @imthebestmayne122 ปีที่แล้ว +18

    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 TH-cam.

    • @BRicey
      @BRicey  ปีที่แล้ว +2

      I appreciate that!

  • @KiriNini
    @KiriNini ปีที่แล้ว +12

    You're probably the most underrated youtuber I have ever stumbled upon ever

    • @BRicey
      @BRicey  ปีที่แล้ว +1

      Lol thanks

  • @MGMac_
    @MGMac_ 2 ปีที่แล้ว +33

    Thanks, these tutorials have really helped me understand how to implement my Lua knowledge into actual game design

    • @BRicey
      @BRicey  2 ปีที่แล้ว +9

      I'm glad I could help!

  • @Entihave
    @Entihave ปีที่แล้ว +11

    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 ปีที่แล้ว +4

    definitely some underrated scripting tutorials

  • @Marcus001
    @Marcus001 2 ปีที่แล้ว +7

    You are hands down THE BEST Lua tutorialist on TH-cam, you are Lua version of Corey Schafer

  • @refusalstudios
    @refusalstudios 2 ปีที่แล้ว +7

    I know it's my birthday when b ricey posts

    • @refusalstudios
      @refusalstudios 2 ปีที่แล้ว +4

      @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 ปีที่แล้ว +7

      Well with my upload schedule it might as well be...

    • @Marcus001
      @Marcus001 2 ปีที่แล้ว

      @@refusalstudios This This This This This This This

  • @groundbreakerexplore
    @groundbreakerexplore 2 ปีที่แล้ว +4

    Thanks, I learned new ideas. This will help me for my next project. Stay safe bro.

  • @nineveh17
    @nineveh17 2 ปีที่แล้ว +8

    Love the vids keep helping us young devs

    • @blizzard4551
      @blizzard4551 2 ปีที่แล้ว +1

      Go play more apex legends

    • @Chickengbs
      @Chickengbs 2 ปีที่แล้ว +4

      @@blizzard4551 go watch anime

    • @nezzled
      @nezzled ปีที่แล้ว +2

      ​@@blizzard4551 bros salty because it's above his level of comprehension 🗿

    • @blizzard4551
      @blizzard4551 ปีที่แล้ว +1

      @@nezzled you guys got it all wrong he has the same name with a famous apex legends content youtuber lmao

    • @blizzard4551
      @blizzard4551 ปีที่แล้ว +1

      @@nezzled and he hasn't uploaded apex in a while 💀💀💀

  • @lukeewhy
    @lukeewhy 2 ปีที่แล้ว +7

    thanks, helped a lot with OOP, will try to implement it in my game

    • @BRicey
      @BRicey  2 ปีที่แล้ว +3

      Glad it helped!

  • @Dark-zt2ok
    @Dark-zt2ok 2 ปีที่แล้ว +3

    IT’S ALIIVVVEEEEE!!!!

  • @LeapInno
    @LeapInno ปีที่แล้ว +1

    Really cool explanation to this.

  • @assassin030300
    @assassin030300 หลายเดือนก่อน

    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  หลายเดือนก่อน +1

      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 ปีที่แล้ว +2

    Extremely helpful tutorial, thank you!

  • @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.

  • @Tettzz
    @Tettzz 2 หลายเดือนก่อน

    As you said my biggest problem is trying to make everything perfect.

  • @AmRobloxDev
    @AmRobloxDev ปีที่แล้ว

    You are so cool.
    Thanks for the very helpful tips.

  • @roliuu
    @roliuu 2 หลายเดือนก่อน +2

    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! ^^

  • @kjanahan3776
    @kjanahan3776 ปีที่แล้ว +2

    i think im getting very close to taking up a commission or part-time job that includes multiple scripters

  • @isopodder
    @isopodder ปีที่แล้ว

    wow, I can't believe I didn't know about this

  • @this_is_cricket
    @this_is_cricket 2 ปีที่แล้ว

    This was very good

  • @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...

  • @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

  • @gordogonk8068
    @gordogonk8068 2 หลายเดือนก่อน

    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

  • @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.

  • @danward8807
    @danward8807 6 วันที่ผ่านมา

    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

  • @justaguy4575
    @justaguy4575 5 หลายเดือนก่อน

    this helped my spaghetti code, thanks

  • @kthulu2
    @kthulu2 ปีที่แล้ว

    amazing video

  • @CloverKismet
    @CloverKismet 2 ปีที่แล้ว +3

    How does this happen..
    I literally just had my first college lecture on OOP this morning! xD

  • @endproGM
    @endproGM ปีที่แล้ว +1

    Is all of this just for organization and ease of access purposes or does it have performance benefit?

  • @qxxrd
    @qxxrd 2 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

      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 4 หลายเดือนก่อน

    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

  • @kevingamer2337
    @kevingamer2337 3 หลายเดือนก่อน

    what are the benefits of using private variables?

  • @MrLubbs
    @MrLubbs 10 หลายเดือนก่อน

    Good advice

  • @ayoubtherobloxian2155
    @ayoubtherobloxian2155 ปีที่แล้ว +1

    I have a quick question, How do i open the output cause for me it does not show it for some reason

  • @FastDuckProgrammer
    @FastDuckProgrammer 5 หลายเดือนก่อน +1

    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

  • @LearnandDevelopGame-f6e
    @LearnandDevelopGame-f6e 24 วันที่ผ่านมา

    Knit framework is no more get update, do you have suggestion for alternative?

  • @googoogaagaayt
    @googoogaagaayt 9 หลายเดือนก่อน

    "We don't talk about java"
    also him:"I have a lot of experience in Java"

    • @BRicey
      @BRicey  9 หลายเดือนก่อน

      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

  • @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

  • @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!

  • @despwned_PL
    @despwned_PL 2 ปีที่แล้ว

    When will you show how to make animation in vector3?

  • @grgroyale
    @grgroyale 2 ปีที่แล้ว +2

    Do you have any tips to improve my logic and scripting skills?

    • @BRicey
      @BRicey  2 ปีที่แล้ว +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 ปีที่แล้ว +1

      @@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 ปีที่แล้ว +1

      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

  • @Rkyiel
    @Rkyiel 7 หลายเดือนก่อน

    thank you man

  • @theman7318
    @theman7318 9 หลายเดือนก่อน

    thanks now i can code like gnome code

  • @ReptilesEat
    @ReptilesEat 3 หลายเดือนก่อน

    i don't know what i learned watching this

  • @TheGreenNinja_14
    @TheGreenNinja_14 2 ปีที่แล้ว +3

    Can someone get banned for leaving commentaries with swear words on a script?

    • @IncryptDubstep
      @IncryptDubstep 2 ปีที่แล้ว +2

      This was something roblox talked about implementing, however, its unsure if they ultimately will.

    • @ICM9
      @ICM9 11 หลายเดือนก่อน +1

      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 5 หลายเดือนก่อน

      They might do it now that they are monitoring developers' code.

  • @BSSMacroless
    @BSSMacroless ปีที่แล้ว

    why is your icons on roblox studio different than mines

  • @hoopiskey3661
    @hoopiskey3661 2 หลายเดือนก่อน

    Does roblox have auto boxing and wrapper classes?

    • @BRicey
      @BRicey  2 หลายเดือนก่อน

      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

  • @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…

  • @AdamAdam-kx4fs
    @AdamAdam-kx4fs 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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

  • @KageNoDragon
    @KageNoDragon ปีที่แล้ว

    5:01 yeah make 101 places like me until you get an idea, Btw i still got no idea ; - ;

  • @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

  • @JohnPaul-v2f
    @JohnPaul-v2f 4 หลายเดือนก่อน

    yeah

  • @JohnPaul-v2f
    @JohnPaul-v2f 4 หลายเดือนก่อน

    ill need diz

  • @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

  • @ritsu9837
    @ritsu9837 2 ปีที่แล้ว +1

    hello bricey, I used oop for my gun client is that good?

    • @BRicey
      @BRicey  2 ปีที่แล้ว +2

      Yea sure if you needed it

  • @jeremiahholm4982
    @jeremiahholm4982 2 ปีที่แล้ว

    how do you have custom editor ui??

    • @BRicey
      @BRicey  2 ปีที่แล้ว +1

      They just recently updated all of the icons for the editor

    • @jeremiahholm4982
      @jeremiahholm4982 2 ปีที่แล้ว

      @@BRicey really?! Mine didn't update

  • @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

  • @liam2795
    @liam2795 ปีที่แล้ว

    how old are you ?

  • @eddiehazard3340
    @eddiehazard3340 6 หลายเดือนก่อน

    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 10 หลายเดือนก่อน

      Wtf???

  • @resh-1
    @resh-1 ปีที่แล้ว +1

    👀

  • @Venopon
    @Venopon 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +2

      @@steroid2884 at 18:15, he does bring it up

  • @Gegoo
    @Gegoo ปีที่แล้ว

    Lawless 🤣🤣😂😂

  • @windowswastaken
    @windowswastaken ปีที่แล้ว +2

    Funny how i didnt understand shit

    • @izan7925
      @izan7925 หลายเดือนก่อน

      Ok

  • @HasTheTimeGone
    @HasTheTimeGone 2 ปีที่แล้ว

    Yooo

  • @not_eagleye
    @not_eagleye 7 หลายเดือนก่อน

    skibiditoilet.__index = skibiditoilet

    • @FlawyClips
      @FlawyClips 5 หลายเดือนก่อน

      beyond brainrot