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.
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 💪
"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!"
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
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"
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"
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
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 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.
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
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
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.
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
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 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
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 😭😭
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...
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...)
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
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...
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.
you could make another variable called ws3 that's like local ws3 = workspace I was too lazy to test if you can do it even tought it's the most useless thing ever but you probably can. When I'm in my games and I wanna execute commands faster I write workspace instead of game.Workspace it does work.
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??
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.
this helped me a lil bit with for i loops. im currently trying to understand how i can acces the indivisual player in a table. and then assign them "player1" and if ur player 1 or 2-4 then it will show for the players in whatever to check and display there roblox thumbnail to the apropriate UI location. this is prolly confussing. but im getting close. if anyone would like to share some ideas or tipsor questions or anything, i would be so greatful. and vice versa, if u have a question, id love to try to help. stay scripting!
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
@@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".
Hey man I know this is kinda outta the blue but I'm an aspiring 3d modeller and I'd like to know if you have any tutorial/ channel recomendations cuz right now I feel really lost and demotivated. I use blender and really enjoy modelling and sculpting but scene making, animation and texturing... not so much. Should I at least try to learn the basics of those or just stick with what I like?
@@jaop3734 i think it’s important to learn the basics based on what your interested in. blender has so much functionality so you should learn the controls for the specific bit you wanna use
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
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.
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.
bruh, how do you even like, sure, im not a roblox dev, but shouldn't any gamedev need an absolute metric load of loops? because i doubt you are using recursion or higher order functions for that
@@DitherWither nope, in fact most games I made didn't use or needed "for i", but it depends "for" is good for like smooth transitions, now loops you can use a variety of options but what I normally do is "while true do" which basically loops an entire thing over and over again everytime it ends basically a loop, now it depends on the game, but most of the games I do doesn't require a heavy load of loops, but a heavy load of functions, statements, Events and variables like, Local blah = script.parent Local Function whatever() --Stuff you want to do goes here Blah.Touched:connect(whatever) Then if you wanna add a statement then you can make a function within the connection then add bellow, and then add a statement like; if blah.Name == "AHHHH" then In conclusion not every game needs a load of loops, Because every game is different.
@@Dogemin Makes sense, i digged through the codebases of the couple of games i made, and except for the ones i wrote without a game engine, there wasn't too much looping (as stuff usually used callbacks/signals) The only loops i could find were ones like this (this is gdscript) ``` ## Should always be set up from editor @onready var start_point = $RespawnPoint @export var checkpoints: Array[Area2D] = [] func _ready(): hide() for i in range(checkpoints.size()): checkpoints[i].body_entered.connect(get_checkpoint_handler(i)) # Returns the handler for the particular checkpoint id func get_checkpoint_handler(idx): var handler = func handler(_body): set_checkpoint(idx + 1) return handler ``` Considering the fact that neither lua nor gdscript are particularly performant, i'm guessing the reason for this approach is to be able to do as much of the computation in the native(C/C++) code as possible, and also to make it multi-threaded (maybe).
COURSES ARE 50% OFF, USE CODE "EDGEBYTE" (ends in 3 days lol):
linktr.ee/ByteBlox
Womp womp
deeply sorry that you have to use a mac😓💔
sigma 🐺
ligma
sugma
“Why doesn’t tf2 get updates?” What the intern at valve who had the same question sees upon looking at the code:
Nah instead he sees a function that supposedly makes spheres but actually makes squares and quits on the spot
Riot Games employee looking at the code
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.
@@distorted_heavynot even cubes? Just 2 dimensional squares? Just rectangle planes?
@@FeeshUnofficial of course
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 💪
Real *Lua* programmers. If it was something as basic as Scratch or something it would be a pretty different story.
so fucking real
Scatch is not real 👹@@codingpileofdirt
@@codingpileofdirt I was a scratch dev before now i use roblox studio and i use those variables
not using variables actually makes the code run slower (as described in the lua documentation), don't know if this applies to LuaU though
yandere dev type code
making a game with only if statements
@@aljon5947 "if true then"
💀💀💀
@@aljon5947 lmao
@@aljon5947undertale type code
professional roblox jojo game developer coding live footage
The only good comment here
Bro 💀
When your assignment at school has a minimum word count
this
real
minimum line count
@@1000-THRyes
how to reach minimum word count 101
step 1: you’re > you are
+1 word
repeat
5:35 This is just that tweet saying "God I wish there was an easier way to do this"
no don't say it you'll summon derek baum
"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!"
yandere dev else if saga
@@DraxilSpada-vc2wghe did :(
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
This is how devforum memes are created
A lot of games unironically run on code like this 😄
Was gonna say this, some top games breaking the 50,000 lines mark
@@DDog09??? Thats literally normal if its a big game
@@reddeadleisure that’s… literally my point, literally what i just said 🤣
@@DDog09 The fuck you mean? It seems like you were suggesting bigger lines of code = unoptimized which is straight up not true
@@reddeadleisure calm down 💀, you’re being overly combative for no reason. I never said bigger lines of code = unoptimized did I?
"theres a child inside of one thing" byteblox 2024
Ah yes, programmer language
Guys is that freddy fazbear? Hur hur hurhur
@@blacklight683GUYS IS THAT FREDDY FAZBEAR? HUR HUR HURHUR
@@blacklight683god no
I searched up “tween model” the other day and I was scarred.
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"
remember: the only difference between coding and demon summoning is candles.
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"
Ah, yes, 1 = 1+0
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
write true = False, false = True just under it and watch him debug for ages
@@biigsmokee anyone who knows how to debug will watch variable states tho?
@@cewla3348>print(true)
>prints False
this is when u put shotgun in mouth
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)
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
i love making a main menu, thanks for the tutorial!!
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
day 2 of asking for byteblox to recreate the drake video for his next video
I will edge to it
Byteblox swinging it side to side
omd
Maybe I could do it
*NO*
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.
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
I was absolutely rolling when I heard that
type soul code isnt even bad 😭
“How unoptimized can a roblox game get?”
*any simulator game:*
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
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
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
Wow I didn’t even know what optimizing is this is pretty helpful
I'm pretty sure this is a common practice in the roblox dev community by now...
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.
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
ai is shit at making code might as well look a tutorial or go on dev forunlm
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)
After taking my AP Computer Science A Exam this morning, I can certify this is completely acceptable and optimized code.
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
bro most well known games dont even have 150k lines of code
@@r2w-z9o Yep, I was simply trying to see if i could do meta-programming. The answer is "kind of"
DAMN
7:55 u should've done a while true loop cause I suck at coding and that's what I do when i don't know how to use the function
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 😭😭
No way ur here too
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...
pls
make a game that uses no variables 🙏
i promise it’ll be a fun challenge 😃
:D
I code with no variables, not pressing enter and using the Brush Script font. 😊
@@giuyo when i need to disable a chunk of code from a script for a bit, i just place - - before every line 😃
@@Tealen when i wanna loop through a folder, i make a variable for each part in it 😃
without using local?
i looked away because i was doing something, and tuned back to see line 12845 and had a mini heart attack
I always hated that mindset about not optimizing code when learning. Never understood wanting to learn things wrong.
I have no clue how to code in Lua but I like your funny words, magic man
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...)
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
8:57 as a C dev, i'm really triggered by your variable naming, which makes it even better.
3:51
so more pathing's in the workspace AND children in the workspace, slower it will be
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
thanks for the scripting tutorial, at first i didnt know how to script but thanks to this video i already started making my roblox game!
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...
12:48 what you were about to write, i saw bitt instead of a button, it looked like local bit## for a second
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.
Could you consider making a video about coroutines cause I really like how you explain things and I don't understand those.
At 5:40 you should have just always used tweenservice from 0 to 0.1 and etc with no loops for true 🍝
always remember to connect and never disconnect. you never know when you'll need that connection again, after all!
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
if you can take the most basic thing you can do in luau and unoptimize THAT, you're the best scripter i have ever seen
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.
this is how i used to write code after 1 week of scripting, it's been over an year since, i still suck af
My scratch games: amateurs.
you could make another variable called ws3 that's like local ws3 = workspace
I was too lazy to test if you can do it even tought it's the most useless thing ever but you probably can.
When I'm in my games and I wanna execute commands faster I write workspace instead of game.Workspace it does work.
me when i clicked in this video: Ah, unoptimized code, this sure will be funny!
me 4 minutes in: Why can i understand everything?...
finally, you made the average acs gunkit game
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??
Dawg I just realized how many times byte says "ok" in a video 😭
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.
this helped me a lil bit with for i loops. im currently trying to understand how i can acces the indivisual player in a table. and then assign them "player1" and if ur player 1 or 2-4 then it will show for the players in whatever to check and display there roblox thumbnail to the apropriate UI location. this is prolly confussing. but im getting close. if anyone would like to share some ideas or tipsor questions or anything, i would be so greatful. and vice versa, if u have a question, id love to try to help. stay scripting!
5:35 this is where i started crying.
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
so glad you stopped making those long and overcomplicated tutorials😊
16:00 A lot of roblox gears actually have this kinda stuff in them
"If theres a child, inside a thing" 💀
geometry dash lore
real
Take a shot every time he ends a sentence with “okay?”
💀
I think i realy learned more in this video then in some other youtube tutorials👍 thank you very much❤
it all starts to go down hill when nested loop is introduced
i love how he didnt even use task.wait() he just used wait() which is EVEN MORE unoptimized
When you realize his unoptimized code is how your code looks.
Outstanding🔥🔥🔥🔥🔥
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥f
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥f
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥s🔥🔥🔥🔥🔥🔥🔥🔥🔥
iNSITTING🧊🧊🧊🧊🧊🧊
6:12 Can't wait for the part to stop pulsating after 2 hours!
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
I don't know a single thing about coding but I was entertained the whole way through anyways
4:52
All of that to get the part
then define the variable just using script.Parent
genius, my friend
AMATEUR!
forgot ws3 = workspace
only related comment in this video and so far behind the other ones
@@unfortunatemystery1778workspace is a default global variable smart ass
@@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".
@@unfortunatemystery1778it is possible though-
@@unfortunatemystery1778you don't need to add game. Before workspace.
You can just do the part.Transparency like
while true do
wait(1)
part.Transparent = transparenthere
wait(1)
part.Transparent = transparenthere
end
now make the code longer
I don’t understand, that’s only two transparencies and where is 0.5 and 1
@@poopipants2155 Well its like
while true do
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
wait(1)
script.Parent.Transparent = 0
wait(1)
script.Parent.Transparent = 0.5
end
well done, you hurt me and everyone with at least basic programming and optimizing skills
as a 3d modeller, this code is frying my brain
Hey man I know this is kinda outta the blue but I'm an aspiring 3d modeller and I'd like to know if you have any tutorial/ channel recomendations cuz right now I feel really lost and demotivated. I use blender and really enjoy modelling and sculpting but scene making, animation and texturing... not so much. Should I at least try to learn the basics of those or just stick with what I like?
@@jaop3734 i think it’s important to learn the basics based on what your interested in. blender has so much functionality so you should learn the controls for the specific bit you wanna use
new scripter: “can someone tell me how to reference part” byteblox: “throws 17 lines of code”
Could use more print statement whenever anything happens
It’s honestly funny seeing my pc struggle with some roblox games yet handle FH5 at 4k maximum settings and raytracing with no problems.
Love the unoptimized video my man!
4:16 "Ok so now if we know that theres a CHILD inside of a THING called a script" what is bro yapping about 🙏🙏💀
(11:35-12:40)
the thing is some scripts on roblox's official documentation actually do this and it pisses me off to no end
Hey byteblox can you make a video on how to make a bullet hell or something like that? I'd really appreciate it
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
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.
Yo bro instead of holding down the backspace key, hold CTRL when pressing backspace and it'll delete the previous word instantly
ever since watching the low framerate video i am only getting you in my recommended 😭😭
That mrbest guy seems to give good advice he should start a RUclips channel
"There's a CHILD inside a THING called The Script."
add recursion without limits, will be good
this starts to have the same feel as my high school math
The editing is too distracting, did you hire a new editor for this video? I prefer the one's without the zoom ins and fast-paced cuts... 🤕😢😢
It’ll be 50/50 old editing and new editing lol. If one style does better I’ll stick with that
3:24 where is the stacked if statements??
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.
Im as rookie as rookie gets in terms of coding
But even still, looking at this, i can feel my brain trying to dissolve into dust.
good job! you made a code worst than in yandere sim
16:01 😬 i still do this even tho I've been programming for 1 year now, i really have to learm to us "for"
bruh, how do you even
like, sure, im not a roblox dev, but shouldn't any gamedev need an absolute metric load of loops? because i doubt you are using recursion or higher order functions for that
@@DitherWither nope, in fact most games I made didn't use or needed "for i", but it depends "for" is good for like smooth transitions, now loops you can use a variety of options but what I normally do is "while true do" which basically loops an entire thing over and over again everytime it ends basically a loop, now it depends on the game, but most of the games I do doesn't require a heavy load of loops, but a heavy load of functions, statements, Events and variables like,
Local blah = script.parent
Local Function whatever()
--Stuff you want to do goes here
Blah.Touched:connect(whatever)
Then if you wanna add a statement then you can make a function within the connection then add bellow, and then add a statement like; if blah.Name == "AHHHH" then
In conclusion not every game needs a load of loops,
Because every game is different.
@@Dogemin Makes sense, i digged through the codebases of the couple of games i made, and except for the ones i wrote without a game engine, there wasn't too much looping (as stuff usually used callbacks/signals)
The only loops i could find were ones like this (this is gdscript)
```
## Should always be set up from editor
@onready var start_point = $RespawnPoint
@export var checkpoints: Array[Area2D] = []
func _ready():
hide()
for i in range(checkpoints.size()):
checkpoints[i].body_entered.connect(get_checkpoint_handler(i))
# Returns the handler for the particular checkpoint id
func get_checkpoint_handler(idx):
var handler = func handler(_body):
set_checkpoint(idx + 1)
return handler
```
Considering the fact that neither lua nor gdscript are particularly performant, i'm guessing the reason for this approach is to be able to do as much of the computation in the native(C/C++) code as possible, and also to make it multi-threaded (maybe).
If you put // technically you could make your code inf size
how monsters make a kill brick: *damge 1 every 0.1 seconds*