FPS problems in single player? Try FastRender!
minecraftforum.net/viewtopic.php?f=25&t=1...Posted Jan 3, 2011, 3:26 AM UTC
Posted Jan 3, 2011, 3:26 AM UTC
Nice picture choice for this post...
Lets hope Markus sees this and considers implementing it into the actual game.
I honestly expect there will be a lot of under-the-hood work to be done in the upcoming months.
Mojang has a lot of plans for Minecraft, and they've already confirmed a bunch of new stuff to be added. Every new feature is going tax performance that much more, and without a lot of optimization the game will become a lag fest.
So "this" might not even need to be implemented, he's probably just going to update\optimize his rendering engine
I worry that the push for buggy features upon an already buggy foundation will be a large detractor to new players, and a constant bane to long-time minecraftians.
I might get downcrafted for saying it but this mod (amongst others) shows just how weak a developer Notch can be sometimes, specifically his powers of debugging and optimization. There are a million ways to skin a cat programmatically, but only few work efficiently. Technically speaking, all the author of this mod had to do was rearrange how the nearest chunks were gathered to get a massive performance gain. I can only assume Notch isn't doing basic things like stepping through (and into) the code at runtime and charting what parts of the code are taking the longest to complete, which is one of the first things you'd do when hunting down low performance. And don't get me started on memory usage - just because one writes in Java doesn't mean one gets to be lazy, in fact quite the opposite! shakes coding fist
On the other hand, it's a trivial change.
That ArrayList could have been used for foliage degradation at some point, there is no real way to know. Notch might have stopped using the reasons for the sorting 1 update ago.
What the author of this mod did is just some end of project optimisation. It doesn't make Notch into a bad coder.
That being said, Notch might not be the Coding God some people want him to be either.
I guess you could consider this end of project optimization, there's no way to tell if Notch is even considering these things right now this early, though one would hope it exists somewhere on his list of priorities. The problem with coding for fun is that you do the fun things first and the tedious things last, but when he turned this into a business that mentality should have shifted, don't you think?
Notch is certainly not a bad coder; he's certainly more capable than I am in many ways, but you can't ignore the issues he's had with debugging thus far (the Beta patch for instance, in which anybody with 30 seconds in the game would have a starter list of what's bugged or broken), which was the microscope I was analyzing him under.
Of course, Alpha is Alpha and Beta is Beta and these things will happen - I just look at this as a projection of things to come, and with his team's eagerness to pile on new features on top of a wobbling foundation, he's got his work cut out for him in spades.
TYL: Lag is low-fps. Using it in this sense becomes VERY annoying when trying to help people remedy their problems with games. It's lagging, blah blah blah, only to later find out it isn't a network issue, he just needs to update his drivers for his video card. Except you spent 2 hours dicking around with him about network stuff, because HE learned somewhere that this is also what lag is, low-fps. It isn't.
Sorry, didn't mean to offend you.
In a game that isn't going over a network connection, I use lag to express a drop in frame rate. I usually type 'fps lag', but in the post above I must have figured since this was in a singleplayer topic, the meaning would have been deduced.
Yeah, its just I end up trying to help fix problems like this and have to do so much more work because someone doesn't know what words they're using. I mean I suppose technically frame lag would be ok to say, I'd find that acceptable, but lag is generally accepted as a networking term, so having been dealing with that for 15+- years of my life, that's all it can mean when used solo.
What he describe as the "fix" makes you wrong.
Sorting an array of 3000-5000 members every frames when you can only scan the array and pick the chunks you need doesn't seem like an idea for expensibility.
It has nothing to do with the rendering engine. Even worse, even the best rendering engine would sputter if arrays are sorted for nothing every frames.
This fix is for single player.
In multi player, there is no such chunk list.
What does this tell you : That the server has that chunk list and would beneficiate from the same mod (very unlikely), or that, when Markus makes the game into a Multiplayer only affair that can be played locally, this fix will be totally useless, as it would be bypassed anyway in a client/server situation.
I vote for the later, and maybe *gasp* Notch knows it?
I feel like I'm the only one this isn't working for. I actually took a ~15 fps hit when trying it. Can you think of any reason this might happen? I would Really like to improve this game's performance a bit.
I think I might have fixed the problem.
Can you try this version and tell me if you're still seeing a performance hit? http://mod.ifies.com/f/110103_fastrender_v4.zip
Ohhh OK, that definitely did something. I'd say at least 10 fps over baseline. Thanks! Keep up the good work!
Happened to me also. I'm stumped.
I think I might have fixed the problem.
Can you try this version and tell me if you're still seeing a performance hit? http://mod.ifies.com/f/110103_fastrender_v4.zip
Hey thank you, I'm getting a better frame rate now.
[deleted]
Instructions:
- Locate your minecraft.jar file. On Windows, it's in %APPDIR%/.minecraft/bin
- Create a backup of minecraft.jar
- Open minecraft.jar in an archive editor (WinRar/7-Zip/etc)
4) Delete the META-INF folder.
- Copy the files from the downloaded zip file into the jar file (overwriting f.class and bz.class).
- Run Minecraft and test!
I had that problem initially, I just deleted everything from my /bin folder, had the client re-download the files, and re-applied the patch.
Voila, silky-smooth framerates on my Atom netbook. (With low draw distance and "fast graphics" of course).
I'm assuming it was originally in conflict with something I tried to do previously.
Jeez. The mod API needs to get released, now! Not that you can actually do this kind of modding with an API that notch adds, though.
How does this work? Any one or two pieces of code you think made the best overall performance increase?
Notch needs to add this.
There's a description of how it works in the first post.
Oh hahaha, i skipped that part. :\
[deleted]
Not that you can actually do this kind of modding with an API that notch adds, though.
Did you even read?
Sorry.
:P
I tried this. Worked. I'm happy.
Thanks! Can't wait to try this on a netbook.
There was an improvement but still pretty unplayable on mine, but mine is low-powered (I went for super cheap! :P)
That's how my netbook is, too, so I don't have much hope, but I'm still interested to see if this make it playable enough to load synced worlds, tweak building, show someone a screenshot, etc, even if it won't be super playable per se.
I'm playing with the cheap graphics and low draw distance on my netbook with this patch. It was unplayable before, and now it's super smooth as long as there aren't a bunch of mobs next to me.
Awesome, I can actually play on my laptop now.
Nice, this mod made minecraft a little more playable for me! I miss the early alpha days when I could use the max visual settings without any lag. But with this mod I can at least play with minimal settings.
It worked for me, which is nice, but suddenly I'm seeing this. Maybe because of an error with BetterLight?
This is incompatible with BetterLight/BetterGrass/probably anything else that modifies f.class or bz.class.
[deleted]
[deleted]
There are instructions in the first post. Is there a step that's confusing you?
[deleted]
Massive upvote for better gameplay through reverse engineering.
Sweet! The game is now playable with the Normal render distance on this laptop. :D
I went from tiny/small with fast graphics to far with fancy, and I can now play with 3D! W00T!!!1!1one!!
This seems to make the "Building Terrain" progressbar (at startup) scroll by at least 2-3x faster as well!
Can you explain why this wouldn't work while playing SMP? I'm curious.
Also, can I still play multiplayer with this installed even If I don't get the benefits?
In multiplayer, chunk rendering is updated as soon as a chunk is received.
You can play multiplayer with this without any problems.
I may have the worlds shittiest computer. It made it worse for me. I don't understand.
I know v4 helped, but I'm curious, what video card are you running? I'm trying to think what could possible affect just us in this whole thread.
I don't think it should be called a video card.
It's a Mobile Intel 4 Series Express Chipset Family. Some stupid media accelerator on my laptop.
Oh OK. Mine in this laptop is an old Nvidia 7800 GTX.
he fixed the problem you may be experiencing.
I tried this and it really helped, with some small oddities. If I hare about the place, candles don't have flame animations for a few moments when I arrive, and my 5-clock cycle didn't start up until I'd been looking at it and scratching my head for about 30 seconds. Probably related to the chunk updates.
Also it hasn't helped the outrageous lag caused by the 5-clock itself.
On further investigation, the delay before the clock starts up seems to be a side-effect of switching back and forth between the modded and unmodded versions, and not an issue with the mod itself.
So, what is going on in this and can you come up with a reason to implement it like it is in minecraft vanilla?
Amazing! I wish this would work with BetterLight :(
Same here friend, same here. :(
You just have to apply one of the mods manually. FastRender should be far, far simpler to apply manually.
Unless the source is available, no; both mods touch the same piece of code.
One of Java's great (more like only, amirite) redeeming features is its ability to be decompiled with great accuracy. Enough so that one could easily decompile the classes that FastRender changes, diff it against a decompiled original class, then compare it with BetterLight/BetterGrasses modified classes after decompilation, diffed against the originals, and combine them easily. I've used this decompiler in the past (when I was into Try2hack) with great results.
Now that I think about it, I have nothing better to do today, so I might give it a shot. I'll just need to get BetterLight working on OS X, though. Still seems to corrupt the files it patches. Blarg. I can probably just have a Windows user patch up and send me the changed classes.
And FastRender seriously messes with how Minecraft renders stuff, unless they co-operated, these Mods will be incompatible no matter what they change.