Monday, October 4, 2010

Overworld Progress

Sorry that updates have been slow this past week. I'm going to keep this one short and sweet. Here is the overworld progress so far. Note that the big blank green areas are actually filled with saplings that have not yet bloomed.

As far as the overworld goes there are a few problems left to solve. The major one is inconsistencies in elevation that occur in the map itself. I've shied away from doing the mountain regions yet because the elevations that are created by the blue stairs are not consistent throughout the map. I plan on tackling this issue this week and mapping the mountainous regions of the overworld by taking some liberties with the map design itself. Also look forward to redstone water switches for dungeon doors. The other issue in the overworld is going to be dungeon "depths" that I've started to encounter. For example dungeon 02 is on an elevated surface in the game world, but I'm going to have to map it deeper than the first dungeon. I think the later dungeons are just going to have deeper and deeper stairways to go deeper into the map to avoid dungeon overlapping. Hope this holds you over and expect more updates later this week!

Monday, September 27, 2010

Dungeon 01 - Part 2

Meant to post this yesterday but got distracted trying to conquer the world in Civ V. I got another good chunk of overworld work done this weekend. A good friend of mine let me borrow a spare monitor he had lying around so I was able to have my reference overworld map open on one monitor while I did the modeling in another. This greatly increased my productivity and I was able to slam out some zones with ease.
Zooming out makes things a bit funky looking but all these zones are done.
You can't tell from the screenshot, but all the trees are planted in the tiles that need them. You can see that the dungeon one entrance has been completed. I decided to take a little break from working on the overworld to get started on the first dungeon.
A little crooked bust mostly complete.
I decided to make the dungeon in the sky and then cut/paste it underground. This was a lot easier than trying to model the whole thing underground. Creating the dungeon was very simple; I created an empty room to start and then copy/pasted it to form the dungeon. I left the ceiling off while I did the various blocks and such and then copy/pasted the floor and nudged it up to create the ceiling.

I wanted to work on a key system this weekend but I need a little more work with redstone circuits. The idea is going to be to give the player gold bars in place of keys and then have a water/wood switch system to activate the dungeon doors. Another issue that came up is the size of the dungeons themselves. The zelda world does not obey the laws of physics; the dungeons would end up overlapping eachother if they were actually undergound. I plan to remedy this by making the dungeons progressively deeper into the ground. I'm going to continue to work on the overworld this week and try and get a key system in place before the weekend.

Friday, September 24, 2010

Creating a new zone

In this post I want to go over the method I use to create a new zone on the map. I'm going to be doing a fairly complex mountain segment, but fortunately MCEdit can do some of the heavy lifting for us. The first step is to isolate the zone that we want to create. Each "zone" is 16 blocks wide and 10 blocks high. In my world each block is represented by a 2x2 game block. This means that each new zone will be 32 blocks wide and 20 blocks high. The first step is to select the 16x10 area on the overworld map that we want to re-create.
First step is to choose a zone to map.
As you can see I partitioned the world into nice manageable chunks by using the grid tool and selecting certain zones to recreate one at a time. The next step is going to be to set up a new section in MCEdit that I can work from, and to set up the 32x20 ground area.
Where the new section will be going.
Select one of the zones corners.
Use the nudge tool to create the 32x20 zone and then fill with sand.
The next step is going to be to create the rock formations that are in the original overworld.
The end goal.
There's no real magic here. Simply transform each 1x1 block into a new 2x2 block and then raise it 8 blocks. Let's start at the left hand side.
The first block.
Fill one column with air to create the staggered look.
Now it's time to let MCEdit make the job a little easier. We can select the formation we just created and use the clone tool and then flip the block to mirror it. This creates the first two blocks in the overworld, and we can see the same structure in other parts of the zone. After we clone and mirror this block we will select the new structure and clone it a few more times.
Flip the block to create the second section of the map.

Cloned a few more times.
The next step is going to be to create the rest of this half of the zone and then clone and flip to complete the zone.

