Minecraft Classic terrain generation in roblox

A few weeks ago, I came across an old .rblx file of a Minecraft terrain generator I made over a year ago. I started working on it after I found this page on GitHub and abandoned it after getting to the water and lava part. Well, I decided to start over on it and try to make the code a lot cleaner, and after about 2 days I got the basic generation done. After spending the next 3 days fixing some bugs and adding support for textures, I found a tool to decompile and deobfuscate the Minecraft classic 0.30c jar file and started comparing my code to its code. I ended up porting Minecraft Perlin noise class to Lua, and after that, I found a node.js module called java-random, which is an implementation of java.util.Random, and I ported it too. After another 5 days of debugging and making sure my code worked the same way as Minecrafts code, I got this result:

(sorry for the low framerate, I don’t have a very good computer)

Compared to Minecraft:

In order to get the same world generated each time, I had to mod the game to use a default seed of 1. Since it uses a working implementation of the java.util.Random class, it can generate identical worlds.
It can generate worlds of any size, but I have it set to use the only sizes you can choose from Minecraft:
Small (128x128)
Normal (256x256)
Huge (512x512)
I would upload screenshots of these but the hard drive partition I saved them to get corrupted.
Currently, the only issue I’m facing is how low the fps get while rending all the blocks. I think this is happening because of how many SurfaceGuis are being rendered.

You can test it out here:

36 Likes

It’s awesome! The result looks similar.
In some ways, I got nostalgia…

5 Likes

You should totally re-create Minecraft in Roblox. Just make the generation bigger, add block placement, destroying, first person, mobs, and you got yourself Minecraft!

2 Likes

That is actually what I’m planning on doing since I have decompiled/deobfuscated source code of Minecraft c0.30_01c

3 Likes

I have added in a loading screen, and the fps/chunk updates counter, but I will probably need to disable textures because SurfaceGuis seems to make it way laggier than just using decals.

2 Likes

What if you used SurfaceApperence? I’m not sure if they support multi face textures or not though.

2 Likes

image
The best alternative would be a Texture, but it would need to have a property like ImageLabel.ResampleMode, or else you get something like this:
image
While I need something like this:
image

3 Likes

Ah I see. My bad! Well you could export a cube from blender and use that but like I said before I’m not sure if they even support multi face textures.

1 Like

It doesn’t, it also doesn’t support U, V offsets, or transparency.
image
It also appears to use linear interpolation for scaling.

5 Likes

Do you still have the scripts? I was looking for a script like this, All didn’t work

2 Likes

This Is the best thing I have seen on the devforum so far!

2 Likes

i do, but it relies and a bunch of other modules i made. i can send you the place file, but it will be missing textures

2 Likes

can u send me the place file pls? i dont mind about the textures

1 Like

c0.30_01c.rbxl (79.0 KB)
sorry for the late reply, here you go

1 Like

hey, thanks! and sorry i didn’t notice your reply, i didn’t get a notification : P

1 Like

I know this is a bit of a late reply, but you could simply resize the texture to 1028x1028 and it would look better.

2 Likes

would be more laggy then it already is

btw to resolve the lag issue you could raycast from each side of the blocks when a block is broken or placed, and if the side is covered by a block then don’t render it. similar to what Minecraft does already

no no, i mean you could then use decals instead of surfaceguis.

yeah i know, would still be laggy with 1024 pixels on every side for like 1000 textures

it would be the same since roblox stretches all textures to 1024x1024 meaning it would perform the same as the bad looking decal but less stretched