For all of you who have been paying attention to my forum activity, I've been talking a lot about roguelikes. That's because I've been working on one for a few weeks.
Truthfully, it's not quite accurate to say I've been working on it for a few weeks. I've really been working on it a few hours, but those few hours have been stretched out across a few weeks due to my schedule.
For those of you who don't know what a roguelike is, you should read about the genre. I think most BYOND users will be able to appreciate them.
http://en.wikipedia.org/wiki/Roguelike
I've been playing around with a few systems, trying to adapt BYOND to a classical roguelike structure. I've got a decent command system working, but it's not fully customizable yet.
The command structure is pretty simple, binding several types of commands and input structures to function like traditional roguelikes (ADOM, Nethack, Rogue).
In these games, you have several input structures:
Directional - After invoking the command, you must press a directional key.
Locational - You must use the directional keys to select a location or a target.
List - You must select something out of a list using A-Z keys.
Stationary - The action occurs relative to/regardless of your current location.
Text - You are allowed to type a line of text. Pretty straightforward.
Confirmation - Use the Y/N keys to confirm or deny.
I have incorporated all of these already into a BYOND interface system using macros and verbs. I found the solution quite elegant and clever. Unfortunately, due to the way BYOND handles macros, my prior method for handling all of this activity did not function as I thought it should. The custom macros will be implemented when I can start working on systems of their level of priority.
For the time being, I am looking into the D&D core manuals to find system mechanics that will take this Roguelike back to the the roots of the genre, and yet advance it beyond its predecessors.
I'm using a few ideas from modern RPGs, leveled lists, prioritized randomization, and themed lists. These ideas were inspired by the elder scrolls series, and in how they doled out loot and monsters. I'm expanding these ideas past just tweaking the rewards of a static dungeon.
Another idea I've decided I'd look into, was NPC personalities. This is another idea I've seen used in Oblivion --albeit poorly. I enjoy the idea of NPCs having their own schedules, and personalities, I just thought that the Elder Scrolls' NPCs were poorly designed.
I've been speaking with a friend I work with about D&D a lot. He's a veteran player, and prides himself as a great DM. He rants and raves about generic plot devices and bland NPCs. Some of his madness has interested me greatly, the rest I pass off as simple elitism and personal preference. He and I have worked out a simple dice chart that allows us to randomize an entire world. We have also been working extensively with terrain generators to make randomized worlds as well. We still don't have an algorithm that produces a particularly interesting, or unique world, but we understand that human interaction, and personal touches make worlds interesting, and a machine can hardly hope to do that all the time.
From our talks, I have produced something of a simple world generation method. This includes lore, nations, gods, pantheons, species, everything. The algorithm runs through a series of parameters that guide the early phases of world creation.
World generation
I start by generating a static terrain with a fairly flat appearance. Then, I create fault lines that generate a jagged line tracing across a sphere. I smooth the lines, then randomize "hot points within the sphere. The "hot points" attempt to spread towards nearby fault lines every generation. If they don't approach a fault line, they bulge, creating mini-faults and pushing the static terrain above into a bubble. Some too close to the surface will break through, depending upon their composition, and certain environmental factors, they will either cave in or erupt.
Pressure and eruptions will focus on fault lines. Hot points will erupt and push near hotpoints, causing the fault lines to put pressure on each other, rising. Every cycle, we apply erosion, with convers rock into soil. The older a peak is, the more soil it will produce, and the more it will erode. Soil attempts to spread evenly down slopes, and will create smooth curves.
After a predetermined number of cycles, we then flood the planet, determining the water level. We run through one last erosion cycle, we move on to species generation.
Spcies will be determined by parameters. Either environmental factors determined by distance from equatorial lines, and by airflow/distance from water sources. We can determine what will live on the planet by the type of world (fantasy, steampunk, medieval, etc). This uses leveled lists that have another subcategory assigned, separated by climate. The world will generate predators and herbivores in certain places. Places with ample food sources will attract species that can eat that source of food, and places without will generate nothing.
The next step, after species genesis, is to move them around. Snetient species' movement is goverened by two factors, resources, and choice. On the other hand, unintelligent species are only goverened by resources. Events also have an effect on the migration of sentient species. Major events, such as war with another sentient species, etc. will also determine the population, and the dispersion of tribes.
After a number of cycles, species will have made sttlements, abandoned them, formed large tribes, and nations. These nations will have influence over places, which will create borders, and political climates.
From all of this data, we can begin mapping individual continents, regions, nations, cities, all the way down to people. It may seem like quite a lot of data, but when packed into a bytecode and saved on a hard drive, I believe it should be quite small.
The size of the data package will be considerably small when you consider even my terrain calculation would cover the elevation map of an area the size of texas using less than a kilobyte. However, the ammount of saved data increases significantly once more of the world has been fleshed out by secondary and tertiary randomization processes (we only reviewed the primary).
The secondary randomization process occurs when the player enters that region, and the tertiary process occurs when the player is informed of, or visits a small sector of that region, such as a town, or a lake.
Anyway, I'm rambling a bit, so I'll just leave it here, and put an update up in about a week.