Sunday, July 8, 2012

Timesink part 12: Something H found

After writing some basic text introducing the player to H and their notes, and ending by saying that H was going through the gates, I needed to find someplace interesting for H to set up shop.

This is complicated slightly because the server is "live" in that there are players on it. They have figured out how to use the gates in a simple fashion and go on trips, which meant anyplace I found had to be somewhat isolated. I chose a location that is a few gate trips away from the spawn gate in the thought that the further away, the less chance of being visited. I also scouted the area looking for evidence that people had been visiting. It was a nice area: hilly, but with lots of water, which meant the architectural style is patterned after the Maya, but it also has sort of stilt houses built on water. I found a temple not too far from the gate with a house, which meant H could have a home near what he found in the temple.

 So, what did H find? A sort of map room showing a global view of where cities are in the world. The interior of the temple was hollow, which gave me lots of floor space, so I started by making a series of concentric circles. From the top of the temple I took a screenshot and overlaid it with a spiral plot of city locations (discussed inpost 10).
Concentric circles with the city-spiral map overlay
It is hard to tell in the above image, but the actual city locations are small blue circles. In each of these locations I placed a redstone lamp and started wiring each spiral arm up. The end result, as seen from the top, is pretty darned good.

Map as seen from above.
The map isn't really meant to be seen from straight above, though. It's meant to be viewed from a special area where the player steps on pressure plates. Each plate lights up a different spiral arm and plays a different musical note. Hopefully the players will start to figure out the musical connection to the gate addresses. If not, H will lay it all out in one of his notes.

Since the map is really meant to be seen in action, how about a video? 


Maybe more notes from H next time.


Wednesday, July 4, 2012

Timesink: Redstone interlude

I've been working on an abandoned building that H finds which has a map of the cities on the floor in the form of redstone lamps.

Since I'm still working on it, I'll share this:



More soon.

Tuesday, June 5, 2012

Timesink part 11: "H"

When I started planning all this, I knew I wanted there to be a series of notes left for the player. There's a delightful bukkit plugin called Courier which let's one use maps as notes. It's really very neat. It might be outdated when writable books are introduced in the next Minecraft release, but the maps are great for now.

The notes are left by a character the player never sees, and the notes are only signed "H". "H" is someone that awoke in the strange world of minecraft, and started keeping a journal. It is meant to act as both story facilitator and tutorial. God, Minecraft needs some sort of tutorial. Hey Mojang: I have an idea on how to provide a tutorial that seasoned played would approve of. Drop me a line, huh?