This half is done, select it all and clone/flip.
Almost there just add the final wall.
Another one bites the dust.
Hope this post gave some insight on the basic methods I use to create the zones. I feel I'm getting pretty comfortable with MCEdit so knocking out the rest of the overworld is mostly just going to take time. There are a few more issues that I'm going to have to deal with down the road like dealing with world elevations, but  I'll cross that bridge when I come to it.

The Reddit Effect

I think the image above speaks for itself. Thanks for all of the interest you've shown in this project! This is a real big motivator for me to make sure I keep making steady progress on the the conversion as well as this blog documenting the progress. I plan on doing a lot of overworld work this weekend and possibly move into the first dungeon by Sunday. I have some interesting ideas on how I'm going to do dungeon keys and want to get some tests done this weekend to see if it is viable. I also plan on making a post either tonight or tomorrow describing the methods I use to replicate the overworld in MCEdit. Again, thanks for the support!

Thursday, September 23, 2010

Welcome to the Jungle

So now that I've got the basics of the editor under my belt I decided it was time to try and solve one of the first design problems of the mapping. A lot of the overworld is covered in trees; therefore I had to find a way to recreate these levels in the game. The first attempt was in creating my own trees using the tree trunk and leaf blocks. This approach had two problems. The first being the tree looking very "artificial". I created a 2x2 tree trunk and manually added leaves. The following is the result and looks very um... un-tree like.
This um... just won't do.
Not only is the tree ugly as sin, but after loading it up in game the leaves start falling off into saplings. As you are most likely aware, if you chop down a tree in game the leaves will eventually start to fall off and disappear. Apparently there is some sort of attachment relationship that happens when a tree goes naturally in the game vs making one manually. So with this idea quickly scrapped it's up to the next best thing. We will create a tree farm and let them grow naturally. Easy enough let's create the pattern in the zone beside the spawn and see what occurs.
This should look familiar
After letting the game run for a nice 8 hours while I go to work I come home to the following.
Success!
Welcome to the Jungle
I would say this is mostly a success. However, there are still a few minor issues that need to be worked out. For one, it seems like it is difficult to grow saplings directly next to each other and have them grow into trees. I never got a solid 4x4 block tree. The largest one I managed to get was a 2x1 tree. The first problem is that growing the trees this way I can't exactly replicate the overworld map. However, I think that this should work out fine in the end. The 4x4 block trees look a little bulky and I like the look of the 1x1 block growing into a tree much more. The other problem is the fact that the southern border of the map has an area that is blocked off by trees, and these do not create a solid wall to contain the player in. This can be remedied by manually adding in tree trunk blocks to fill in the gaps and create a proper wall. Another minor issue is sometimes the leaves would be a bit aggressive and actually block your path; this can be fixed with some simple pruning. Overall I'm happy with the results and it's time to keep chugging along on the overworld.
Things are looking good so far!

Tuesday, September 21, 2010

It's dangerous to go alone!

So after the first disaster  of my collapsing world I fired up MCEdit with the foolproof plan of building a world on solid ground. I start off by filling a large area of blocks with stone. 4.4 million blocks later and I have a pretty good area to start working with. The first task is to partition a 32x20 patch of ground to represent the very first area I'm going to reproduce. In the overworld map the ground looks like sand throughout the whole map, but I figured I would go with grass for the green areas of the overworld map and sand in the desert and mountain regions. After we have our partition out it's time to build some walls. For now the walls are going to be completely vertical but after things are all said and done I'm considering tapering the walls to give a better overall style. After a couple of strategically paced rectangles we have something similar to the spawning zone.
Spawning Zone
The Original

