Hello everyone, in this thread I will try to the best of my ability to help you reduce some of the lag in your redstone creations.
Now first we must know what causes lag in XBLMC. Well there are plenty of things that can cause lag. I will name off a few.
Entity count - Too many animals, mobs, items on the ground etc will all cause lag.
Light updates - The initial creation or deletion of light will cause lag due to the game having to update the block light levels (this is important and I will discuss this more later)
Redstone - It's a fact of Minecraft due to the block updates and calculating game ticks, however this is not the huge lag inducer people think it is. (I will elaborate more on this in a moment)
Block updates/Entity calculation - Everything from pistons pushing blocks, water flowing out, animals or mobs jumping around in water, TNT going off (and throwing more TNT around), sand or gravel falling, to using your fancy Efficency 4 shovel can and will cause lag. Due to the updates that these induce wether it's mob behavior or block updates (ghost blocks when using shovels much?) or entity calculation (think falling sand or TNT getting flung everywhere)
Certain Blocks - Some blocks are just inherently laggy when a lot of them are present in one area, these include fenceposts and leaves.
Ok so now that we know a few things that can cause lag how do we combat this? More to the point how can I prevent my circuits from lagging?
Well first off why are your circuits lagging? Now here a lot of people will say "Oh, it's because redstone just makes the game laggy etc..etc.." While this can sometimes be the case the true culprit of most redstone lag comes not from the redstone, but from block light level updates.
Now you maybe saying "Whatchu talkin bout Rush?" Hear me out on this, and you will understand.
First off let's do some experimenting to show just how bad block light level updates can be (I will now call them BLLUs for the sake of not making this a wall of text) Start by making a blank superflat creative world. Now go up about 50 or so blocks and make a 50x50 platform one block thick of any block that isn't transparent, such as cobblestone.
Now you should have a pretty big dark patch underneath the platform. Now go somewhere near the middle and punch a hole. Did you experience the lag? Now what could be causing that? Well it's BLLUs. See the way the game works with BLLUs is that when you punched that hole in the platform it is actually checking EVERY BLOCK IN THAT CHUNK BELOW THAT AREA. This includes air blocks, as it checks them for transparency. So you can imagine how many blocks the game has to check just for the sake of one block being removed.
Your probably saying "Rush this is all well and good, but what does this have to do with my redstone?" Well it has a lot to do with your redstone actually, because redstone actually has two components that give off light, the redstone torch, and the repeater. The redstone dust does NOT give off light. Suddenly things are starting to be clearer. Not only are you getting minimal redstone lag but your also getting the worse BLLU lag. Think about it whenever doing some complex wiring what does everyone usually do? They usually run wool or some other sort of block up and around wherever they are working to move the redstone where they need it. Chances are you have some repeaters or maybe some redstone torches that invert every so often no big deal right? Wrong. As these repeaters and torches turn on and off they are producing light which leads to lag, even worse still is if they are on just a single line of blocks because that extra light is leaking over the edge and causing even more BLUs.
NOTE: I had problems taking screenshots on my xbox so i took these on the PC but you will actually be able to see the difference better and the effect BLU have on performance take a look at my FPS in the upper left hand corner
Here you see my FPS is 667
These are taken right after i broke the blocks allowing the light to enter, notice how my FPS drops to 585
Even worse when I replace the block and update the BL again my FPS drops to 244
So then I created this simple clock in the dark zone notice my FPS before I start it up 646
My FPS quickly dips to and hovers around 423 with it running in a dark area
Ok so how do I stop this from happening? Let me introduce you to your new best friend...Glowstone. Yes that's right glowstone. How will this help ms you ask? Well let me tell you. If you were to encase your redstone torches and your repeaters in glowstone (generally 3 blocks in front, behind and on top of your redstone torches and repeaters) that would saturate that area with block light meaning that when the repeaters or torches change state there would be no BLU, thereby eliminating the lag caused by them. It's really that simple, this method can be used on big circuits or small and it will make a difference.
Look at my FPS when I encase the circuit with glowstone 629
Other things you want to watch out for are pistons as they become transparent when extended in this case you may want to saturate both sides of the piston where applicable.
Thanks Everyone I think can benefit from this, I had a small clock 2 repeaters and 4 dust running encased in glowstone with 8 players and they said that they weren't even experiencing any lag
Nice find rush. I will try it out and see if it helps me on my world. I have a few devices the run terrible when I have people in the world...but they are in dark areas so I can try this out.
Still wish they would actually fix the Redstone. There has to be something they can do to help us reduce the lag instead of having to do it ourselves.
^This I quote for truth.
It certainly can be a limiting factor in some peoples builds, CPUs, GPUs, memory arrays, and even some more redstone heavy minigames can become almost unplayable in some cases. I'm also pretty shocked we are still without glowstone logic. At this rat we will have redstone friendly half-slabs before that happens
THANK YOU, Rush. I remember months ago I suggested that it would be a neat feature if 4j introduced a texture pack that had the bonus of eliminating the light and particle effects of redstone. The topic was bashed to death, because everyone was 100% sure that the light effects had little to do with the lag. (Even though people have been modding the PC version to eliminate redstone lighting for years.)
Also, thanks for the tip with the glowstone. I feel pretty moronic that I hadn't thought of that.
I'm also pretty shocked we are still without glowstone logic. At this rat we will have redstone friendly half-slabs before that happens
I expect this to come alongside TU9. The first thing I have been doing for the last 3 - 4 updates/patches is experimenting to discover any changes in the mechanics of glowstone. Since TU8, glowstone changed from an opaque to a transparent block. Thus, just like any other transparent block, some items cannot be placed on top of it, including any redstone-related tiles. If we continue to feel the PC version's update trend, in terms of glowstone behavior, *fingers crossed* we should be able to place redstone wire atop this block in the next update. After that's off my chest, I will be able to focus on dreaming about upside-down slabs and placing repeaters on them.
Having an option to turn off particle effects will also help with lag since the game can simply avoid checking for them all together. Hopefully 4J will add it. . . Cant increase the console RAM so we need other work-arounds.
Wasnt in the change log. Lots of things werent that I was expecting: lava bucket in furnice returns bucket, carrots and potatoes, new mob AI. . . Maybe we'll have some "surprises" when TU9 launches. :\
Wasnt in the change log. Lots of things werent that I was expecting: lava bucket in furnice returns bucket, carrots and potatoes, new mob AI. . . Maybe we'll have some "surprises" when TU9 launches. :\
99% of the time, they leave small features out of the changelog. For instance, the changelog for TU8 did not state that glowstone would become a transparent block. (EDIT: Forgot to mention that they didn't point out the updated mechanics for a single tile of redstone wire either.) It also wasn't stated in the changelog (I don't think) when they brought forward the more compact hitbox for fences. There are always secrets in each update, little things that the majority of players won't find particularly interesting. The changelongs for title updates focus on getting people excited for new content, not fixes/patches for what was already there. The irony of it is that, for a game like Minecraft, a large portion of the fanbase would rather have fixes than new goodies.
Ya I started building in my map again and was getting TERRIBLE. Lag spike whenever I updated the lighting (especially any lighting caused by sunlight, I imagine because of the diameter of blocks it lights up) Then I was like hold on a tick. I did some experimenting with updating the light levels, I found if I covered the soon to be effected area with glowstone the lag wasn't as bad or stopped completely depending on my diligence with the glowstone. So then I tried running clocks in very dark and very lit up areas. With about 4-5 clocks running in separate dark areas the game shuffled to a crawl, I couldn't recreate those effects of unplayable lag with the lit up clocks even with 12 of them going.
Nosejob, you were correct back then when you were talking about it being the particle and light updates off the redstone. We desperately need a feature to turn them on and off. I hope your right about the secrets in the coming update, I also noticed that glowstones characteristics changed to that of a transparent block, it broke one of my circuits as I had redstone running on the glowstone I guess all we can do is cross our fingers and hope a 4J'r sees this. I'm after sending them a tweet describing my findings, but I'm sure they probably didn't see it. Small tweak suggestions to make the game run smoother always get buried by the silly amount of requests for "total game changing mods" such as tekkit or FTB, on the request thread makes me not even bother.
Question.
Wouldn't it be easier to use torches? Do you have to use glowstone? My world is very laggy so i'd like to decrease lag but I was wondering if I use torches, how many do I need, where to place them, and how far on a light level?
I found this very helpful.
By the way, little off topic. Signs make your world lag too. You will feel MAJOR frame drop. The reason why is because signs have to render the text. "Obviously" but xbox has not much as RAM as the PC so it's very difficult for the xbox to handle signs. That is also why we can't have book quills or whatever it's called. The one where you can write a little story on the book. You know what I mean.
You can use torches but it will not be nearly as effective because not only is the light level they give off smaller, but the glowstone is an actual block that will also block the light levels caused by the change in the redstone items change in state (maybe I'm not sure 100% sure if light would actually pass through glowstone given that it has the properties of a transparent block)
Yea I didnt mention everything that causes lag, as my first post I felt was somewhat long winded as it was. You should also becarful of item frames if the PC version is any indication a large number of them will also lag the game.
You can use torches but it will not be nearly as effective because not only is the light level they give off smaller, but the glowstone is an actual block that will also block the light levels caused by the change in the redstone items change in state (maybe I'm not sure 100% sure if light would actually pass through glowstone given that it has the properties of a transparent block)
Yea I didnt mention everything that causes lag, as my first post I felt was somewhat long winded as it was. You should also becarful of item frames if the PC version is any indication a large number of them will also lag the game.
If I put torches in a 2x3 redstone room will that help a lot or little. Is it worth it?
I counted how many item frams I will be using. So it's 134. Will that lag my game on the xbox?
Now first we must know what causes lag in XBLMC. Well there are plenty of things that can cause lag. I will name off a few.
Entity count - Too many animals, mobs, items on the ground etc will all cause lag.
Light updates - The initial creation or deletion of light will cause lag due to the game having to update the block light levels (this is important and I will discuss this more later)
Redstone - It's a fact of Minecraft due to the block updates and calculating game ticks, however this is not the huge lag inducer people think it is. (I will elaborate more on this in a moment)
Block updates/Entity calculation - Everything from pistons pushing blocks, water flowing out, animals or mobs jumping around in water, TNT going off (and throwing more TNT around), sand or gravel falling, to using your fancy Efficency 4 shovel can and will cause lag. Due to the updates that these induce wether it's mob behavior or block updates (ghost blocks when using shovels much?) or entity calculation (think falling sand or TNT getting flung everywhere)
Certain Blocks - Some blocks are just inherently laggy when a lot of them are present in one area, these include fenceposts and leaves.
Ok so now that we know a few things that can cause lag how do we combat this? More to the point how can I prevent my circuits from lagging?
Well first off why are your circuits lagging? Now here a lot of people will say "Oh, it's because redstone just makes the game laggy etc..etc.." While this can sometimes be the case the true culprit of most redstone lag comes not from the redstone, but from block light level updates.
Now you maybe saying "Whatchu talkin bout Rush?" Hear me out on this, and you will understand.
First off let's do some experimenting to show just how bad block light level updates can be (I will now call them BLLUs for the sake of not making this a wall of text) Start by making a blank superflat creative world. Now go up about 50 or so blocks and make a 50x50 platform one block thick of any block that isn't transparent, such as cobblestone.
Now you should have a pretty big dark patch underneath the platform. Now go somewhere near the middle and punch a hole. Did you experience the lag? Now what could be causing that? Well it's BLLUs. See the way the game works with BLLUs is that when you punched that hole in the platform it is actually checking EVERY BLOCK IN THAT CHUNK BELOW THAT AREA. This includes air blocks, as it checks them for transparency. So you can imagine how many blocks the game has to check just for the sake of one block being removed.
Your probably saying "Rush this is all well and good, but what does this have to do with my redstone?" Well it has a lot to do with your redstone actually, because redstone actually has two components that give off light, the redstone torch, and the repeater. The redstone dust does NOT give off light. Suddenly things are starting to be clearer. Not only are you getting minimal redstone lag but your also getting the worse BLLU lag. Think about it whenever doing some complex wiring what does everyone usually do? They usually run wool or some other sort of block up and around wherever they are working to move the redstone where they need it. Chances are you have some repeaters or maybe some redstone torches that invert every so often no big deal right? Wrong. As these repeaters and torches turn on and off they are producing light which leads to lag, even worse still is if they are on just a single line of blocks because that extra light is leaking over the edge and causing even more BLUs.
NOTE: I had problems taking screenshots on my xbox so i took these on the PC but you will actually be able to see the difference better and the effect BLU have on performance take a look at my FPS in the upper left hand corner
Here you see my FPS is 667
These are taken right after i broke the blocks allowing the light to enter, notice how my FPS drops to 585
Even worse when I replace the block and update the BL again my FPS drops to 244
So then I created this simple clock in the dark zone notice my FPS before I start it up 646
My FPS quickly dips to and hovers around 423 with it running in a dark area
Ok so how do I stop this from happening? Let me introduce you to your new best friend...Glowstone. Yes that's right glowstone. How will this help ms you ask? Well let me tell you. If you were to encase your redstone torches and your repeaters in glowstone (generally 3 blocks in front, behind and on top of your redstone torches and repeaters) that would saturate that area with block light meaning that when the repeaters or torches change state there would be no BLU, thereby eliminating the lag caused by them. It's really that simple, this method can be used on big circuits or small and it will make a difference.
Look at my FPS when I encase the circuit with glowstone 629
Other things you want to watch out for are pistons as they become transparent when extended in this case you may want to saturate both sides of the piston where applicable.
Thanks for reading
i'll glowstone up my world and see if it smoothes out the automatic farms right next to the animal pens,
thanks!
^This I quote for truth.
It certainly can be a limiting factor in some peoples builds, CPUs, GPUs, memory arrays, and even some more redstone heavy minigames can become almost unplayable in some cases. I'm also pretty shocked we are still without glowstone logic. At this rat we will have redstone friendly half-slabs before that happens
Also, thanks for the tip with the glowstone. I feel pretty moronic that I hadn't thought of that.
I expect this to come alongside TU9. The first thing I have been doing for the last 3 - 4 updates/patches is experimenting to discover any changes in the mechanics of glowstone. Since TU8, glowstone changed from an opaque to a transparent block. Thus, just like any other transparent block, some items cannot be placed on top of it, including any redstone-related tiles. If we continue to feel the PC version's update trend, in terms of glowstone behavior, *fingers crossed* we should be able to place redstone wire atop this block in the next update. After that's off my chest, I will be able to focus on dreaming about upside-down slabs and placing repeaters on them.
Wasnt in the change log. Lots of things werent that I was expecting: lava bucket in furnice returns bucket, carrots and potatoes, new mob AI. . . Maybe we'll have some "surprises" when TU9 launches. :\
99% of the time, they leave small features out of the changelog. For instance, the changelog for TU8 did not state that glowstone would become a transparent block. (EDIT: Forgot to mention that they didn't point out the updated mechanics for a single tile of redstone wire either.) It also wasn't stated in the changelog (I don't think) when they brought forward the more compact hitbox for fences. There are always secrets in each update, little things that the majority of players won't find particularly interesting. The changelongs for title updates focus on getting people excited for new content, not fixes/patches for what was already there. The irony of it is that, for a game like Minecraft, a large portion of the fanbase would rather have fixes than new goodies.
Nosejob, you were correct back then when you were talking about it being the particle and light updates off the redstone. We desperately need a feature to turn them on and off. I hope your right about the secrets in the coming update, I also noticed that glowstones characteristics changed to that of a transparent block, it broke one of my circuits as I had redstone running on the glowstone
Wouldn't it be easier to use torches? Do you have to use glowstone? My world is very laggy so i'd like to decrease lag but I was wondering if I use torches, how many do I need, where to place them, and how far on a light level?
I found this very helpful.
By the way, little off topic. Signs make your world lag too. You will feel MAJOR frame drop. The reason why is because signs have to render the text. "Obviously" but xbox has not much as RAM as the PC so it's very difficult for the xbox to handle signs. That is also why we can't have book quills or whatever it's called. The one where you can write a little story on the book. You know what I mean.
Yea I didnt mention everything that causes lag, as my first post I felt was somewhat long winded as it was. You should also becarful of item frames if the PC version is any indication a large number of them will also lag the game.
If I put torches in a 2x3 redstone room will that help a lot or little. Is it worth it?
I counted how many item frams I will be using. So it's 134. Will that lag my game on the xbox?