[FIXED] Smooth Graphics Algorithm?

I have a question:
What is the best way to do this: (smooth transitions, yellow is sand, blue is water, and white is “grass”)

Hard edges: Smooth edges:

currently, my plan is using this code(not finished): http://pastebin.java-gaming.org/2224c272c5b
S_NW / W_NW == SAND_NORTHWEST / WATER_NORTHWEST

But is this the fastest way? (probably not :P)

Screencap:

Would mipmapping with trilinear/anisotropic work here? Also how do you get the Memory Allocated?

This is a great article: http://www.gamedev.net/page/resources/_/technical/game-programming/tilemap-based-game-techniques-handling-terrai-r934

You could also use texture splatting but it’s pretty inconvenient for tile based games.

Something like this:

memUse = (int) (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1024 / 1024;
bufferGraphics.drawString(String.format("Memory Usage: %sMB/%sMB", memUse, World.run.maxMemory() / 1024 / 1024), debugX + 1, debugY + 61);

It might not be completly accurate, but it works.

Wang tiles are your friend.

EDIT: Just to be clear, i already had the tiles. I only needed the code :point:

ME FIX :smiley:

Code: http://pastebin.java-gaming.org/24c7c4b2954