Now that we have the main layout for the starting zone done it's time to implement the first cave. This is where another tool comes in handy when editing maps; MineEdit. MineEdit will allow me to edit the inventory of my character so I can have diamond tools and materials that can be used to shape my landscape in game rather than doing everything through the editor. After I've made a change in game I simple save and exit in Minecraft and then reload the map in MCEdit. I found this useful for making the entrance to the save since it helped to see how the entrance and stairs down would jive rather than making it in the editor and hoping for the best. After hollowing out the entrance I jumped back in the editor and added the empty space for the cave and then saved and loaded in Minecraft to add a chest with a very special item inside.

After a little more tinkering I'm able to get the second section of the game world complete. I ran into a couple of issues here. I tried to make the green blocks out of cactus at first but I guess 2x2 cactus blocks are unstable because they would explode after a couple of seconds (hence all the cactus in my inventory). Also in the original design I had the rocks set up as the "dirt" block but it looked pretty fugly for the grass area so I changed it to mossy cobblestone using the replace tool in MCEdit.
Things are looking good so far.

Collapse

I fire up MCEdit and am greeted with a pretty self explanatory menu. It has options for opening either world 1-5 of my Alpha worlds, creating a new world, or opening a world in another directory. It also has a brief overview of the keyboard shorcuts that are necessary for performing the basic functions of the editor. I slap N with vigor to fire up a new world and am greeted with a nice giant layer of bedrock, cool. I start randomly trying to move around the game world and start trying to use the various cryptic options on the bottom of the screen. Seriously look at the following screenshot and try to figure out what any of the options actually do.

What the? I don't even.
After a bit of tinkering and frantically clicking around trying to figure out what anything does I decide it's time to go back to the Minecraft forum and decrypt all those options at the bottom of the screen. The most useful option would be the selection tool. This allows you to select areas of blocks to work with and perform various operations with them. For example you can select a structure, clone it, manipulate it, and move it to another location. I said in my previous post that I was worried that MCEdit would not end up being useful since it could only manipulate entities in the game world and not create new ones. Fortunately this means you can modify air blocks and fill them with the block of your choosing. This allows you to create any rectangular structure of pretty much any size. I'm starting to see that MCEdit is going to be able to handle all of my needs for creating my overworld so I get started on my first attempt at creating a flat ground slate to work from.

Using the Legend of Zelda map as a reference I see that the ground looks pretty similar to sand in Minecraft. Easy enough; I'll simply create a large slate of sand at around ground level to work from. I create a block of sand about 200 units wide, 100 units long, and 4 layers deep. I start working on some overworld features to get a hang of MCEdit a little more and after a while I started to get the hang of things. The most useful tool is probably the Nudge tool since it allows you to manually move the selection blocks around the game world instead of trying to position them correctly with your mouse. Mouse selection is somewhat wonky and the ability to move the selection areas manually is an invaluable tool. After I have a little bit of the game world mapped out I fire up Minecraft and am eager to see how my new creation looks in game.

Hmmm... my client seems to be running incredibly slow. I'm getting around 1-5fps when I'm usually at a steady 100. I'm thinking that maybe some flaw in my design has caused the game to suffer a severe performance hit or maybe the map editor is a memory hog and it's causing a slowdown. I quickly shut down Minecraft and close the editor and my other open programs and try again. Still seeing the same performance issues, but I decide to let the game run. Maybe it's doing some world generation or performing some operations on my new world chunks I've created. Soon I realize what has happened. I see the ground collapsing right before my very eyes. I forget a pretty simple concept in Minecraft; sand falls if there is only air beneath it. My new giant sand slate had started to completely collapse as soon as the world loaded. I load the map into MCEdit and see that all I had created was gone. Lesson learned; build on stone.

A Bad Omen

So I've decided to use a map editor to make the building process less painful. Sounds great, but actually finding a tool that is halfway useful was more of a challenge than I was expecting. In my brief time with Minecraft I had heard of a map editor was called Omen. A quick trip to worldofminecraft.com and Omen was downloaded and ready to be tinkered with. The first task was to create a new world that I could work from. Luckily for me Omen has an option to generate a flat world with a bottom layer of stone, a ground layer, and then a layer of air above this. Perfect, I can create my flat land and start building! After creating the world and playing around in Omen I'm shocked to find that I can only edit in two dimensions. To create any sort of three dimensional structure you have to edit it in two dimensional cross sections. This fact alone started having me doubt if this project would even be feasible. I powered through however and made a simple hut. Time to test out my creation in the client.

