How One Memory Leak Can Kill Your Game

  Рет қаралды 30,803

ByteBlox

ByteBlox

Күн бұрын

Пікірлер: 140
@byteblox100
@byteblox100 7 ай бұрын
the ONLY product i sell: linktr.ee/ByteBlox
@creeperplayzz
@creeperplayzz 7 ай бұрын
No ones buying it lil bro 💀😭
@familyjunk9850
@familyjunk9850 7 ай бұрын
Shit course
@Chad22
@Chad22 7 ай бұрын
@@creeperplayzz fr
@familyjunk9850
@familyjunk9850 7 ай бұрын
Shit course can learn everything for free. Check out gnome code instead if you are thinking about buying this.
@Brakoda-hu5wr
@Brakoda-hu5wr 7 ай бұрын
im blind how do i buy
@ike__
@ike__ 7 ай бұрын
That’s not a “memory leak”. A memory leak happens when there are no pointers to a piece of memory. Since lua has a gc it doesn’t *generally* happen.
@morphious86.
@morphious86. 7 ай бұрын
exactly what the video is trying to explain is more akin to a space leak
@MrM0gus
@MrM0gus 7 ай бұрын
eat your cereal
@Devthedev.
@Devthedev. 7 ай бұрын
Agreed
@blossomcherrypink
@blossomcherrypink 7 ай бұрын
Really? Electron told me I had an EventEmitter memory leak because I was subscribing a listener to an event on a React component re-render while failing to detect that it was already registered. Thus, I registered it 11+ times without cleanup and got that warning. Wouldn't there still be references simply due to the nature of them being registered somewhere? Also because JS has a GC as well?
@redstoneglenn5850
@redstoneglenn5850 7 ай бұрын
Pretty sure he’s using the parts as an example to explain memory leaks. He could’ve highlighted that better but does mention it a bit “imagine this as memory”
@lukasjetu9776
@lukasjetu9776 7 ай бұрын
you mixed up the terms, i know what you mean by "memory leak" but the name isn't accurate, a memory leak is when there are no pointers to a place in memory, thus the program can't locate it, and the memory is unused, i'll set an example: it's like having a big house, where you put stuff everywhere, but when you don't need the stuff, you don't throw it out, you just forget about it, and after some time, eventually the stuff that you don't need piles up so much not even you can fit in the house, and the house is so full it breaks, now just think of the house as the program memory, and think of the stuff as variables
@NATANBX0
@NATANBX0 7 ай бұрын
You explain very well.
@Gix0_0
@Gix0_0 3 ай бұрын
​@@NATANBX0I agree with this guy. It's most common when you have a function that instance a new part. But then you don't return that part and don't destroy it. Causing it to just be in the workspace forever since the script has lost access to it
@RedsquareR
@RedsquareR 7 ай бұрын
pro tip: ALWAYS disconnect connections after use! (especially if you are creating a bunch of them)
@torsionabortion
@torsionabortion 7 ай бұрын
convienent that i have a habit of doing that.
@RedsquareR
@RedsquareR 7 ай бұрын
@@torsionabortion yeah, i forgot to when i was doing a round system and it duplicated my enemies after each round since i never disconnected a connection and it was hell because i didn't know that was why.
@ZenkaiDragon400
@ZenkaiDragon400 7 ай бұрын
local connection connection = game.RunService.Heartbeat:Connect(function() print("EEEEE this will stop printing in 1 second bcuz when heartbeat event runs it will no longer be connnected to this function) end) task.wait(1) connection:Disconnect()
@betagamp
@betagamp 14 күн бұрын
lua has garbage disposal it auto disconnects
@betagamp
@betagamp 14 күн бұрын
if the thing gets destroyed
@timisafe809
@timisafe809 7 ай бұрын
I was hoping you'd cover the in-script memory leaks. It would be really useful if you made a part 2 or something where you talk about stuff like disconnecting events when not needed anymore.
@TheOfficialDorianelevator
@TheOfficialDorianelevator 5 ай бұрын
i was aware of this problem ever since i started scripting, this explains why most stuff in my games do delete cloned stuff.
@astreloxdev
@astreloxdev 5 ай бұрын
pro tip: not deleting your parts and letting them flood workspace causes lag.
@coln.luminescent
@coln.luminescent 7 ай бұрын
Although this is not technically a memory leak, there is a way to prevent players from experiencing lag by using client-side visuals with a heartbeat mechanism. This approach helps prevent lag for other players, and the server will remain unaffected, resulting in no additional lag. WARNING: Do not use this method for all your scripting in your game, as it would be impractical. However, it is a significant way to conserve space and memory. Otherwise, this is a good explaining video! :D
@theenjoyer1445
@theenjoyer1445 7 ай бұрын
ByteBlox; casually uploading a video at midnight edition
@AzureSpike
@AzureSpike 7 ай бұрын
ByteBlox casually uploading a video during day edition
@adhamsherif6230
@adhamsherif6230 7 ай бұрын
arcane odyssey:
@pleszq
@pleszq 7 ай бұрын
pov: you open the inventory more than 2 times
@rrb101567
@rrb101567 7 ай бұрын
pov: you didnt die for a while and try to do a fighting style m1
@ZenkaiDragon400
@ZenkaiDragon400 7 ай бұрын
LOL
@Sebastianpro467
@Sebastianpro467 7 ай бұрын
I had a couple memory leaks in my game once and it was not fun. I fixed them but I had to rewrite scripts and It was time consuming for me!
@coln.luminescent
@coln.luminescent 7 ай бұрын
While understanding your disagreement, I propose that you create your game with your own libraries (modules that you can call and use for utilities): one for the client, one for the server, and one shared (e.g., particle system in the client, saving on the server, and networking in the shared library). Using this approach will increase your work efficiency and should not result in memory or space leaks (at least not significant leaks if you make mistakes).
@HijackedSystem
@HijackedSystem 7 ай бұрын
I dare you to turn a part into a working mirror.
@GPZ-MN
@GPZ-MN 7 ай бұрын
cant just make the reflection property to 1?
@imfunny2394
@imfunny2394 7 ай бұрын
@@GPZ-MN it just reflects the skybox
@Arch-mv5te
@Arch-mv5te 7 ай бұрын
crusherfire has an explanation on how viewport frames work, and how you can use them to make a working mirror (assuming you have basic knowledge)
@1BP6
@1BP6 7 ай бұрын
Finally, I want to bring back old times too tbh bring back the working minors
@GPZ-MN
@GPZ-MN 7 ай бұрын
@@1BP6 WHAT THE FU-
@hell.yeah-
@hell.yeah- 7 ай бұрын
also i believe using debrisservice has the same effect as not deleting a part whenever i use it eventually the game'll lag just as if i never deleted the part, which is why i resort to custom debris functions
@CarlosGotAnimated
@CarlosGotAnimated 7 ай бұрын
congrats on 31.5k subs bro. im only gonna edge to you 31.5k times every day (seriously tho congrats!!!)
@blorbaltude
@blorbaltude 7 ай бұрын
i did the math, have fun edging every 3 seconds
@when-the-hrandomstuff
@when-the-hrandomstuff 7 ай бұрын
old title: How One Memory Leak Can Kill Your Game
@BTM_notBTS
@BTM_notBTS 7 ай бұрын
Its still the same title
@kovoneka
@kovoneka 7 ай бұрын
yo u prankster its the ame
@thismightbetwo
@thismightbetwo 7 ай бұрын
@@kovoneka its just in case it changes
@tappyVQ
@tappyVQ 6 ай бұрын
@@thismightbetwodoes he change them.. yikes
@Malke864
@Malke864 7 ай бұрын
about your course is it subscription or one time purchase?
@diogomiguel6377
@diogomiguel6377 7 ай бұрын
For what i can see it's one time purchase, it states that it has "full acess for life" in udemy, but you can also just learn all of it on your own without paying :p
@byteblox100
@byteblox100 7 ай бұрын
One time, and I’ll also add more units to it from time to time
@windows10technicalpreview
@windows10technicalpreview 7 ай бұрын
make a video on the Clouds object yes thats a thing (they work if you put them into Terrain)
@HypersonicMissile77
@HypersonicMissile77 7 ай бұрын
0:33 lol
@SFSPerseverance69420
@SFSPerseverance69420 7 ай бұрын
memory leaks can kill anything, not just your roblox game
@darkfllame
@darkfllame 7 ай бұрын
well, a memory leak cannot happens in a game engine such as roblox, because a memory leak is basically when a part of memory isn't referenced by the program, since lua is a garbage collected language, it just cannot happens, all you can do is run out of memory.
@darkfllame
@darkfllame 7 ай бұрын
although it can happen if roblox engine's devs are bad at cpp
@Wertyhappy27
@Wertyhappy27 7 ай бұрын
Roblox does have memory leaks, even Roblox's scripts have memory leaks lol, playerlist script my beloved
@joeswagson
@joeswagson 7 ай бұрын
memory leaks can happen in languages with gcs. for example, java
@yeahhhhhhhhhhhhhhhhhhhhhhhhhh
@yeahhhhhhhhhhhhhhhhhhhhhhhhhh 7 ай бұрын
Memory Leak? What's that? I only program in RUST 😎
@Sector322
@Sector322 6 ай бұрын
when you use unsafe
@The_Owly
@The_Owly 4 ай бұрын
Hello,a exploiters can change all value in client ? Like health, boolvalue, invalue etc.. Because i try to make game and im scare for exploiters so a put all Data in server scrip service but its hard to remote information so i want to know if a dont lose the time make that
@SaleMales
@SaleMales 3 ай бұрын
Necessary parts like changing their stats or damaging them have to be on server All security checks have to be on server too Other unnecessary data can be on client (Like handling data to visualize data for client), they can change these for themselves but it wont change anything on server!
@The_Owly
@The_Owly 3 ай бұрын
@@SaleMales ok thanks dude
@SaleMales
@SaleMales 3 ай бұрын
@@The_Owly No problem Basically, all security checks and data changing are on server Other like showing data or creating effects on client
@Malke864
@Malke864 7 ай бұрын
btw again do u think its possible to create cloud shaders and water shaders in roblox, this may sounds way too optimistic but something close to genshin impact waters and and clouds again again by any is mipmapping possible in roblox and uuuh about parallax mapping dang, i dun know how to say this but uuum i would like to know how parallax maps are created in roblox uk the illusion thingy making a 2D surface seem like it has depth and finally is it possible in roblox to see objects in a distance like genshin (i just want to know if all these are possible in roblox)
@todd-haword
@todd-haword 7 ай бұрын
I don’t believe Roblox’s implementation of Lua would allow for that. You would need to be able to access the renderer, which to my knowledge you cannot. Roblox would have to build these shaders into the engine, as they did with physically based textures. If you want a 3d effect on surfaces, you can use normal maps, which can be added to Meshparts, with SurfaceAppearance, and MaterialVariants. Other game engines provide much more freedom.
@truemori6700
@truemori6700 7 ай бұрын
​@@todd-haword time to code my own renderer 😈
@SFSPerseverance69420
@SFSPerseverance69420 7 ай бұрын
if only roblox had shaders and stuff like unity
@cottoncherry2177
@cottoncherry2177 7 ай бұрын
not sure what you mean by cloud shaders, but roblox already has a way to create clouds, it's called the Clouds object and you put it inside the Terrain object
@SFSPerseverance69420
@SFSPerseverance69420 7 ай бұрын
@@cottoncherry2177 they dont have shadows
@OrginalTRreis
@OrginalTRreis 7 ай бұрын
I'm 31.700 Subscriber of this channel.
@potoe6393
@potoe6393 7 ай бұрын
while true do end
@callummcclure2186
@callummcclure2186 7 ай бұрын
Server: **Instantly dies**
@ayoo9631
@ayoo9631 5 ай бұрын
A wuthering waves story fr 🥲
@nilconstant
@nilconstant 7 ай бұрын
Can't you get flagged by hyperion if your game has a memory leak? I got banned in a banwave recently.
@iiangel_
@iiangel_ 7 ай бұрын
Nope? I dont really get why would they
@nikolas4786
@nikolas4786 2 ай бұрын
Use Maid to prevent memory leaks, destroying manually is really bad, also yall can use garbage system
@Basil_Nyth
@Basil_Nyth 3 ай бұрын
StyLiS should be taking notes
@Ahmed.Esmail2169
@Ahmed.Esmail2169 7 ай бұрын
We need vehicles system tutorial pro like how to make cars and bikes cuz almost no one knows anything about that
@alecz3843
@alecz3843 7 ай бұрын
Should have went over connection memory leaks
@ExoticFoxy
@ExoticFoxy 7 ай бұрын
Memory leak its when ur memory overheats and boils and leaks inside ur computer
@Player20XX
@Player20XX 7 ай бұрын
youre so skibidi
@gdmathguy
@gdmathguy 7 ай бұрын
​@@Player20XXyoure so fanum tax idk
@mattplays3824
@mattplays3824 7 ай бұрын
@@gdmathguyyou’re not sigma, start mewing boy 🤫🤫
@gdmathguy
@gdmathguy 7 ай бұрын
@@mattplays3824 🤫🧏🗿
@Subtocoolygamey
@Subtocoolygamey 7 ай бұрын
me peeing caught in 4k
@ne_vaschno
@ne_vaschno 7 ай бұрын
I think i know 2 popular games with those
@creeperplayzz
@creeperplayzz 7 ай бұрын
Day 52 of edging to your videos
@itzfurpleguyisstupid
@itzfurpleguyisstupid 7 ай бұрын
💀
@Thatcringeanimator_
@Thatcringeanimator_ 7 ай бұрын
I’m already on day 366
@Honored_CapyBara
@Honored_CapyBara 7 ай бұрын
@@Thatcringeanimator_ skill issue, im already on day 1921
@BoyOHBoy123
@BoyOHBoy123 6 ай бұрын
Sonic Onset Adventure
@GalaxyClicker
@GalaxyClicker 7 ай бұрын
Wassup byteblox
@PeanutIsFunky
@PeanutIsFunky 6 ай бұрын
memory.leak = false 😎😎
@BIoxPixeI
@BIoxPixeI 7 ай бұрын
reason 2 die:
@Blackcoffee222
@Blackcoffee222 7 ай бұрын
whoops
@asrobox
@asrobox 7 ай бұрын
2k views in 2 hours. bro fell off
@doobergooberthe4th
@doobergooberthe4th 7 ай бұрын
me
@ButterFromDiscord
@ButterFromDiscord 7 ай бұрын
Too bad
@Oorecco20
@Oorecco20 7 ай бұрын
e
@Brakoda-hu5wr
@Brakoda-hu5wr 7 ай бұрын
cool
@Saiora12
@Saiora12 7 ай бұрын
yay
@NaraSherko
@NaraSherko 7 ай бұрын
Weeeeeeee
Programming Rarity is Harder Than You Think
12:31
ByteBlox
Рет қаралды 281 М.
Why I Hate Roblox Simulators
16:42
ByteBlox
Рет қаралды 64 М.
Подсадим людей на ставки | ЖБ | 3 серия | Сериал 2024
20:00
ПАЦАНСКИЕ ИСТОРИИ
Рет қаралды 480 М.
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 59 МЛН
This game is blatantly P2W, its fans don't think so
11:14
GamesFoundation
Рет қаралды 929 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 675 М.
The Best Roblox Studio Features (and Why You Should Use Them)
19:31
I Added Almost Every Mob's AI to This Freak
14:13
Gargin
Рет қаралды 685 М.
How to PREVENT Memory Leaks in Your Roblox Scripts!
9:57
SummerEquinox
Рет қаралды 4,6 М.
Making a difficult game about fitting in - Acerola Jam 0
19:17
jess::codes
Рет қаралды 454 М.
METATABLES | What are they and how can we use them?
18:40
Crusherfire
Рет қаралды 27 М.
How One Man Hacked Hypixel...
15:15
TGWaffles (Thomas)
Рет қаралды 668 М.
Torturing My Roblox Character For Views
12:32
ByteBlox
Рет қаралды 21 М.
this battlegrounds game is SO BAD that it's funny.
12:33
theholygrail75
Рет қаралды 2,7 МЛН