How One Memory Leak Can Kill Your Game

  Рет қаралды 29,963

ByteBlox

ByteBlox

Күн бұрын

Пікірлер: 137
@byteblox100
@byteblox100 5 ай бұрын
the ONLY product i sell: linktr.ee/ByteBlox
@creeperplayzz
@creeperplayzz 5 ай бұрын
No ones buying it lil bro 💀😭
@familyjunk9850
@familyjunk9850 5 ай бұрын
Shit course
@Chad22
@Chad22 5 ай бұрын
@@creeperplayzz fr
@familyjunk9850
@familyjunk9850 5 ай бұрын
Shit course can learn everything for free. Check out gnome code instead if you are thinking about buying this.
@Brakoda-hu5wr
@Brakoda-hu5wr 5 ай бұрын
im blind how do i buy
@ike__
@ike__ 5 ай бұрын
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. 5 ай бұрын
exactly what the video is trying to explain is more akin to a space leak
@MrM0gus
@MrM0gus 5 ай бұрын
eat your cereal
@Devthedev.
@Devthedev. 5 ай бұрын
Agreed
@blossomcherrypink
@blossomcherrypink 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
You explain very well.
@Gix0_0
@Gix0_0 2 ай бұрын
​@@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 5 ай бұрын
pro tip: ALWAYS disconnect connections after use! (especially if you are creating a bunch of them)
@torsionabortion
@torsionabortion 5 ай бұрын
convienent that i have a habit of doing that.
@RedsquareR
@RedsquareR 5 ай бұрын
@@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 5 ай бұрын
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()
@timisafe809
@timisafe809 5 ай бұрын
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 4 ай бұрын
i was aware of this problem ever since i started scripting, this explains why most stuff in my games do delete cloned stuff.
@coln.luminescent
@coln.luminescent 5 ай бұрын
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
@astreloxdev
@astreloxdev 4 ай бұрын
pro tip: not deleting your parts and letting them flood workspace causes lag.
@CarlosGotAnimated
@CarlosGotAnimated 5 ай бұрын
congrats on 31.5k subs bro. im only gonna edge to you 31.5k times every day (seriously tho congrats!!!)
@aquilyxus
@aquilyxus 5 ай бұрын
i did the math, have fun edging every 3 seconds
@theenjoyer1445
@theenjoyer1445 5 ай бұрын
ByteBlox; casually uploading a video at midnight edition
@AzureSpike
@AzureSpike 5 ай бұрын
ByteBlox casually uploading a video during day edition
@adhamsherif6230
@adhamsherif6230 5 ай бұрын
arcane odyssey:
@pleszq
@pleszq 5 ай бұрын
pov: you open the inventory more than 2 times
@rrb101567
@rrb101567 5 ай бұрын
pov: you didnt die for a while and try to do a fighting style m1
@ZenkaiDragon400
@ZenkaiDragon400 5 ай бұрын
LOL
@Sebastianpro467
@Sebastianpro467 5 ай бұрын
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 5 ай бұрын
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).
@hell.yeah-
@hell.yeah- 5 ай бұрын
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
@Malke864
@Malke864 5 ай бұрын
about your course is it subscription or one time purchase?
@diogomiguel6377
@diogomiguel6377 5 ай бұрын
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 5 ай бұрын
One time, and I’ll also add more units to it from time to time
@HijackedFish
@HijackedFish 5 ай бұрын
I dare you to turn a part into a working mirror.
@GPZ-MN
@GPZ-MN 5 ай бұрын
cant just make the reflection property to 1?
@imfunny2394
@imfunny2394 5 ай бұрын
@@GPZ-MN it just reflects the skybox
@Arch-mv5te
@Arch-mv5te 5 ай бұрын
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 5 ай бұрын
Finally, I want to bring back old times too tbh bring back the working minors
@GPZ-MN
@GPZ-MN 5 ай бұрын
@@1BP6 WHAT THE FU-
@darkfllame
@darkfllame 5 ай бұрын
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 5 ай бұрын
although it can happen if roblox engine's devs are bad at cpp
@Wertyhappy27
@Wertyhappy27 5 ай бұрын
Roblox does have memory leaks, even Roblox's scripts have memory leaks lol, playerlist script my beloved
@joeswagson
@joeswagson 5 ай бұрын
memory leaks can happen in languages with gcs. for example, java
@when-the-hrandomstuff
@when-the-hrandomstuff 5 ай бұрын
old title: How One Memory Leak Can Kill Your Game
@BTM_notBTS
@BTM_notBTS 5 ай бұрын
Its still the same title
@kovoneka
@kovoneka 5 ай бұрын
yo u prankster its the ame
@thismightbetwo
@thismightbetwo 5 ай бұрын
@@kovoneka its just in case it changes
@tappyVQ
@tappyVQ 5 ай бұрын
@@thismightbetwodoes he change them.. yikes
@nikolas4786
@nikolas4786 Ай бұрын
Use Maid to prevent memory leaks, destroying manually is really bad, also yall can use garbage system
@yeahhhhhhhhhhhhhhhhhhhhhhhhhh
@yeahhhhhhhhhhhhhhhhhhhhhhhhhh 5 ай бұрын
Memory Leak? What's that? I only program in RUST 😎
@Sector322
@Sector322 5 ай бұрын
when you use unsafe
@SFSPerseverance69420
@SFSPerseverance69420 5 ай бұрын
memory leaks can kill anything, not just your roblox game
@The_Owly
@The_Owly 2 ай бұрын
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 2 ай бұрын
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 2 ай бұрын
@@SaleMales ok thanks dude
@SaleMales
@SaleMales 2 ай бұрын
@@The_Owly No problem Basically, all security checks and data changing are on server Other like showing data or creating effects on client
@windows10technicalpreview
@windows10technicalpreview 5 ай бұрын
make a video on the Clouds object yes thats a thing (they work if you put them into Terrain)
@potoe6393
@potoe6393 5 ай бұрын
while true do end
@callummcclure2186
@callummcclure2186 5 ай бұрын
Server: **Instantly dies**
@ExoticFoxy
@ExoticFoxy 5 ай бұрын
Memory leak its when ur memory overheats and boils and leaks inside ur computer
@Player20XX
@Player20XX 5 ай бұрын
youre so skibidi
@gdmathguy
@gdmathguy 5 ай бұрын
​@@Player20XXyoure so fanum tax idk
@mattplays3824
@mattplays3824 5 ай бұрын
@@gdmathguyyou’re not sigma, start mewing boy 🤫🤫
@gdmathguy
@gdmathguy 5 ай бұрын
@@mattplays3824 🤫🧏🗿
@OrginalTRreis
@OrginalTRreis 5 ай бұрын
I'm 31.700 Subscriber of this channel.
@nilconstant
@nilconstant 5 ай бұрын
Can't you get flagged by hyperion if your game has a memory leak? I got banned in a banwave recently.
@iiangel_
@iiangel_ 5 ай бұрын
Nope? I dont really get why would they
@HypersonicMissile77
@HypersonicMissile77 5 ай бұрын
0:33 lol
@Basil_Nyth
@Basil_Nyth 2 ай бұрын
StyLiS should be taking notes
@ayoo9631
@ayoo9631 3 ай бұрын
A wuthering waves story fr 🥲
@creeperplayzz
@creeperplayzz 5 ай бұрын
Day 52 of edging to your videos
@itzfurpleguyisstupid
@itzfurpleguyisstupid 5 ай бұрын
💀
@Thatcringeanimator_
@Thatcringeanimator_ 5 ай бұрын
I’m already on day 366
@Honored_CapyBara
@Honored_CapyBara 5 ай бұрын
@@Thatcringeanimator_ skill issue, im already on day 1921
@Subtocoolygamey
@Subtocoolygamey 5 ай бұрын
me peeing caught in 4k
@Malke864
@Malke864 5 ай бұрын
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 5 ай бұрын
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 5 ай бұрын
​@@todd-haword time to code my own renderer 😈
@SFSPerseverance69420
@SFSPerseverance69420 5 ай бұрын
if only roblox had shaders and stuff like unity
@cottoncherry2177
@cottoncherry2177 5 ай бұрын
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 5 ай бұрын
@@cottoncherry2177 they dont have shadows
@Ahmed.Esmail2169
@Ahmed.Esmail2169 5 ай бұрын
We need vehicles system tutorial pro like how to make cars and bikes cuz almost no one knows anything about that
@alecz3843
@alecz3843 5 ай бұрын
Should have went over connection memory leaks
@GalaxyClicker
@GalaxyClicker 5 ай бұрын
Wassup byteblox
@ne_vaschno
@ne_vaschno 5 ай бұрын
I think i know 2 popular games with those
@PeanutIsFunky
@PeanutIsFunky 5 ай бұрын
memory.leak = false 😎😎
@BoyOHBoy123
@BoyOHBoy123 5 ай бұрын
Sonic Onset Adventure
@ButterFromDiscord
@ButterFromDiscord 5 ай бұрын
Too bad
@BIoxPixeI
@BIoxPixeI 5 ай бұрын
reason 2 die:
@asrobox
@asrobox 5 ай бұрын
2k views in 2 hours. bro fell off
@Blackcoffee222
@Blackcoffee222 5 ай бұрын
whoops
@Brakoda-hu5wr
@Brakoda-hu5wr 5 ай бұрын
cool
@Saiora12
@Saiora12 5 ай бұрын
yay
@doobergooberthe4th
@doobergooberthe4th 5 ай бұрын
me
@Oorecco20
@Oorecco20 5 ай бұрын
e
@NaraSherko
@NaraSherko 5 ай бұрын
Weeeeeeee
Programming Rarity is Harder Than You Think
12:31
ByteBlox
Рет қаралды 277 М.
Why I Hate Roblox Currencies
23:27
ByteBlox
Рет қаралды 7 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 23 МЛН
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 51 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 7 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 17 МЛН
A Guide to Minecraft's Most Ridiculous Mod
16:16
Mykra
Рет қаралды 357 М.
How Unoptimized Can a Roblox Game Get?
16:49
ByteBlox
Рет қаралды 320 М.
6 Years of Game Dev In 11 Minutes [REUPLOAD]
11:22
Matt Stevens
Рет қаралды 2,6 М.
this battlegrounds game is SO BAD that it's funny.
12:33
theholygrail75
Рет қаралды 2,5 МЛН
How to PREVENT Memory Leaks in Your Roblox Scripts!
9:57
SummerEquinox
Рет қаралды 4 М.
How This Roblox Game Created Itself (Technically)
18:28
ByteBlox
Рет қаралды 27 М.
Why I Hate Roblox Simulators
16:42
ByteBlox
Рет қаралды 63 М.
7 Things I'll Never Add as a Roblox Developer
50:52
ByteBlox
Рет қаралды 81 М.
METATABLES | What are they and how can we use them?
18:40
Crusherfire
Рет қаралды 24 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 23 МЛН