This is where I hit my first real brick wall. There are two different level formats in Minecraft. There is a .mclevel file format which from what I understand was used in the old Indev version of Minecraft. The other format that is used in the Alpha version has a different folder for each world and saves the data in a .dat file. I won't go into too much detail in the differences between this formats (mostly because I don't know much) but more information on the Alpha level format can be found here Alpha Level Format. What really matters is that I am able to save a level and then be able to load it up in the Alpha client of the game. When I go to save my first world in Omen I am presented with the option to save in either the .mclevel or .dat format. I choose .dat; happily save and then go to load up the map in my Minecraft server. Only one problem; the file doesn't exist.

I save again just to make sure that I did it correctly the first time and it's still a no-go. A quick googling of the problem yields some promising results. The Omen editor requires the Minecraft server jar file to be able to create .dat format maps. Simply download the alpha server .jar and place it in the same directory as Omen and you're good to go. So I go ahead and throw the server .jar into my Omen folder and restart Omen to try and save again. Still nothing. At this point I get mildly frustrated before deciding to google some more and see if anyone has any other answers to this problem. No luck; the only forum replies are people saying that placing them in the same directory let's them save .dat files. After another day spent at work trying to get Omen to save .dat files and trying to fix this problem I have no luck and finally have to give up on trying to use Omen for my editing. Luckily after a little more looking I was able to find a program called MCEdit. After looking at a few screenshots it looked like a very promising alternative. 3D editing was already a major improvement over Omen, but there was one problem. From the forum description it said that the editor could only copy/paste blocks and it couldn't create new entities. I figured it was at least worth trying out so I downloaded it and fired it up.

Dungeon 01

There were two ways I could have gone about creating the world; either in survival mode or using a map editor. When I started work on the first dungeon in survival mode it took me much longer than I had originally anticipated. The amount of time it takes to farm all the dirt, wood, sand and cobblestone probably amounted to over half the time it took to construct the entrance to the dungeon as well as the first room. Not to mention that to obtain the stone you need to invest a significant amount of time forging and gathering coal to run the furnaces. Other problems such as trying to build under sea level and dealing with floods was a major pain to work around. The end result turned out pretty well but could have been done in a quarter of the time using an editor.
Dungeon 1 In Survival Mode

As I was working on the first dungeon I had the idea of recreating the entire world, and trying to accomplish this in survival mode would simply take way too much time. Clearing out mountains and creating a flat surface itself would be quite an accomplishment. The overworld is 128x256 "blocks" in the original game. For my build I increased each block to be about double in size to feel a little less claustrophobic. This would mean the overworld map would end up weighing in at 256x512 blocks. Clearing out this area and creating a flat surface to work from before I could even start creating the game world was unappealing; not to mention the amount of time it would take to farm all of the materials that would be required to build all the landscapes and dungeons. Therefore I decided that it would be much less painful to find a decent map editor and let it do the heavy lifting for me. Finding the tools required to do the job was a pretty frustrating experience in itself, but eventually I was able to find the applications I needed to get the job done. A quick overview of the tools I am using will be covered in the next post.

Inspiration

The purpose of this blog is to document the progress of a Minecraft mod I am creating. The mod aims to recreate the original Legend of Zelda from NES in the Minecraft world. In the end the goal is to have a replica of the overworld, the dungeons, and a texture pack to recreate the original games graphics. This project was inspired by a post on /r/minecraft that aimed to recreate the first dungeon in the game. I started working on the first dungeon in my own in game before I decided that I could take it one step further and attempt to re-create the entire Legend of Zelda world. The first step involves me recreating the entrance to the first dungeon in survival mode and deciding how I wanted to go about working on the overall project.