The more astute reader that happens to play Minecraft might be able to guess who "H" is, in the end. But let's not drop that spoiler just yet. Suffice it to say that things don't go well for "H", and they don't make it home again. They're trapped forever. (For those that have figured it out: wouldn't a tutorial as told by H be a great tie in?)

Ok. Here are some drafts of the notes written by "H". Maybe too many? The idea will be to place them in various places "H" will have stayed. So, once the player is on the trail of "H", they can follow and find more notes. In time, these notes should help the player learn how to correctly operate the gate network, build their own gates from scratch, and eventually explain what happened to these cities and, what became of "H".


If you are reading this note, you have somehow found your way to this...place. I have been here for a few days and still don't know where I am or even how I arrived here. I went to bed and when I awoke, I was standing in the center of a stone ring. Perhaps the same happened to you.
Luckily I was able to find this nearby village. In the time I have been here the locals have not uttered a single word. I wonder if they can talk.... I have tried to get information about this place using gestures, but they either don't understand, or don't care.
Or maybe they they know the answers themselves.
-H
===================
I've come to the conclusion that the natives did not construct the stone circles. I don't think they built this large building--I think of it as "the storehouse" because it has so many chests--either. The architecture is too different from the other buildings here. The same goes for the market square with the colourful stalls and small fountain. But if they didn't build the stone rings and the other, obviously different structures, who did? It's almost like this place was built as a place to trade with the natives. But where are the builders, and can they help me get home. 
I'm settling into my bedroom, and least I am comfortable.
-H
===================
What is this horrible place! When I arrived, there was a new moon in the sky. Over the past several days I have noticed the villages become extremely agitated at night, rushing into their homes and refusing to emerge until the morning. I have heard some things in the night, but didn't think anything of them. 
But tonight is the new moon and the might is full of horrors! There are things that can not be in the dark. Half rotten beings assault the doors in the village. I saw one zombie succeed in entering a home and the inhabitance.... Skeletons--SKELETONS--walk the streets, firing arrows at anyone unwise enough to go out. Green...things silently lurk in the dark and giant spiders roam the landscape. 
Through the town giant iron men patrol the streets, battling the night creatures. These robots, these golems of iron attack everything up the green creatures. 
I have fled the comforts and warmth of the guest rooms and moved into this dank cellar. 
Tomorrow I will do what I can to hide this place. And I must have weapons.
-H
=================
The new moon has passed and the diversity of creatures in the night is decreasing. Maybe with the full moon the creatures will be gone. 
I have fashioned a simple pickaxe and have begun looking for iron. Coal is plentiful, so I hope I will be able to build a simple furnace for smelting iron. With metals comes machined tools.
-H
================
If you had told me I would be able to work diamond into tools, I would have doubted you. But here.... What is this place?
-H
===============
The creatures are back, but I feel safe in my subterranean home. I'm still very frightened by the creatures in the night, and dread to think about the villagers, but I also know that the strange iron golem will protect them. 
I have made a curious discovery. There are strange red stones found deep un the earth. I initially tried to mine them using my iron tools, but they disintegrated. My bizarre diamond pickaxe was able to extract them however. The ore, when struck, glows with a light of its own. My initial fear was that they were radioactive, but I do not believe so, now. Whatever these red stones are, they can be used as an inextinguishable source of light. One can also draw on surfaces, like chalk, and the red stone dust will convey power certain distances. 
This gives me ideas on how to better hide my home.
-H
================
I have turned my attentions to the stone circle, trying to understand its purpose. It's clear that the upright ring is composed mainly of obsidian, with a single block of lapis lazuli in the base's center. The glowing block is yet another mystery, as is the sign. Domanvisce. Is that the name of this place? Maybe some warning? When I first arrived I did not notice the water bucket that hovers. I can see it, yet can not touch it. Another mystery. This place is maddening. 
There is a button, and when I press it, an apparatus lights up, but that is all. Could the ring be a mechanism of some sort?
-H
================
While exploring, I came across a statue of a sphinx to the southeast of the village. I am embarrassed I had not seen it before. The black sphinx rests upon a huge sandstone base. I am slightly embarrassed to say I began tunneling into the base. I can't really say what for. I was driven by the stories about the great treasures of Egypt. 
I immediately broke through into a large chamber. There were more of the strange hovering items, and a chest full of redstone, signs, and obsidian. I was this a storehouse? I claimed the redstone but left the rest behind and bricked up the opening. I do not know if the villages would dare loot from the statue, and I feared they might become angry if they saw the damage I had caused.
-H
================
I have discovered an entrance to the mechanism of the ring! I believe it is a machine. There are a series of red stone wires drawn onto the floor, leading to and from a number of devices, eventually ending at a second sign, repeating the same word: domanvisce. It's my hope that I'll be able to repair the device, but I need to mine for more of the redstone; I used all I had found for torches.
-H
================
An astounding discovery! While mining, I came across a small vein of lapis lazuli. After I had extracted it, I was cleaning one of the shards, accidentally hit it against a stone, and suddenly found myself standing at the stone ring. I thought I had gone mad (madder?) but upon making the motions like I was going set down a block, or make a redstone wire, I was again transported to the stone circle. No matter where I have gone, the lapis lazuli fragment will bring me back to the ring. Quite a handy thing to remember. I swear I will never set out without at least one fragment.
-H
================
Repairing the ring's mechanism was simple in the end. There was a single wire which had broken. Now the strange current flows from the button and produces musical notes from the mechanisms. Thus far, I have only activated the machine from the interior. It grew too late in the day for me to stay out and try the mechanism. Tomorrow I will see what the ring does.
-H
================
Thank god I always carry a piece of lapis lazuli with me, now. If I hadn't I fear I would be lost! Well, more lost than I am just being in this land. 
I activated the gate and it was filled with beautiful, clear water, but it did not cascade down. It remained within the confines of the ring. Another wonder. I stepped forward and touched the water and suddenly found myself in another place, at another gate! All about the outside, objects floated: earth, a water bucket, a torch, a feather, plant, egg, and a piece of redstone. Another sign hung, visible from the gate--Derclocdoman--and surrounding me were numerous buildings, all in a style unlike what I had grown accustomed. Unlike in Domanvisce, I could find no villagers.  
Hoping the gate mechanism worked, I pressed the button, the gate filled with water, and again I was transported. But not back to where I had come from; to a new land, with new structures. Each new place had a structure of obsidian, but few could be called rings. Each took me to a new place--Derclocanmith, Derclocoplandi, Dercloaer, Derclocovisce, Derclocotine--and then back to Derclocodoman. There didn't seem to be any way to return to the place I started, Domanvisce. Then I remembered my lapis shard and returned...if not home, than the place I have come to regard as safe. 
My mind is too awhirl to try and understand how these gates work. I feel certain there must be a way to return to Domanvisce using the gates.
-H
=================
I have taken numerous travels through the gates, and have explored the 'Derclocs'. I have seen massive castles. Strange homes on stilts, floating on water. Ancient temples. But no people. In some places I have seen iron golem patrolling, but what happened to the people they protected? 
As much as I fear doing so, I should travel though the gates for an extended time. If I am going to understand the gates and how to use them, I have to actually use them. 
If you have found these notes, then seek me out through the gates. I will leave redstone torches as a sign.
-H
=================

Sunday, May 27, 2012

Timesink part 10: A working gate network

I have been spending far too long thinking about the gates and entire gate system. I finally just sat down and made myself start implementing things. So let's look at some sketches:


Once I drew arms onto the plot, everything clicked as to how I could set up the network. I have something like 40 more gate to place and setup. Let me just pimp the bukkit plugin Gates. I mentioned it before, but it really is worth another (short) plug. If you run a bukkit server and are looking for a gate-based teleportation plugin, you really need to check it out. The biggest downside with it is the inability to design gates of custom shapes like you can with some of the other gate-based teleportation plugins. But the use of a chest to enter a gate address really makes this one shine for me.

One can get around the custom shape limitations a bit with some creative use of the WorldEdit plugin tools. Once the gate has been created and correctly activated, one can change the type of blocks or even remove them using WorldEdit tools and the gate will still work. On the server I'm running, lapis lazuli has special teleportation-related abilities, so the center point of the gate is a lapis lazuli block. I also remove portions of the outer ring so each arm of the spiral has a specific gate shape.



You may note that each gate has distinctive markings on the ground in front of the gate as well as items to the sides leading up to the gate. These have to do with which arm the gate is in, and also encodes information about the address of the gate you are at. Hopefully other things found on the server will make it clear how the addresses work.

With each gate, you can either enter a destination address, or just hit the button, 
which will take you to that gates pre-set autodial location. Under each gate site are a series of music blocks and redstone circuits, so before the gate activates, a series of music notes play. 

The sequence of the notes, again, conveys information. Specifically, it can tell the user how far out on a spiral arm they are, as well as gives hints about relating alchemical-based items (earth, fire, water, etc) to numbers.

To wrap everything up, here are some shots of the various "cities" that can be found around six of the gates. In some images, iron golems can be seen patrolling the areas around gates. Remember: the placement of all of the buildings was done automatically (as described previously). The placement of the gates and the size of the gate areas were done manually and are meant to (again) give information to the player about the gate networks and where other cities are.


Once I finish placing the gates (I try and do at least 6/night), I will start writing the notes as left by the unseen "H". Next time, who "H" is, what he learned, and what became of him.

Tuesday, May 8, 2012

Time sink: Interlude

I have not abandoned things, but testing the server setup is going slower than I would like. For the time being, enjoy something from the interwebs.


Saturday, March 24, 2012

Timesink part 9: Requiem for a plugin

Whenever there is an update to Minecraft, the good folks at the Bukkit Project need to update the Craftbukkit server. This, in turn, means that some plugins might need to be updated.

Most plugins are made by the Craftbukkit community of users, which means that for any given plugin the developer's interest in maintaining might drop to the point that it is abandoned.

Such seems to be the fate of the brilliant plugin ItemCommands. I honestly don't know why every server didn't use this. Let me try and explain just why this was such a great plugin.

I know there are a few people reading this that haven't actually played Minecraft, so for those dear reader, in Minecraft the player ispresented with a screen which has a crosshair in the center. When the player is within a certain distance of a block, the block's edges are hilighted in black. This means the player is close enough to interact with the block by clicking on it. The clicks can either be a normal mouse click or a cntrl+click (I don't know the Window's left/right mouse click convention).

The vast majority of plugins for Craftbukkit allow the player to execute commands by first typing "t" which opens up a chat window. The player then has to enter some character that tells the server that the player wants to execute a command and not send a chat message. The character is "/". So, for example, if the player wants to teleport to the in-game spawn point, they type:
 t<return> /spawn

Example Minecraft interface. Note the crosshairs (center screen) on the block outlined in black lines. The ability to execute commands via the chat interface is visible. In this case the command /spawn would teleport the player to the in-game spawn point. For those interested in the city-related stuff, note the presence of Mayan-inspired buildings in the distance.

This is fine, but it breaks the arm-flailing convention of Minecraft and makes immersion into the game hard. Enter ItemCommand.

ItemCommand allowed server admins to link items in a player's inventory, or what they did with items in their hands, with commands. For example, on the server I was running prior to the crash if one was holding a compass and they cntrl+clicked on a location, it would execute a command that would make the compass point to that location. It would link the action of the player holding the compass to the command "/compass here" enabled by the CompassEx plugin. If the player just clicked the mouse while holding the compass, it would make the compass point to the spawn location (executing the command "/compass reset").

It was brilliant! Players could teleport to their home or spawn using chunks of lapis lazuli (depending on whether it was a click or a cntrl+click), change where the compass pointed, etc. Even very young kids could get into it and there was far more suspension of disbelief.

Unfortunately, with the recent updates to CraftBukkit, the plugin no longer works and it looks like the author is no longer active. The code is on github, but frankly, I'm rubbish with Java. There's a project out there that allows one to write plugins in python, but it's not very well documented.

So, consider this a plea: if there's anyone out there that loved ItemCommands or thinks the idea of letting players execute commands without having to type is cool, AND they can update the Java project, please oh please update it and let me know.

Timesink, part 8: Automating city placement with python (and some Excel help)


People actually read this? Well gosh....


It has been a while, and before I start talking about how I largely automated city placement, let me offer an explanation as to why it's been quiet.

To avoid a tl;dr version: the computer hosting the minecraft server had several drive die one after the other. One of the drives had the running server. Another had the backup.

Dust in the wind.

Couple that with the release of Minecraft 1.2.3 (and now 1.2.4) and the lag between Minecraft updates and plugin updates, and things have been really dead.

Things are officially back up, though. A brand new world for people to explore.

But in the last post I said I would talk about the tools I'm using to automatically place cities, so let's get to that. Warning: this is a pretty boring post.

If I just wanted clusters of buildings to appear on the minecraft landscape, I could probably do that with just the Terrain Control plugin and the BOB files. What I'm trying to accomplish is complicated by the fact that

  1. There is a mathematical pattern to where each city is
  2. There are five distinct architectural styles
  3. Each of the architectural styles appears in specific biome types, but are not strictly limited to a certain biome. It makes no sense for a civilization from a forest biome to refuse to build anything in a plains biome just to the west, for example.
  4. If you are placing more than 20 cities, the process of teleporting to a set of coordinates and waiting 10 minutes for all the buildings to render (sometimes it can take longer depending on the buildings being placed) is tedious and should be automated.


To address the first point, I made myself an excel worksheet (which I'm happy to make available if people are interested).

The user enters two values--# of cities wanted and a scale multiplier (see post "Timesink, part 3" for details)--and then places a * next to the in-game spawn location, and the sheet does the rest...with the exception of the biome type. I'll get to that in a bit.

As a guide to understand the excel sheet, things which are underlined are things which the user must input. Anything in italics represents something which has been automatically calculated. Bold things are just headers. It's a convention I worked out for myself many years ago to quickly allow me to look at an excel sheet I made (maybe years ago) and understand what are the inputs and outputs.

The excel sheet assumes that at the center of my spiral is some sort of main complex. The Capital or Holy City...something. Of course, if you have a Holy City, you probably think of it as being the center of your world; your 0,0 starting point. In the story I'm working on for the server, the main city and the new player spawn point(set to in-game's 0, 64, 0) are different. This is why the excel sheet calculates a city's coordinates from the Holy City's perspective and from the in-game spawn point's perspective.

In the example excel image I posed city #3 is centered at in-game coordinates -203,595. That same city, if one assumed the Holy City was 0,0 is at -75, 164. This allows me to use the in-game coordinates(-203,595) to go to that location, but use the story related coordinates(-75,164) to provide a gate address to reach the city(see post "Timesink, part 4").

What my sheet can't do is tell me what biomes are at those coordinates. For that, I used screen and python.

If you are not familiar with screen, you can think of it as a command-line way to keep a "window" open, even if you are not actually connected to a computer. In practical terms, it means one can log into a computer, make a screen session, close your connection, and the computer you had logged into continues to behave as though you are still logged in. It lets one start and keep a minecraft server up and running even when one is not logged into the host computer, for example.

You can name your screen sessions, which then allow you pipe commands into the session. For example

screen -S minescreen

will start a new screen session named "minescreen". And we can send it commands from a python script.



To determine what biomes are present at various coordinates, I wrote a quick little python script that tells the cratbukkit server running in the "minescreen" screen to force a player (me) to teleport to a location and then force the player to query what biome they are in. Wait five minutes and repeat. The five minutes is because, just because you happen to land in an Ocean biome doesn't mean that's the biome you should use. If gives the user some time to look around and make a judgement about what the biome should be.

Write down the biome or notes in the Biome column, and you're ready for step two: splitting things up by biome.

I have split each of my architecture types up by biome and named the files and folders accordingly. The folders and files have common prefixes--"_swamp", for example.


This allows me to use command line tools to move files found.


Now, I admit that this isn't the exact script I used; I cleaned it up for posting so it might not actually work lol. When I was using it, I would do a single biome type since that means 10 or more cities were placed, and it often took a few tests to get the right settings for the BOB files to make sure there were a decent number of buildings, but not too many, and not too much overlap as buildings were rendered on top of or into other structures.

So I think that's it. As of today, the server is back up, all the cities are placed and I'm starting to place the Gate rings. There's still a lot of testing that needs to be done to makes sure all the plugins are working as they should.

Left to do:

  • Place all the Gates and test them
  • Start writing the messages from the enigmatic "H" who acts as the players absent guide and breadcrumb leaver.