(I don't consider this a suggestion as I'm not suggesting anything, only asking for discussion)
If you've spent a lot of time in the suggestions forum, you know there are a lot of suggestions regarding slabs. These are usually "make slabs of different types stackable" and "allow vertical slabs." The problem with these, however, is that this would be impossible without adding tons of new block IDs and models, unless slabs were converted to tile entities. If slabs were tile entities, this would all be possible quite easily, but tile entities add to the memory Minecraft needs to use and could potentially cause lag. However, is that really a big deal, or just hyperbole?
Now, I can't really give a definitive answer (I would have tried creating a mod to test it, but my computer won't work for it), but I did make an experiment once in which I tested the performance costs of tile entities.
First, I created a completely empty Superflat world. Then, I filled an entire chunk (16x16x256, 65,536 blocks) with dirt, a block that does nothing. I got a small blip of lag and an increase of memory usage, as the /fill commands were executed and Minecraft saved the data, which quickly subsided. I then replaced that chunk with furnaces, a tile entity that does nothing when not burning fuel. Again, a small blip of lag and memory increase, but the performance quickly returned to normal. I then did the same thing with hoppers, which had a similar effect, but a small amount of my fps drop and increased memory usage lingered due to the hoppers constantly ticking and checking what was in each other's inventory.
So, in other words, even on potato machines like mine, tile entities that do nothing don't really contribute to performance loss all that much. And really, does the average person use more than 65k slabs in any build?
If anyone can provide more solid evidence, for or against changing slabs to tile entities, I would appreciate it.
I know this may come a little late. But yes, tile entities are laggy. Extremely laggy. Its not only a memory issue but rather a tick issue.
Tile entities allow three things:
They allow the usage of NBT tags, which like you said would solve your problem (though it would actually increase a bit of client lag because textures would be different for the same block), since they allow you to store as much data as you want.
An update() method which is called every game tick. This is what causes 99% of the lag, as most likely, your tile entities slabs would not need it. Unfortunately, regardless of whether you use the method or not, java calls it for all Tile Entities. If they ignore It'l be faster, but there is still a bottleneck for calling a method that does nothing.
Special rendering based on conditions. Used for example for chests.
Also, take in consideration that tile entities will take more space than regular blocks and since slabs are non expensive, you can quickly fill a chunk with a lot of redundant data (if both slabs are the same).
The reason you get more lag with hoppers is because the actively use the update method to check for items. So basically they are constantly checking for items on their inventory every tick (20 times a second without lag). When you make a design decision you can't expect players to use or build just an x amount of it. You must be ready for the possibility they will exploit the game's logic. Or that they may not follow your expectations.
Now, can this be done? Sure. But it would help if the Minecraft team changed a little how tile entities work. Done the way things are, it would increase lag by a lot. If you don't believe how laggy tile entities are, check out for modded servers. Even servers running semi-enterprise level hardware struggle to cope for 20 players.
Well, getting a reply late is better than a reply never. I'd completely forgotten about this thread.
Even after seeing this, I'm not convinced. Yeah, the game must call one method that it can ignore for the most part, and that would probably cause reduced FPS. However, the game doesn't really lag in practice. If the game can easily handle 65 thousand tile entities that do nothing on a terrible laptop like mine, I'm sure that lag caused by at most a few hundred slabs would be insignificant, especially if Mojang did what you suggested and changed tile entities to be more efficient. As for modded servers, they're, well, modded, which could mean plenty of unoptimized code from amateur programmers, as well as tile entities that do more than just exist.
The biggest question is, is it worth it? In my opinion it is. A tiny decrease in fps and a small increase in memory usage and file size are worth getting a huge amount of versatility offered by custom slabs in various orientations.
Actually the game does lag a bit for people on low end machines. Many of them have to reduce their settings or resort to getting optifine to try and improve game performance. One of Mojangs goals has always been to make the game run on minimal spec machines but even so the game has gotten beefy enough that the minimum specs have risen and they're always looking for ways to reduce the load to improve performance.
Actually the game does lag a bit for people on low end machines. Many of them have to reduce their settings or resort to getting optifine to try and improve game performance. One of Mojangs goals has always been to make the game run on minimal spec machines but even so the game has gotten beefy enough that the minimum specs have risen and they're always looking for ways to reduce the load to improve performance.
I'm running a low-end machine myself (2x Intel Pentium CPU @ 2.2GHz, 2nd generation Intel HD graphics card, and 4GB of RAM available). If I don't notice a significant amount of lag, I don't see many computers out there getting lag either, except for maybe a few weird setups. I consider my computer obsolete and wouldn't be incredibly upset if the next version of Minecraft was incompatible with my machine. If a computer gets extreme lag from tile entities because their computer is weaker than mine, then I would think that they should upgrade instead of complaining.
When it comes to tile entities, I usually try to avoid them (since just 70 could cause massive lag) (and also considering the computer is very low-end). Lag is a real issue with me unless I turn my settings all the way down (and that isn't great, either), and making slabs tile entities would be horrible to me, considering I use them quite often.
Rollback Post to RevisionRollBack
I don't even play Minecraft much anymore yet here I am on the Minecraft forums for some reason...
When it comes to tile entities, I usually try to avoid them (since just 70 could cause massive lag) (and also considering the computer is very low-end). Lag is a real issue with me unless I turn my settings all the way down (and that isn't great, either), and making slabs tile entities would be horrible to me, considering I use them quite often.
Just how low-end are we talking about? Mine is low-end (as you can see from my post above), and can easily handle 1,000s of tile entities without reducing overall framerate (my average fps is nothing to brag about, though, averaging 15-30 fps depending on the version I'm running). In fact, I often play adventure maps with large numbers of command blocks (more than 100 is common). If being a tile entity automatically causes lag, then my framerate should be crippled just by the existence of empty command blocks, let alone huge groups of them running commands. Yet, my framerate only suffers slightly, and I believe it's more to do with the commands that are constantly running than the existence of the command blocks.
If you've spent a lot of time in the suggestions forum, you know there are a lot of suggestions regarding slabs. These are usually "make slabs of different types stackable" and "allow vertical slabs." The problem with these, however, is that this would be impossible without adding tons of new block IDs and models, unless slabs were converted to tile entities. If slabs were tile entities, this would all be possible quite easily, but tile entities add to the memory Minecraft needs to use and could potentially cause lag. However, is that really a big deal, or just hyperbole?
Now, I can't really give a definitive answer (I would have tried creating a mod to test it, but my computer won't work for it), but I did make an experiment once in which I tested the performance costs of tile entities.
First, I created a completely empty Superflat world. Then, I filled an entire chunk (16x16x256, 65,536 blocks) with dirt, a block that does nothing. I got a small blip of lag and an increase of memory usage, as the /fill commands were executed and Minecraft saved the data, which quickly subsided. I then replaced that chunk with furnaces, a tile entity that does nothing when not burning fuel. Again, a small blip of lag and memory increase, but the performance quickly returned to normal. I then did the same thing with hoppers, which had a similar effect, but a small amount of my fps drop and increased memory usage lingered due to the hoppers constantly ticking and checking what was in each other's inventory.
So, in other words, even on potato machines like mine, tile entities that do nothing don't really contribute to performance loss all that much. And really, does the average person use more than 65k slabs in any build?
If anyone can provide more solid evidence, for or against changing slabs to tile entities, I would appreciate it.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Well, getting a reply late is better than a reply never. I'd completely forgotten about this thread.
Even after seeing this, I'm not convinced. Yeah, the game must call one method that it can ignore for the most part, and that would probably cause reduced FPS. However, the game doesn't really lag in practice. If the game can easily handle 65 thousand tile entities that do nothing on a terrible laptop like mine, I'm sure that lag caused by at most a few hundred slabs would be insignificant, especially if Mojang did what you suggested and changed tile entities to be more efficient. As for modded servers, they're, well, modded, which could mean plenty of unoptimized code from amateur programmers, as well as tile entities that do more than just exist.
The biggest question is, is it worth it? In my opinion it is. A tiny decrease in fps and a small increase in memory usage and file size are worth getting a huge amount of versatility offered by custom slabs in various orientations.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
Actually the game does lag a bit for people on low end machines. Many of them have to reduce their settings or resort to getting optifine to try and improve game performance. One of Mojangs goals has always been to make the game run on minimal spec machines but even so the game has gotten beefy enough that the minimum specs have risen and they're always looking for ways to reduce the load to improve performance.
by c0yote
I tried it with terrible results. I gave my wife my glasses for a second, a creeper showed up and now my wife is pregnant.
Stupid 3D..
I'm running a low-end machine myself (2x Intel Pentium CPU @ 2.2GHz, 2nd generation Intel HD graphics card, and 4GB of RAM available). If I don't notice a significant amount of lag, I don't see many computers out there getting lag either, except for maybe a few weird setups. I consider my computer obsolete and wouldn't be incredibly upset if the next version of Minecraft was incompatible with my machine. If a computer gets extreme lag from tile entities because their computer is weaker than mine, then I would think that they should upgrade instead of complaining.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com
When it comes to tile entities, I usually try to avoid them (since just 70 could cause massive lag) (and also considering the computer is very low-end). Lag is a real issue with me unless I turn my settings all the way down (and that isn't great, either), and making slabs tile entities would be horrible to me, considering I use them quite often.
I don't even play Minecraft much anymore yet here I am on the Minecraft forums for some reason...
Just how low-end are we talking about? Mine is low-end (as you can see from my post above), and can easily handle 1,000s of tile entities without reducing overall framerate (my average fps is nothing to brag about, though, averaging 15-30 fps depending on the version I'm running). In fact, I often play adventure maps with large numbers of command blocks (more than 100 is common). If being a tile entity automatically causes lag, then my framerate should be crippled just by the existence of empty command blocks, let alone huge groups of them running commands. Yet, my framerate only suffers slightly, and I believe it's more to do with the commands that are constantly running than the existence of the command blocks.
Want to see my suggestions? Here they are!
I am also known as GameWyrm or GameWyrm97. You can also find me at snapshotmc.com