How Unoptimized Can a Roblox Game Get?
Тәжірибелік нұсқаулар және стиль
50% OFF COUPON WITH "DOUBLEBYTE" (ends in 3 days):
linktr.ee/ByteBlox
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/ByteBlox
You’ll also get 20% off an annual premium subscription!
discord: / discord
wondered how to make a main menu in roblox studio? or how to create a shop which has working GUI? ive made lots of 2024 roblox scripting tutorials about all the different bits of roblox to give you some up-to-date information about all of its properties and events.
my goal is to simply give some insight on how to use the various features and instances roblox studio, and show you some fun stuff you can do with them. thanks for checking out this roblox scripting tutorial :)
Пікірлер: 643
COURSES ARE 50% OFF, USE CODE "EDGEBYTE" (ends in 3 days lol): linktr.ee/ByteBlox
@creeperplayzz
Ай бұрын
Womp womp
@leumas7
Ай бұрын
deeply sorry that you have to use a mac😓💔
@Ushearr
Ай бұрын
sigma 🐺
@automatonhulk555
Ай бұрын
ligma
@UnusedHandle
Ай бұрын
sugma
yandere dev type code
@aljon5947
Ай бұрын
making a game with only if statements
@Sakupen.
Ай бұрын
@@aljon5947 "if true then"
@not_eagleye
Ай бұрын
💀💀💀
@not_eagleye
Ай бұрын
@@aljon5947 lmao
@nacroni
Ай бұрын
@@aljon5947undertale type code
“Why doesn’t tf2 get updates?” What the intern at valve who had the same question sees upon looking at the code:
@distorted_heavy
Ай бұрын
Nah instead he sees a function that supposedly makes spheres but actually makes squares and quits on the spot
@gshnoozer2
28 күн бұрын
Riot Games employee looking at the code
@joedingo7022
27 күн бұрын
And the code that makes squares is also integral to transparency rendering, and will make the player camera render in front of itself disabing all vision.
@FeeshUnofficial
25 күн бұрын
@@distorted_heavynot even cubes? Just 2 dimensional squares? Just rectangle planes?
REAL programmer's NEVER use variables or any of that utter nonsense, how foolish of you! Obviously you have to declare the exact part every single time it needs to be called, like a real programmer would 💪
@codingpileofdirt
Ай бұрын
Real *Lua* programmers. If it was something as basic as Scratch or something it would be a pretty different story.
@Sakupen.
Ай бұрын
so fucking real
@kirbyrparchives
Ай бұрын
Scatch is not real 👹@@codingpileofdirt
@NaraSherko
Ай бұрын
@@codingpileofdirt I was a scratch dev before now i use roblox studio and i use those variables
@arandomguythatdoesntpost
Ай бұрын
not using variables actually makes the code run slower (as described in the lua documentation), don't know if this applies to LuaU though
When your assignment at school has a minimum word count
@sparrowEP
Ай бұрын
this
@Abolishtaxes1997
27 күн бұрын
real
@1000-THR
25 күн бұрын
minimum line count
@em-si-ton-somsoc
25 күн бұрын
@@1000-THRyes
A lot of games unironically run on code like this 😄
@Zuko-9
Ай бұрын
Was gonna say this, some top games breaking the 50,000 lines mark
@reddeadleisure
Ай бұрын
@@Zuko-9??? Thats literally normal if its a big game
@Zuko-9
Ай бұрын
@@reddeadleisure that’s… literally my point, literally what i just said 🤣
@reddeadleisure
Ай бұрын
@@Zuko-9 The fuck you mean? It seems like you were suggesting bigger lines of code = unoptimized which is straight up not true
@Zuko-9
Ай бұрын
@@reddeadleisure calm down 💀, you’re being overly combative for no reason. I never said bigger lines of code = unoptimized did I?
professional roblox jojo game developer coding live footage
@lamp7746
Ай бұрын
The only good comment here
@JupiterNeutr0n
29 күн бұрын
Bro 💀
5:35 This is just that tweet saying "God I wish there was an easier way to do this"
@DraxilSpada-vc2wg
Ай бұрын
no don't say it you'll summon derek baum
@shaneharding7399
Ай бұрын
"Hello, it's me, Derek Baum! And I am here to introduce... the code missile! First, point the missile toward your PC, light the thruster, and then... *BAAAAAAAAAAAAAAAAAAAANG!!!* And now all of your code is perfectly optimized!"
@tyrannosaurustits7083
Ай бұрын
yandere dev else if saga
@starPh0bia-
Ай бұрын
@@DraxilSpada-vc2wghe did :(
@WeeHee
28 күн бұрын
I literally saw the source of an old Roblox game that did that
16:00 Genuinely most of my code when I was younger consisted of this, and funny part is my games were more supposed to be jokes rather than real games. I made a whole game basically Rick rolling my Friend just because I thought it would be funny
@reddeadleisure
Ай бұрын
This is how devforum memes are created
"theres a child inside of one thing" byteblox 2024
@scratchingcatclaw
Ай бұрын
Ah yes, programmer language
@blacklight683
Ай бұрын
Guys is that freddy fazbear? Hur hur hurhur
@Cootieb
Ай бұрын
@@blacklight683GUYS IS THAT FREDDY FAZBEAR? HUR HUR HURHUR
@bluebearfinn
Ай бұрын
@@blacklight683god no
@lamp7746
Ай бұрын
I searched up “tween model” the other day and I was scarred.
i have no clue how close it's related to this bc i have like no knowledge of code but this reminds me of a time my friend showed me code and near the start was "true = True" and "false = False"
@maincraf-yk5qq
Ай бұрын
Ah, yes, 1 = 1+0
@gigimoosegaming3465
Ай бұрын
its python, because in other languages its normally just true and false without caps, in python it is. its probably because they want to make it easier for themselves
@biigsmokee
Ай бұрын
write true = False, false = True just under it and watch him debug for ages
@cewla3348
29 күн бұрын
@@biigsmokee anyone who knows how to debug will watch variable states tho?
@newuser689
26 күн бұрын
@@cewla3348>print(true) >prints False this is when u put shotgun in mouth
It's crazy to think that coding makes people say the most diabolical things if taken out of context "If you touch this part, you explode and earn a point" "I'm gonna immediately pair it to a child which is the player"
4:40 I love how he didn't even use the yielding result after all the tree search. (He just used script.Parent after all)
@semydev
Ай бұрын
Yeah because what if the script isn’t the right script you know? You gotta know the script is on the right part before finding the part
In my experience, absolute most problems in game optimisation have nothing to do with "bad code" per se (unnecessary loops and inefficient ways of referencing things) and everything to do with drawing too much, moving too much, generally doing too much stuff every frame. Devs sometimes really need to drop their inner C coder when working with modern engines, at least as a beginner it helped me to focus on avoiding spaghetti code first and foremost
i love making a main menu, thanks for the tutorial!!
day 2 of asking for byteblox to recreate the drake video for his next video
@user-nq6wn4hm7s
Ай бұрын
I will edge to it
@user-zk7nx1lw6f
Ай бұрын
Byteblox gyatt oiled up
@user-gi7zw9lt1l
Ай бұрын
Byteblox swinging it side to side
@realsentence
Ай бұрын
omd
@real_GreenThingy
Ай бұрын
Maybe I could do it
i got my hands on a type soul copy and the code actually makes me want to cry. all of the client statements are contained in a single local script, bordering on 10k lines. this isnt even the worst example of this in the game.
@jayinvictus3945
Ай бұрын
Wait like a copy of the old code?? THAT'S why I was lagging constantly and my friend crashed everytime he opened the game??? XD
@pacomatic9833
17 күн бұрын
I was absolutely rolling when I heard that
geometry dash lore
@Nine1Three4
14 күн бұрын
real
I'm pretty sure this is a common practice in the roblox dev community by now...
My scratch games: amateurs.
I always hated that mindset about not optimizing code when learning. Never understood wanting to learn things wrong.
For every push-up this comment gets, I’ll do one like.
@GALAnist
Ай бұрын
Is this a real kid or a just stupid guy being stupid? I wonder this kid begging a like or what?
@insanemuffin5749
Ай бұрын
Just did 40
@Ngo2k4
Ай бұрын
huh?
@feaurify5281
Ай бұрын
Push up
@probablypeenuts
Ай бұрын
for every brain cell i gain, i’ll do one like
Wow I didn’t even know what optimizing is this is pretty helpful
After taking my AP Computer Science A Exam this morning, I can certify this is completely acceptable and optimized code.
I understand like a very little bit of LUA, and that was enough to make me understand what you were doing and laughed all throughout the video. 🤣
the final part is asking for help in devforum once you accidentally made an error somewhere
at 7:09 you should have made it loop through the children of Players every 0.5 seconds and keep track of all of them and if any of them are new (not in the table/variables you're storing them in) then it does the function. this works basically the same as PlayerAdded() but it has a delay and it's more laggy
7:20 I agree. Roblox told us we can just tell the AI what to do and it'l lwrite the code for us, but instead it just suggests random stuff that we didn't even want. I don't think you can write a prompt to the AI to tell it what to write either
@Haze_Nexus_real
Ай бұрын
you can -- make a script that kills the player in .0001 seconds (insert script here)
@ninlaw9810
Ай бұрын
ai is shit at making code might as well look a tutorial or go on dev forunlm
@Teroces1
Ай бұрын
Personally my experience with the ai is very good. I usually never pause when writing code, but the few times i do, it sometimes feels like its reading my mind cause it perfectly auto completes. Prob the most impressive examples of this was that the ai was able to finish the rest of my dynamic memory allocator function written in my own customized assembly language (i made a cpu emulator on roblox). It somehow learned the rules of my custom assembly language and even realized the algorithm that i was trying to make (and it did that despite being trained to develop good luau code, not assembly)
I love how you intentionally made a specific variable for something. As a Java Plugin developer (Minecraft), that's so natural to me... (it makes stuff easier sometimes...)
Could you consider making a video about coroutines cause I really like how you explain things and I don't understand those.
pls make a game that uses no variables 🙏 i promise it’ll be a fun challenge 😃
@Tealen
Ай бұрын
:D
@Giuyo
Ай бұрын
I code with no variables, not pressing enter and using the Brush Script font. 😊
@Tealen
Ай бұрын
@@Giuyo when i need to disable a chunk of code from a script for a bit, i just place - - before every line 😃
@mr_originalname
Ай бұрын
@@Tealen when i wanna loop through a folder, i make a variable for each part in it 😃
@randomchannel-kh7oc
Ай бұрын
without using local?
This reminds me in the old version on noob adventure (my game) I wanted to have a bounce effect, but the bounce effect wouldnt stay in one place when the effect was emitted. So instead of just unchecking the LockedToPart vatiable I made a scrip that creates a part sets the pose of the part to the hrp set the parent to workspace and then cloned the effect and put thats parent as the part 😭😭
@Sky_Blue_Crew
Ай бұрын
No way ur here too
@Tealen
Ай бұрын
i could see myself doing that a few years back, i was TERRIBLE at optimizing. and i, for so long, instead of using :Emit(1) to make particle emitters emit just 1 particle (to make like an explosion or something), i would make it enabled for 0.1 seconds and disable it right after...
omg before this video... I was using a single variable for things... now I know I need to make sure the children don't cross contaminate. Thank you for this useful tutorial.
Hey bro, I just wanted to say your videos are AMAZING. They helped me so much in coding fundamentals. Literally no other channel or video could do this. Keep up the good work bro
every time you needed to find a part make a combination of all 10 character letter combinations until it equals the name of the part
I think i realy learned more in this video then in some other youtube tutorials👍 thank you very much❤
I have a project that took a map, wrote a script that would look at the position, rotation, color, and size of every object, then generate a script that would delete the entire world only to build it back. It would freeze for a solid two minutes, the world would vanish, then freeze for another two minutes as it built the world back.... Ended up being around 280k lines long in the end.... This was around 11 years ago though, so theres a good chance the project got nuked
@right2win6911
28 күн бұрын
bro most well known games dont even have 150k lines of code
@InvisibleSquids
27 күн бұрын
@@right2win6911 Yep, I was simply trying to see if i could do meta-programming. The answer is "kind of"
i remember a long time ago when i first got into programming i wanted to make an animated typing effect so i allocated one line of code for each character and then added a wait()... looking back now i know what was going through the devforums mind when i showed this off.
Wrote this script (below) to see if I could do the same, basically all it does is look for when the player touches part of yes then fling player, what causes it to be unoptimized is its use of the wait() function, it constantly checking if the part exists and making new body velo instead of reusing the old one. Script: -- Define a function to fling the player function flingPlayer(hit) -- Check if what was touched is a player local character = hit.Parent local humanoid = character:FindFirstChildOfClass('Humanoid') if humanoid then -- Create a BodyVelocity object to fling the player local bodyVelocity = Instance.new('BodyVelocity') bodyVelocity.Velocity = Vector3.new(math.random(-100,100), math.random(50,100), math.random(-100,100)) bodyVelocity.MaxForce = Vector3.new(1e4, 1e4, 1e4) bodyVelocity.Parent = character.HumanoidRootPart -- Wait for a short time and then remove the BodyVelocity object wait(0.5) bodyVelocity:Destroy() end end -- Create a Part in the workspace local part = Instance.new('Part', workspace) part.Size = Vector3.new(10, 1, 10) part.Anchored = true part.Position = Vector3.new(0, 10, 0) -- Connect the 'Touched' event of the part to the 'flingPlayer' function part.Touched:Connect(flingPlayer) -- Inefficiently keep checking if the part exists while wait(1) do if not part:IsDescendantOf(workspace) then part = Instance.new('Part', workspace) part.Size = Vector3.new(10, 1, 10) part.Anchored = true part.Position = Vector3.new(0, 10, 0) part.Touched:Connect(flingPlayer) end end
its not to do with your optimization, but ive been wondering why does everyone shrink their variable names down into acronyms? longer variable names that are less confusing dont make code run any slower. it makes code much more readable to be able to instantly tell what a variable is from it's name
always remember to connect and never disconnect. you never know when you'll need that connection again, after all!
finally, you made the average acs gunkit game
3:51 so more pathing's in the workspace AND children in the workspace, slower it will be
Could use more print statement whenever anything happens
I don't know a single thing about coding but I was entertained the whole way through anyways
as a 3d modeller, this code is frying my brain
Make a bunch of variables that are all equally as long of a name as the object it’s representing, and make those variables used once
ever since watching the low framerate video i am only getting you in my recommended 😭😭
try to make a code but every time roblox studio tries to finish the code you gotta accept it and see what the code does at the end
Programming should be done in stages (may not apply to game dev) 1, Understand the problem, customer requirements, solutions 2. Just Get your Solution in code write it without structure, just get your idea in code even if its the worst code seen in 100 years 3. Convert you Proof of Concept into actual Porduction Code, structure optimize where needed...
As a programmer myself, I can confirm that this type of coding makes me want to rip my eyes and brain out of my head.
8:57 as a C dev, i'm really triggered by your variable naming, which makes it even better.
ByteBlox is unstoppable...
It’s honestly funny seeing my pc struggle with some roblox games yet handle FH5 at 4k maximum settings and raytracing with no problems.
If you put // technically you could make your code inf size
this starts to have the same feel as my high school math
arcane odyssey coding essentially
How to claim that you wrote 12k lines in 10 min: Copy code that already has 10k lines, copy a feature in the code and paste it another 10 times, and make variation in those lines. Now, you got a forked project with 12k lines that you spent 10 min writing strings for the only "code" you actually made "yourself". This is how a friend claimed to have worked all day on a bot.
you can just do an expenetial grouth loop counting pi numbers in every loop
add recursion without limits, will be good
well done, you hurt me and everyone with at least basic programming and optimizing skills
when he started the transparency my soul died
Yo bro instead of holding down the backspace key, hold CTRL when pressing backspace and it'll delete the previous word instantly
As a game enjoyer, I have never complained abt a game being too optimized, maybe if there’s a significant impact on gameplay, but otherwise I like optimization, as everyone else does
6:12 Can't wait for the part to stop pulsating after 2 hours!
I got suggested this and its actually good
good job! you made a code worst than in yandere sim
so glad you stopped making those long and overcomplicated tutorials😊
I am the person who never uses variables and rarely presses enter thinking I have a cooldown of pressing it and using Brush Script font to code for some reason, and after show the code to the server and a war starts (for some reason I got kicked out the server).
When you realize his unoptimized code is how your code looks.
This more optimized then my code 😂
came here for curiosity, goes out with basic lua knowledge
Being this bored is a skill
when i was starting and didnt knew a thing about scripting (2019) i made an 152k lines long script
Just put 12 thousand while true loops in the game. I have unironically seen this before and have been asked to fix it
Now add 50 thousand polygons to 1 cube
Why would you choose Roblox out of all the amazing Engines out there? I don't get what makes Roblox worth choosing over, say Godot, Unity, Unreal, Unigine, Cryengine or any other big ones out there. Isn't the Roblox engine just more limited, whilst simultaneously having less features and running worse than any of the ones listed above? The only reason I could think of is, that a lot is already pre-made - reducing the amount of development time required, which I somewhat get - but at that point just make a Source mod. Is there something I'm missing??
new scripter: “can someone tell me how to reference part” byteblox: “throws 17 lines of code”
should make a game where you have too collect poimts™️ to get to a next level, in which give you more poimts™️ in which you can buy pets in which give more points. you should also have at the end of the level a boss, where you dont fight & make the pets fight it and the pets have health. and at the end pf each level you can develop an addiction & force the pets into labor to help you support the addiction, and each level is like this, just an endless loop of forced labor for your pets. also make the scripts like literally unreadable, unoptimized with tones of useless things in it.
How did you zoom in and out in your script?
Bro made his own engine
Hey byteblox can you make a video on how to make a bullet hell or something like that? I'd really appreciate it
@Arch-mv5te
Ай бұрын
havent tried it yet, but i think you can try to make sort of generators and give them each an attribute of the position where the "bullet" will go and then using collection service tween it and use cframe.lookat to make it look at the destination
Wait... my codes not supposed to look like this?
16:00 A lot of roblox gears actually have this kinda stuff in them
The stuff the roblox anime games are made of.
Outstanding🔥🔥🔥🔥🔥
@_.-wild._leaf._.
Ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥f
@NoobNoobyNobNub
Ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥f
@tornadoreaper
Ай бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥s🔥🔥🔥🔥🔥🔥🔥🔥🔥
@gdplentie3
Ай бұрын
iNSITTING🧊🧊🧊🧊🧊🧊
tbh, premature optimization is a pit tons of developers fall into.
Inaccurate where’s the 3 nested loops looping over workspace
This was a great tutorial
unironically still better than sols rng
My pc heated up just from playing this video
AMATEUR! forgot ws3 = workspace
@parasyct
Ай бұрын
only related comment in this video and so far behind the other ones
@reddeadleisure
Ай бұрын
@@unfortunatemystery1778workspace is a default global variable smart ass
@xPWR-ol6ze
Ай бұрын
@@unfortunatemystery1778 No, "workspace" is a valid way to get the Workspace of a game. game.Workspace, workspace, and game:GetService('Workspace') are all ways to get the workspace. If you want to get it like this you need to say "workspace" not "Workspace", making sure you have a lowercase "w". Anyway point is you can get it with "workspace".
@JaiDoesVideos
Ай бұрын
@@unfortunatemystery1778it is possible though-
@darillu9979
Ай бұрын
@@unfortunatemystery1778you don't need to add game. Before workspace.
4:52 All of that to get the part then define the variable just using script.Parent genius, my friend
Toy Defense is more unoptimized. 30 fps gaming. Some guy said he was getting 20 on an rtx 4090 in the same match as me, but I doubt it since I have some Radeon RX 580 series.
That mrbest guy seems to give good advice he should start a KZread channel
that's how I imagine my code looks like
Don't let bro cook 😂
"or they dont even know how to code" i think that guy doesnt understand the difference of learning and being entertained
This doesn’t seem too unperformant (unless I missed something near the end, but I kinda lost my patience at that point)
This video makes my skin crawl