could you make a tutorial on how to create a 2d shape from a gif? like if i were to create draw a circle or a blue print of where walls would be and then use this method to draw it for ?
when ever i upload the code and go "generate" and it crashes. I edited the numbers to make it different and it crashes. even when i did the demo it crashed.
I take back everything I ever said about your code's performance. :-)
I made some serious newb mistakes in my own code. I went through and reworked it a lot, then added support for trees (!), and it goes much *much* faster:
Creating map
Compiling script
Running script
Creating world from region BlockIsland
Processing tile at position (0,0)...
... finished in 5.08 seconds.
Processing tile at position (0,256)...
... finished in 5.021 seconds.
Processing tile at position (0,512)...
... finished in 5.014 seconds.
Processing tile at position (0,768)...
... finished in 5.034 seconds.
Processing tile at position (0,1024)...
... finished in 5.024 seconds.
Processing tile at position (0,1280)...
... finished in 5.043 seconds.
Processing tile at position (0,1536)...
... finished in 5.134 seconds.
Processing tile at position (0,1792)...
... finished in 3.905 seconds.
Processing tile at position (256,0)...
... finished in 5.076 seconds.
Processing tile at position (256,256)...
... finished in 5.059 seconds.
Processing tile at position (256,512)...
... finished in 5.073 seconds.
Processing tile at position (256,768)...
... finished in 5.087 seconds.
Processing tile at position (256,1024)...
... finished in 5.21 seconds.
Processing tile at position (256,1280)...
... finished in 5.378 seconds.
Processing tile at position (256,1536)...
... finished in 5.207 seconds.
Processing tile at position (256,1792)...
... finished in 3.953 seconds.
Processing tile at position (512,0)...
... finished in 5.102 seconds.
Processing tile at position (512,256)...
... finished in 5.329 seconds.
Processing tile at position (512,512)...
... finished in 5.394 seconds.
Processing tile at position (512,768)...
... finished in 6.44 seconds.
Processing tile at position (512,1024)...
... finished in 5.814 seconds.
Processing tile at position (512,1280)...
... finished in 6.085 seconds.
Processing tile at position (512,1536)...
... finished in 5.903 seconds.
Processing tile at position (512,1792)...
... finished in 3.997 seconds.
Processing tile at position (768,0)...
... finished in 5.136 seconds.
Processing tile at position (768,256)...
... finished in 7.449 seconds.
Processing tile at position (768,512)...
... finished in 5.729 seconds.
Processing tile at position (768,768)...
... finished in 5.477 seconds.
Processing tile at position (768,1024)...
... finished in 5.689 seconds.
Processing tile at position (768,1280)...
... finished in 5.951 seconds.
Processing tile at position (768,1536)...
... finished in 5.83 seconds.
Processing tile at position (768,1792)...
... finished in 4.02 seconds.
Processing tile at position (1024,0)...
... finished in 7.516 seconds.
Processing tile at position (1024,256)...
... finished in 5.204 seconds.
Processing tile at position (1024,512)...
... finished in 5.225 seconds.
Processing tile at position (1024,768)...
... finished in 5.181 seconds.
Processing tile at position (1024,1024)...
... finished in 5.404 seconds.
Processing tile at position (1024,1280)...
... finished in 6.055 seconds.
Processing tile at position (1024,1536)...
... finished in 7.076 seconds.
Processing tile at position (1024,1792)...
... finished in 4.052 seconds.
Processing tile at position (1280,0)...
... finished in 4.915 seconds.
Processing tile at position (1280,256)...
... finished in 4.899 seconds.
Processing tile at position (1280,512)...
... finished in 4.952 seconds.
Processing tile at position (1280,768)...
... finished in 4.927 seconds.
Processing tile at position (1280,1024)...
... finished in 7.33 seconds.
Processing tile at position (1280,1280)...
... finished in 5.145 seconds.
Processing tile at position (1280,1536)...
... finished in 4.949 seconds.
Processing tile at position (1280,1792)...
... finished in 3.826 seconds.
Maximum elevation: 11
Setting spawn values: 663, 75, 1318
Land cover statistics (3024800 total):
2334750 (77.19%): Water
205400 (6.79%): Developed/Open-Space
123924 (4.1%): Deciduous Forest
109600 (3.62%): Woody Wetlands
94275 (3.12%): Mixed Forest
70575 (2.33%): Barren Land
27975 (0.92%): Evergreen Forest
23851 (0.79%): Developed/Low-Intensity
21450 (0.71%): Emergent Herbaceous Wetlands
12850 (0.42%): Developed/High-Intensity
75 (0%): Shrub/Scrub
75 (0%): Cultivated Crops
Tree statistics (1775 total):
676 (38.08%): regular
614 (34.59%): redwood
425 (23.94%): cactus
Processing done -- took 255.465 seconds.
Calculating height data
Calculating light data
5%
10%
15%
20%
25%
30%
35%
40%
45%
50%
55%
60%
65%
70%
75%
80%
85%
90%
95%
Done in 127.246085s
Saving chunk data
Saving level.dat
Done
Great feature. It could be usefull to create a map based on 2d picture.
For example this image
could be an source to world 200x150 with two islands (and a rock created on the bigger island).
Anyone could create the script? I think, after that JCraft will be the greatest minecraft world creating tool )
My project TopoMC http://www.minecraftforum.net/viewtopic.php?f=1022&t=154841 does something like this, but it's a bit more sophisticated. It currently uses *three* images -- one for elevation, one for water depth, and one for land cover -- to determine what the terrain should be. Still haven't figured out how to make the underground bits work, though. :-)
Oh, and JCraft is good for scripting stuff like buildings, too. I imagine a minecart station could be scripted as well. BagelMann, do you have any support for including files? My scripts are getting unwieldly. :-)
My JavaScript skills have gotten too rusty, sadly :sad.gif:. What I'm curious how to do, is to create random, underground, cave/maze. I would also like to know how to randomly generate terrain (to fill in the gap at the top so it looks like Notch's) and ore placement :smile.gif:.
Wow! This is really cool! :biggrin.gif: I'm new to javascript, so this somewhat puts my skills into play. I just have no idea how I would randomly generate islands or anything :tongue.gif:. There's lots of possibilities... :tongue.gif:
Hey, my notch's head gets imported as mostly green wool. Any ideas as to why that is? I haven't changed the script much, just changed the image file name being imported to "Notch.gif".
And another question is: How do you convert an image to the appropriate palette for the image import?
Quick note: When using a large mapsize, the program dies. Here's my script:
var MapSize = 2048;
//fill bottom with bedrock
map.fillBlocks(0, MapSize, 0, 1, 0, MapSize, blockTypes.Bedrock);
//fill area x=0..MapSize, y=0..60, z=0..MapSize with smooth stone
map.fillBlocks(0, MapSize, 1, 59, 0, MapSize, blockTypes.Stone);
//fill top 3 layers with sand
map.fillBlocks(0, MapSize, 60, 3, 0, MapSize, blockTypes.Grass);
Not sure how your program/javascript are working in tandem here, but I'm getting an OutOfMemoryException. Care to release the source code?
Anyway could you have the program handle higher values, or even release a 64 bit version?
Jay
I made some serious newb mistakes in my own code. I went through and reworked it a lot, then added support for trees (!), and it goes much *much* faster:
Thanks so much for making something so epic.
Jack.
Great feature. It could be usefull to create a map based on 2d picture.
For example this image
could be an source to world 200x150 with two islands (and a rock created on the bigger island).
Anyone could create the script? I think, after that JCraft will be the greatest minecraft world creating tool )
My plugins: Camera Obscura | WeatherMan | MonsterFix | RoadProtector | Dogtags | FakePlayersOnline | DropXP | NoobProtector | SkyFall | OkGlass | RegionFill | Schematic Loader |☺Smiley☺
My favorite: ReActions — Simplest scripting engine
Newest: PlayEffect — Create beautiful visual and sound effect!
My project TopoMC http://www.minecraftforum.net/viewtopic.php?f=1022&t=154841 does something like this, but it's a bit more sophisticated. It currently uses *three* images -- one for elevation, one for water depth, and one for land cover -- to determine what the terrain should be. Still haven't figured out how to make the underground bits work, though. :-)
Oh, and JCraft is good for scripting stuff like buildings, too. I imagine a minecart station could be scripted as well. BagelMann, do you have any support for including files? My scripts are getting unwieldly. :-)
Jack.
Thanks for any assistance! :biggrin.gif:
Signaturecraft is back!@SigCraft
And another question is: How do you convert an image to the appropriate palette for the image import?
Not sure how your program/javascript are working in tandem here, but I'm getting an OutOfMemoryException. Care to release the source code?
Anyway could you have the program handle higher values, or even release a 64 bit version?