How can I stop Minecraft from crashing/lagging?

I recently purchased this game and am very impressed, but am about to put playing it on hold until it is officially released and more bugs are fixed.

I can't play the game for more than 5 minutes without the framerate going from smooth as can be to randomly dropping to unplayable levels. I have gotten a black screen more than 30 times so far. Sometimes when I save and load my character appears inside a block and soon after dies.

Is there anything I can do to improve the experience until these problems are fixed? I hope so as I love this game apart from the bugs! I cannot be the only person out of the millions of people who have this game who want to play it but cannot due to lag and crashes.

my specs are

Windows 7 64-bit
4 GB RAM
Intel Core 2 Duo 2.53 GHz
NVIDIA Quadro NVS 160M 256 MB

EDIT: I have tried setting the graphics down lower and the draw distance to shorter, and it helps a bit, but I still have lots of problems with lag and crashing.


Solution 1:

I have switched to playing Minecraft under Ubuntu, and most of the more annoying problems simply don't occur anyone. I can finally enjoy the game!

Solution 2:

as @Ullallulloo mentioned, draw distance is a HUGE factor. just toggling that from Far to something closer has had a huge effect on my system. for reference, i'm on a 2006 mac pro with a four 2.66 xeon cores, 6GB of RAM and a slightly long in the tooth geforce 8800.

i'm not sure how the game is working behind the scenes, but through my own exerimentation on this and slightly older systems, the draw distance seems to render anything that you could conceivably see, as long as it isn't occluded by some other object. for new worlds/other places where you're seeing terrain for the first time, drawing all this can really cause things to bog down. it might not even be something that you, the person playing, can see, as long as you, the avatar in the gameworld, has it in their field of vision, it gets rendered.

when i'm exploring new areas, having the FPS drop to see more of where to go is an acceptable tradeoff, i'll turn draw distance up. when i'm working in one area and not moving much, i'll turn it down, as i don't need to random dips as the game draws places i'm not interested in at the moment.

Solution 3:

The first thing I'd do would be to delete your current profile and rebuild it by logging into the game client.

You can delete your data by browsing to your %APPDATA% directory and deleting the '.minecraft' directory.

If you don't know you %APPDATA% directory, then click on Start, and type in 'cmd'. When the console appears, type in 'echo %APPDATA%'

Hope this helps. I've not had any problems like this with the 1.5 client.

"Also be aware THIS WILL DELETE YOUR WORLDS. Back them up first! – Shinrai" +1 for remembering that Shinrai

Solution 4:

As many of the other responders have said, changing the Render Distance to Normal and the Graphics to Fast can help the lags and crashes. It is also possible that incompatible mods are causing the crash.

As far as the spawning problem, try installing the mod Single Player Commands. With that, you can choose where to spawn by pressing t, then typing in setspawn and hit enter. Then whenever you die or go to "home", you will spawn at that set point.

PS: When you do the setspawn, place it in an open area so you don't get stuck. And If you have it in the sky, make sure that you acivate "fly".