Tuesday, December 22, 2009

The first Weapon of Legend

Miraud and his armies disbanded, the great heroes by his side during the battle travelled home, or out for their own goals. Miraud, still, was not done. The dragon's soul was captured in a crystal, it could not be remade without the crystal, and that was too much of a concern. So, Miraud deigned to find a way to stop the crystal from being used.

He decided to focus the power of the dragon's soul into making a weapon, one that could be used against the other dragons. For forty days and forty nights, he toiled away at a forge with the crystal and the tools to forge a mighty weapon. At the end, he was left with a heavy warhammer, adn the crystal was whittled down to a nub smaller than a man's finger, and encased within the hammer, merged into it as one. This was the first great weapon of the elements, the first great weapon forged by men in the age of magic. It had the power to move mountains, and amplified and channeled the raw power of whomever carried it. Miraud was exhausted, he laid down the hammer and slept.

The moment he did, though, alone and unprotected but for his weapon, the other dragons swooped in to end him. While with the hammer of earth Miraud was more powerful than any one dragon, he was no match for the combined might of all five. Still, he was not slain outright, and managed to protect the hammer from their greedy clutches. But, he was mortally wounded, and passed away shortly after. The people, the armies, and the heroes that had known him decided his last sacrifice not be in vain, and buried Miraud in the earth along with the hammer so that the dragons would not be able to collect it, the weapon's power preventing the massive beasts from tunneling through the ground, and all manner of traps and chained demons to prevent anyone from entering and stealing it for their own uses. The thought of the dragons weilding the weapon was impossible for people to comprehend, and so they hid it away.

Saturday, December 19, 2009

More split-level madness

Okay, so I didn't get maps working across levels, I realized I needed to improve the code that handles rooms before I could do that - last time I touched that items kept appearing outside of the rooms, and more importantly, inside of walls, replacing them.

So, I was looking at the code, and it got boring, so I added a spawn point to my map. And then I added code so I didn't have to hard-code in every spawn point, after all, this game is supposed to be about procedurally generated content, right?

Now the spawn points work, and as I work my way through five maps to get to my spawn point, I notice that there are a lot of monsters appearing on screen - they don't notice me because they're on a different map, but they're appearing on screen. I arrive on the new floor and get clobbered - I have to remember to spawn some items before I spawn those monsters next time, ouch.

I go in, and write two new pieces of code. The first makes monsters that are not on a map that is being drawn, do not draw (this saves on processor power, too). Then, I make it so spawn points that are not on a map the player is currently on, are not pumping out monsters, and even when the player is there, monsters no longer appear so quickly the player gets swamped. I know this is a bit of balancing, but if I'm going to be testing this a bajillion times, I might as well not have it so hard to kill a group of monsters as to be impossible.

Then I found the monsters, ran away and while on the other map I died. I was like 'whaaaat?'. So, I looked and I found that while I was marking the player as being on the new map, he was still being treated as if he were on the staircase of every level he passed through. Which means if a monster on another map walked by a staircase I had passed through, it would 'see' me, approach, and attack (and eventually kill) me. Glad I figured that out, that would have been an annoying issue to have resurface every now and then.

Thursday, December 17, 2009

If it was so easy, why did it take me so long?

Taking a step out of my naration for a moment, you might remember that I stopped working on TinyGame a while back because I was having difficulty with bugs regarding map changing code.

Now, I've finally abstracted everything to the correct level so I have a world, which contain a number of maps, which contain a number of tiles that can hold a number of things, of which one may be a creature (which may also be holding things). Some of those tiles can be stair tiles, which when walked over and activated bring the player to a new map. It sounds so simple, doesn't it?

It certainly didn't turn out simple. After I abstracted from just having maps to having a world containing maps, my player class exploded to no longer wanting to be a creature. I had to rewrite the player class almost from scratch to fix that, and I'm still not even sure why that happened, and am deathly afraid of setting it of again.

Then, I had to come up with a way that the staircases weren't considered items, nor quite terrain, nor creatures. They needed to be something new, and now they take the place of a tile instead of occupying it.

Finally, I needed a way to keep the game, when the player moved from one map to another, from a) displaying the whole game and b)keeping the camera on the player (because other than the fact that it is controlled externally, it's just another creature as far as the game is concerned). I solved that with a little flag on the map that the player is on. Basically, it says 'this map draws'. Combined with art being so much more computationally intensive than the rest of the code, and everything else the game is still running quite smootly with a few monsters running around, and four layers of mps for them to run around on.

Next, I integrate the map generation back onto the maps!

Tuesday, December 15, 2009

Age of Magic

For years, the gods watched the world, sure in themselves that this time, the wold was perfect. Of course, it was not, for there was an impalance of power in the world. The great dragons were many times more powerful than the races, and felt that the gods created them soley to rule and command them, instead of to inspire.

The dragons descended onto Ronar, and demanded alleigence from the kings and peasants alike, claiming to be the new rulers, gods and leaders. Some lands submitted, most however fought back. And so, the first dragon war began. It was not much of a war, the races prepared mighty war-machines and the dragons came and destroyed entire cities. The races called upon mighty power from the gods, and the dragons came and crushed the temples. The dragons were careful never to do more damage than the races could sustain, after all they needed someone to be venerated by. But, that was little less than utter chaos.

The gods looked down at the expanding war, and realized that the races were in no way equal to the dragons. The matter that they survived as long as they had was a mark to their merit. And so, Garsog, Geisfarl, Their wives and children gods pooled their powers together and created an endless supply of energy that would run all across the surface of Ronar and through it's center, and even out into the sky and to Paio, the moon. Some of these lines of power would reach as far as the sun, though not many. The weave of these lines was wild, and invisible to the naked eye, but it was very powerful. The gods called this power Magic, and the lines of power Ley-Lines.

Then, the gods appeared to the races and revealed this unfortold power, a weapon with which the races could fight the dragons, and the other beasts of the land, and could be used for any number of purposes. The races took to this power like fish to water, and within a year use of magic was commonplace. Within two, the races were powerful enough to keep the dragons from simply descending and crushing a city at their will. Citys expanded like never before, and the races flourished. The dragons did not give up the hope of the assault, and combined forces to continue to attack the races. This, was the age of magic.

After six years, a warrior of great renoun had mastered magict a great degree, and he gathered about him all the most powerful armies of the land, and the great heroes. He tracked down the dragon of earth to it's hiding place, and challenged it to a duel to the death. The dragon laughed, for it had never been defeated, or even challenged. The battle lasted two days, and in the end, Miraud and his army was victorious. The great dragon of earth was dead, the greatest creature ever created by the gods was destroyed. Miraud cast a spell as it released it's dying breath, and captured it's soul into a massive crystal, not letting it return to the gods lest it be returned to the world. It's body, though, he did offer to the gods who, impressed by his courage and strength and uncommon dedication, took it and used it's bones to gave Miraud a new land to call his own, Ouvetlam, a continent across the sea.

Victorious, the armies returned home, thousands were dead or injured, but it was still a victory. The great dragons cried out in anguish, and left the races alone for a time. And for a time, it was peaceful.

Monday, December 14, 2009

The First Intervention

For hundreds of years, humans on Ronar grow, prosper and colonize. They do not know of the gods, or of magic, or of anything beyond the expanding land they are building. Languages come into being, kingdoms, and more. Life is simple, and it's purpose is to grow and expand. One king saw history and that much of it was being forgotten. Since he never wished to be forgotten, he created a way to measure time, the days, years and seasons. The first and only major calendar of Ronar. Thus, the first year of recording came to pass. As did the second, and the third. Still, humankind was expanding.

But the gods looked down at the world, and saw that the humans were not stopping where they had expected them to. The gods had put the humans down on one major continent of three, and slowly they were expanding beyond it's borders. Building simple boats to build on the islands, cutting down the forests to build still grander cities. And most worrisome to the gods, they did not spare so much as a thought to whether or not the gods existed at all.

And so, on the fourth day of the month of NewYear, year 103 of counting, the gods descended into the world to much awe and wonderment of the humans. They chided the humans for being so simpleminded in their expansion, and reminded them that they would be watching. They also declared that since the humans could not be trusted to care frr the world, they would create new races to live alongside them. There were the Torin, placed deep within the forests to live wih and protect them. There were the Unofoine and the Cyclops placed within the earth to live with and protect it. There were the Shadowkin placed to watch and protect the skies.

The humans, however never quite believed what the gods were, or understood what was happening, and so the gods decided to also leave marks of their power in the world - six mighty dragons, each stronger than ten-thousand strong men. These dragons were creatures of magic and fury, and were to always inspire complacency amongst the races.

The dragon of fire was born to the center of the world, sleeping in the heat within that occasionally rocketed forth onto the surface. It was the most similar to the lesser dragons already created, simply larger and more grand.

The dragon of water was born into the oceans, endlessly swimming with the tides. It was long and thin, with no wings and great fins aong it's side, each larger than a sailing ship.

The dragon of earth was born upon the land, and given the most power such that humans could see it and would be awed. It's back was formed of a small mountain, and each of it's claws and fangs were diamonds.

The dragon of air was born high in the sky, just within a mortal's sight. It was so light that i did not need wings to fly, swimmimg through the air with it's sinuous body miles long.

The dragon of light was born in the warmth of sunlight, and would endlessly chase the ball of fire above it. It's body was as clear as crystal, almost invisible against the sky.

The dragon of darkness was born at midnight, and would chase the day it never understood, at the same time fleeing from it in fear. It's body was not formed of physical stuff, but of shadows. Mortals only knew of it's existance by the footprints they wuld find left behind.

Wednesday, December 9, 2009

After the beginning

now, Ronar existed, and it was much like the nothing in which GOD had came to be. But the Masters of Reality gave things a push. No point in waiting for an eternity, after all.

So was created the first god. He was made without emotion, without bias, so that there would be an empty slate for this competition. The Masters then backed away, beyond the realm of the god's power, and watched with an oath to never interfere.

The god created was called Geisfarl. Geisfarl saw the universe, and that it was empty, even of himself. His first act was to give himself form, the same form that would later be used to build the most populace of the creations: humans. Geisfarl then saw that the universe was still empty, and created the sun, and the single planet of Ronar. Now, the universe was not empty, and there was light. But now Geisfarl could not see all, for he could watch the light, and the empty world below with it, he could not see the far side. Geisfarl split himself in two, creating Garsog, the god of the night, to watch over what parts of Ronar he could not see. Garsog saw that the world and the universe were beautiful, and full, but they were plain. For, being made of all that Geisfarl was not, he detested the emptiness upon the world, and created water, so that the world would move and flow, no longer static. Once water has been created, Geisfarl began to long again for his solid, stable and strong world. He crafted himself the first tools, and used them to dig out great spaces of Ronar, so that the water would flow into them. Thus, Geisfarl created the continents, and indirectly the oceans. Together, Garsog and Geisfarl looked at the world and were satisfied, but over time, they began to tire. They created for themselves three wives each, to keep them company.

The wives were each alike them in form, but different. The genders themselves were not entirely defined at this point, but they created the goddesses nonetheless, different, yet the same. The six wives were; Malladine, Sanfra, and Alldora were the wives of Geisfarl, and Paio, Estel, and Ner were the wives of Garsog. Each godess looked upon the world and decided that even with it's solidness, and it's fluidity, it was empty.

First, Sanfra created plants of the land, grasses, bushes, trees and other life that grows from the ground. She took to the woods and forests, claiming their domains as her own. Next, Alldora created all manner of beasts to walk the land. They would live forever, and reproduce. She took to the spark of life, and claimed it's domain as her own. Then, Malladine created fruit, wheat and other foods from the ground, so that the beasts might eat, and grow. She took to the fields and foods and claimed their domains as her own.

Garsog's wives saw what the others had done, and while it was beautiful, it had flaws. If the creatures never died, they would soon cover the whole world, and it would grow filthy and disguisting. Paio herself became the moon, and declared that creatures would only live for a time, before passing the world on to new ones, so each might experience the world anew. She took to the passing of lives, and claimed it's domain as her own. Estel saw that while the land that Giesfarl had created as teeming with life, the sea and the air were barren. She created all manner of fish and birds to teem forth into the sea and the sky, and fill the world to it's brim. She also filled the night sky with stars, filling the world with light where it had none, with life where it had none, and with knowledge where it had none. She took to the thrill of filling these little places in the world, and in minds, and claimed their domains as her own. Ner now looked upon the world, and was saddened. It was perfect, full and in harmony, in constant motion and still solid and fluid at once. She saw the other gods and goddesses and felt that they were all more beautiful than herself and became angry. She brought onto Ronar pain and suffering such that she felt. That each creature might know pain both to give contrast to the good in the world, and as a petty revenge for the goddess. She took to the pain and the suffering and hate, and claimed their domains as her own.

Geisfarl and Garsog now looked upon the world they can created, and their wives had filled with life, and despaired their own shortsightedness. Of course there should have been life! However, rather than being outwitted by their own wives, and thus their own creations, they together created a creature not unlike themselves. They called it a 'human' and set it down in Ronar. It would have a power the other creatures did not have, that of a clever mind. With it, it could rise in power over the other creatures. This act also solidified the aspects of the gods as male, and the godesses as female - in the Garsog and Geisfarl's minds, this was proper.

The gods sit back and watch their creations grow and prosper, and time passes.

Monday, December 7, 2009

The Creation of Ronar

Before I can get into the weapons of legend, I need to explain to you what they were created out of, and why what they were created out of exists. Which brings me almost all the way back to the creation of Ronar. So, to get to the weapons of legend, you're going to have to sit through a little history lesson. Fortunately, it's a fairly interesting one.

In the beginning, there was nothing. No space, no time, no universe for it to exist in. But, in the timeless space that was nothing, eternity passes in an instant, and everything that could happen in nothing happens all at once. And so, an entity that was more of a will than a physical creature came into existance, and in his observing it, there was time.

With time, came the time for the timeless being in the nothing to harness the power to create. And thus, within itself, it created the first universe. Now having a body, and inside it a universe, the entity was the true creator, the protector of all that was from all that was not. It was the guardian of the universe, and from the inside it was the guardian of darkness. Eventually it would become known as simply G.O.D., and later still simply GOD.

Inside the first universe, GOD created creatures like itself but lesser. They had many shapes, and many opinions. They were given one rule - they must create, and they must do it together. For, GOD had tried, and found his creativity infinite, so it was always the same, for with too many options, one tended to choose the same one over and over again. Instead, he much rather enjoyed watching his creations work things out for themselves.

These new creatures knew the true nature of GOD and the multiverse, and knew that they had the power to shape realities. They dubbed themselves after that, Reality Masters, and begun to work. But, as the Masters were so diverse, issues arose. Whose shape to use? Who would be the leader? What rules should they follow within themselves? Those rules were simple: do not create or destroy any other reality masters, although they had the power to do so.

But like all rules, that rule was eventually broken. One Reality Master, decided that the work would be better with one more master, and created him. Many Masters were appaled, and others were overjoyed. They formed allegiences, those who followed the rules that had been set out titled themselves 'Good' and those who felt that they needed to follow no rules, dubbed themselves 'Evil'. There were also those who refused to take sides, seeing a bloody end to this feud, and declared that they were 'neutral' and wished no part in these direct affairs.

Time passed, and the three factions eventually did create a multitude of multiverses. Some were fantastic, with gods and mortals, and beasts and magic. Others were mundane, with strict laws governing every particle.

But the Masters had enough of each other, they began to compete, to decide which group was superior. They held countless contests to decide. Finally, they settled on one final contest, that none of them would affect. One universe, filled with all creatures fantastic, and when it brought itself to an eventual end, the victor would be the side whom the universe balanced itself inexorably towards.

Three Masters were tasked with this universe, one from Evil, one from Good, and a mediator, from Neutral.

The evil was the instigator of the mess, the one who began to call himself Angel of the Fallen. Spirals of red hair rose from his head, and wings of ash grey sprouted from his back.

The good, while usually timid, sent out one of their more calculating masters, one who is all and many forms at once, and is called Shift.

The judgment giver was Tareel, the most observant of the neutral.

And the contest began, and has now run for thousands of years. Nobody knows when it will end, or who will win. But, every action affects the fate of not only this universe, nor this multiverse, but all multiverses everywhere. And thusly, was Ronar created.

Monday, November 30, 2009

Cyclops

In addition to the main intelligent races of Ronar, there are a number of other 'sub-intelligent' races, or at least races created as such. Cyclops are one of them.

Originally, Cyclops were created by the gods in the place of the Unofotine, intended to be one with the rock and the land. However, the gods were unsatisfied with their creation, and created but created a single demigod, insead of a race. This demigod was to later be known as Tel'Aak-Reji, which in the language of the people he created in his own image means te stone king.

Cyclops are tall and humanoid, with broad shoulders and wide hips. Have tiny ears and noses, and a single massive eye. They have a small amount of hair on the top of their head, often only along the back of their head and the sides, which is always black. Their skin ranges in many of the colors of stone, from which Tel'Aak-Reji created them - normally grey, brown, but occasionally darker oranges or the occasional pale yellow.

While physically they resemble humans in most regards, and socially they are smilar to Unofotine, biologically they are fairly different. To gain depth perception with only a single eye, the cyclops eye must rapidly change focal distance, through flexing their iris, often as rapidly as once per second. This allows them almost as perfect depth perception as the other races. As their eye takes up the majority of their heads, their brain is stored in their upper pelvis, behind their stomach. As such, while few cyclops survive the loss of senses and the loss of ability to eat that comes with beheading, they are able to survive it if care is taken immediately, and the head is magically reattached. Some Cyclops have been known to, with proper care, live for months without a head.

Mostly, Cyclops are content to live under the ground, in the vast underground tunnels beneath the island of Raitdas, worshiping and living off the rock and ground. While they are considered sub-intelligent, and as a race they are not nearly as advanced as the other races, individuals have been known to interact with the other races with little to no difficulty, implying they need litte other than time to develop as a race.

Wednesday, November 18, 2009

Shadowkin, in detail

Since I've finally nailed down what shadowkin actually look like properly, I'll cover that bit first.

Shadowkin are smaller than humans, though mostly in height, and have skin typically black or grey. Lighter skinned shadowkin are not unknown, but always the skin is monochromatically black and white, without a drop of color. Their nose and upper lip is hard and bone-like, resembling an oddly shaped beak of a bird, though their bottom lip and tongue are similar to that of a human. Their eyes are large and placed closer to the side of their head. They have tiny ears, and their hair is stiff and coarse and contains tiny threads, almost exactly like feathers of birds.

They are an industrious race, and particularly magical. In the age of magic, one shadowkin by the name of Marshal Hian, built a large castle powered by the magic of one of the great weapons of legend (wait, weapons of legend? Yes, I'll go into them later), and tied to himself to the power, granting him intense power and prolonged life. This castle became the center of shadowkin culture and society, and Marshal Hian used his great magic power to lift the castle into the air above Grittlanni. Years passed, and while shadowkin were reclusive, they made great strides in magic and society. The other races generally held them in awe until the day that Marshal Hian died of old age - as his magic gave him a long, but not infinite life. His death cut the power to the spells holding the magic castle in the air, and in under a minute, decades of progress and all the greatest minds of Shadowkin kind were smashed to peices. The castle remains unfound, or at least unexplored to the current day, as it is fiercely guarded by the natives of the jungles of Grittlanni in the depths of which it crashed.

After that day, Shadowkin rallied together, but the age of magic was drawing to an end, and they fell back into savagery. They are not unintelligent, but with all their leadership destroyed the few other cities they build fell into disarray and they were a superpower no longer.

In current day Ronar, few shadowkin leave the continent of Grittlanni, but those that do are members of society as much as any other intelligent race. They are simply rare and generally reclusive, which is justified because their rarity and unusual ability to become incorporial for a short time scares the other races.

Shadowkin, like all races, can interbreed with the other races. These crossbreeds are extremely rare, due to the inital scarcity of shadowkin and the tentativeness of the other races regarding them. When they do exist, they typically appear to have washed out colors, even to the point of seeming to be charcoal drawings, and have literally stiff upper lips, and large, wide-set eyes.

Tuesday, November 17, 2009

A-maze-ing

I was stumbling around the internet today, and I found something rather interesting.

Now, maze-solvers are relatively simply pieces of code. From the start point, follow the left (or right) wall until you reach the exit. There are some few variations as to whether or not the dead-ends are considered part of the end solution, generally they aren't, but that's not what this is about.

Random maze generators are the sort of thing that *sound* easy to make, but I would imagine are quite difficult. Heck, manually drawing a maze is tough to do. You have to come up with exactly one route through a series of squares, and the rest of the squares have to be part of routes that connect to the rest of the maze, but do not lead to the exit. Sure, you can draw a bunch of squiggly connected lines on a peice of paper, but you really have to give kudos to any guy who has a maze generator that follows all these rules, and generates truly random mazes with start and goal squares, and fills every single square on the map.

There was a windows screensaver where a dude ran around a 3d maze, but that maze was tiny, and didn't follow the one important rule - exactly one path from start to goal. I don't really have anything else to say on that, so I'll just give you all the link so you can take a look and see what you think of it yourself.

http://www.math.com/students/puzzles/mazegen/mazegen.html

Friday, November 13, 2009

Humans, in detail

Think you know everything about humans, eh?

Humans were the first race created by the gods, and the form which the gods them took in the world. They are pink-skinned with brown, yellow or occasionally red hair at the tops of their heads but virtually none elsewhere, save for some males with hair all about their faces.

They are very industrious, adventurous and always inventig new things. When they were created, the intention was that they would settle Ronar and then stop. So far, they haven't managed to do the second part, which was why the other races were created in the first place. However, they have progressed as a race, and most of their development has passed to the other races as well, faster than the gods had ever dreamed.

Humans create their cities in flat, open spaces, typically near waterways to facilitate transport of materials and produce, and will most often transform an area into what is needed rather than looking for a more ideal spot.

Humans are the most common race to crossbreed with any other race, mostly due to their adventurous nature. They also are naturally able to crossbreed with Orcs, which is upsetting to realize that they are the only compatable species without magical help. Then again, orcs were created in mockery of humans.

Most Human half-breeds live in small niches of society. Half-unofotine will work as laborers, half-shadowkin will work as spies, half-orcs will work as craftsmen. Half torins are the exception, as they are numerous enough to build ther own societies, and Torin viewpoints and appearances blend most easily into Human society unnoticed.

Wednesday, November 11, 2009

Unofotine in detail

The Unofotine were also created after humans had been, with a similar intent from the gods of a race that would not simply develop and expand to infinity within the world. Unlike Torin however, they were given drawbacks to expansion, large eyes to make the sun seem too bright, hands not shaped for holding tools, and a community-minded dispostion. The Unofotine were intended to be a race that expanded slowly, with tight knit villages, undergroud and unable to exploit the resources the humans were so fond of.

The Unofotine, however, did not take this particularly well, and within a half-dozen generations had built massive underground catacombs and structures, learned to use their large clawed hands in place of the tools they were unable to easily use, and developed a strong heirchacal society. The Unofotine were impossibly strong willed, and while they broke out of the mould set for them by the gods almost immediately they were smiled upon for doing so.

Now, the Unofotine still use almost the same ruling structure, although the leader has changed names now to King, rather than Mayor or Lord. They are united, and maintain a strong sense of duty to their people and their culture. They grow their hair long to keep the sun out of their eyes, and suffer none for it, and they are almost as nimble with their hands as humans are, despite their long claws.

Occasonally, Human and Unofotine people will have children, for Unofotine resemble the strongest humans - though also the hairiest. These Half-Unofotine Half-humans are feirce though unweildly, and often find themselves among the outcasts of both races, not feeling the same draw to community that pure Unofotine do where they are shunned as lazy, and seeming monsterous to humans with their large eyes and clawed hands. It is fortunate there are few of these folk, for otherwise there might be a public stand against them ironically banding both races against their own kin.

Tuesday, November 10, 2009

Torin, more in depth

It's been a while since I've touched on Ronar, getting all caught up in procedural content and all. Let's look a little more in-depth at one o the races, the Torin.

Torin were one of the races created after humans, and they were created with a mindset to preserve the world around them rather than to expand and develop wantonly. Hard-wired as naturalists, this instinct influences nearly every aspect of Torin life, although as is always the case different individuals take such a cause quite differently.

Most Torin have the view that one should live in harmony with nature, taking what you need and giving back in turn what you can. They do not hunt for sport, they do not cut down great trees to build their structures (Most often they will grow Rowan trees for this purpose, as they grow very large branches). They do not accept collateral damage in their fights and overall live a very peaceful, calm lifestyle. This also means that most Torin cities are reasonably small, to prevent the over-use of natural resourcesm unlike human cities that simply change the resources available to fit their expanding cities.

However, not every Torin is average. There are entire groups of Torins that view their proclaimed ward of nature as a calling to eliminate all creatures that abuse it. Humans, of course, are their prime goal, and these oft-fanatical sects will attack human cities, destroying as much as they can and murdering without pause especially when human settlements attempt to expand or grow beyond what they consider to be an acceptable size.

Some Torin, too, take it upon themselves to attempt to convert human cities over to their way of life, although few are particularly successful. These are few and far between, as most Torin feel that the humans and them are far too different to see eye to eye on such matters, which was why the gods created them seperately.

Torin and Human often see close enough eye-to-eye that they find each other attractive. Being the most similar two of the intelligent races, in the Age of mortals, Half-torin half-human children became easily the most dominant of the half-breed races. They appear mostly human, though they have pointed ears and a light fuzz often giving their skin odd colorings. They rarely have the tails that Torin have, apparently it not being a particularly dominant trait. These have-breeds strike a strong stance between the two races, expanding at a decent rate, but not abusing the resources of the world. It is unlikely they will ever become as dominant as either of their parent races, but the merging of traits andboth physical and cultural is truly a positive force in Ronar.

Tuesday, November 3, 2009

Randomly generated names

I've done some super-minor tweaks to the name generator, one of which allows me to generate more than one name at a time. Here is a random selection of names for you to judge how well this project is coming along on your own.

Iallquu
Igesposc
Zsui
Slegoita
Cruywausc-u
Sta
Stastia
Bleiy'scipu
Clesidro
Brie'naibr
Rflu
Tstai
Zcluau
Edabvydu
Geibrow
Nyu'rubliek
Mwezuuvl
Eiwflaa
Eziri
Aue'tu'okdrau
Reivl'aunaucr
Chahujausty
Fyaufe
Je'jiiwe
Audwai
Epaafauz
Eidau'ezusla
Uamquau
Fleiebrslaumeichyqui
Druhyo

My favorite I've generated to this point is: Rocksoutthejam, which becomes with spaces 'Rocks out the jam'

The longest 'name' I've generated yet is: Spousmeivlaeibrwuacle

which leads me to see fairly obviously that as a name gets longer, the chance that it becomes unreadable increases exponentially. Let's reduce the odds of extra syllables down a bit.

Monday, November 2, 2009

Vefauv! get back here!

One of the problems with my random name generator to now is that the only combinations of letters it can spit out are randomly generated ones. You could never ever generate the combination of letters 'str' because it generates one vowel and one consonant, adds them together in a random orer and then repeats. There's virtually no difference between the syllables, at all

One big change I've made so far, beyond randomly generating letters, is making the names end on a vowel more often. It makes a lot of names sound slightly more femminine, as ending with an 'e' or an 'a' often does, but I'm okay with that, because ending with an o or u makes the name more masculine and i is pretty neutral. But it adds more prevention to names ending with awkward letters like 'j'

The other thing I did, which is only big because the scope of the program is so small, is added letter combinations, mostly with 'l' and 'h' so we have 'cl' and 'ch' and 'sl' and so on. This allows combinations like str to exist, although it still enables things like to exist, which produces a few uncomfortable names.

Current percentage of random names that could be used for things, about 30%.
Next goal: increase liklihood of common letters,like 'e' or 'r'.

Monday, October 26, 2009

Damsel Get!

It almost doesn't matter how interesting the level you build is, if there's no goal in it other than the finish line, it will get boring pretty fast. In Spelunky, there are three different goals to aim for, asides from finishing the game, and each one ties to a different randomly generated item in the levels.

The first, and most obvious goal is to collect treasure. Once the terrain has been generated, treasure items of varying kinds are sprinkled across it like delicious candy, and it's Spelunkyman's job to go and pick it up. Each different peice is worth a different amount of money/points, which can be spent as you progress through the levels at shops or to create checkpoints, or stached up to create a high score, which in turn unlocks it's own rewards, which I'll get to later.

But even with collecting treasure, it's not quite as simple as that. The loot is spread out pretty evenly throughout the floor, but it's not always just laying out in the open. There are pots, which usually contain treasure but occasionally also a snake or spider (so you have to be careful when you look inside), there are chests which may require keys found elsewhere in the level, and there are shiny golden idols, which are important into and of themselves. Not only is each idol worth a staggering 15,000 points, almost five times as much as any other treasure item in the game, they present two distinct challenges. The first challenge is to remove it without dying. Like in Raiders of the lost arc, when Indiana Jones picks the idol off the pedestal and has to outrun a giant boulder, different areas have a number of different traps guarding their treasures. From giant rolling boulders to floors collapsing into piranah pools, and even the dreaded falling ceiling, each one must be escaped simply to *get* the idol in the first place. Then, as a secondary challenge, unlike the rest of the treasure, you have to navigate the rest of the level and physically bring it to the exit door before you get your reward. This means you can't attack (short of throwing the idol, which works, but may cause you to lose it), you can't drop bombs or use ropes, and you have to be very careful dropping off of high ledges because you can't grab onto most ledges without dropping the idol. The reward is great, though, because often an idol will be enough to more than double the score you've collected elsewhere in the level. And since you're shooting for about a hundred and fifty thousand points in one run for the top treasure challenge, it's a hearty bite.

The second challenge is also as you might expect, it's to kill monsters on your way through. Each monster has a distinct way of moving and attacking (typically just bumping into you), and you have to be very careful to rack up a hundred and fifty kills throughout the levels. You can't always just throw them into a trap, you have to brutally murder them yourself by landing on their heads or smashing them with your whip. Usually.

Each terrain type has a handful of monsters in it that will appear as the level is generated. The basic caves will have snakes, spiders, bats, and cavemen running around in it, all of which are pretty simple to predict and to smash, although the cavemen take a handful of hits to do away with permanantly. The jungle has frogs, piranahs, monkeys and yes, man eating plants. The ice caves have yetis and aliens, and if you break open a block of ice, you can uncover frozen cavement too. Finally the ancient temple has cultists, and a mix of monsters from all the other levels, just to keep you on your toes. They're placed randomly too, and it's an occasional inconvienence to find and reach, or epecially kill them, but it's always tempting to wreak havok as you pass through.

But there's one more twist on monsters, and that's special levels. In special levels, the normal rules for generating monsters are put on hold for special rules. There are bosses for almost each type of monsters, giant spiders, fish, aliens, yeti or the feirceome giant mummy, and a few special levels for the others - snake pits, undead monsters, and dark rooms (which are like boss levels for traps). Bosses are still only worth one monster despite their eighteen hit points (to a normal monster's one, or occasionally three) but always drop two things: treasure and items. Treasure is great for obvious reasons, but items make it worth to kill the bosses, because for the rare time you generate an item shop, do you really want to spend two levels of treasure just to grab the high-jump-shoes? Bosses all have special areas and attacks all to themselves, and bypassing them is almost always easier than fighting them, but the occasional fight against something so giant is fun, challenging, and rewarding - making this more than a little side-quest.

Finally we come to the last type challenge in the game, rescuing trapped damsels. Damsels will appear on about every second level you play, and can appear absolutely anywhere, giving them equal chances of appearing on flat ground or on a hard-to-reach ledge. Once you rescue them, you have to carry them all the way to the exit (often harder than not), and you can't even throw them like you can the idols, as they only have a few hits before you kill them. Damsels are fragile after all.

But damsels offer you one of the best rewards in the game, even outside of attempting to rescue nine of them in a fifteen level game; each time you successfully rescue them, you gain an extra hit point. You start with four, and this is the only way to empower youself with more, making the damsels expressly important to surviving to the end of the game. Then again, if you're really good you might want to sacrifice the damsel at one of the occasional sacrificial altars in the game, to gain favor with the gods. You gain different types of rewards for this, but they can be equally tempting.

If you eventually collect enough treasure, kills, or damsel rescues to get a high score in a particular area, you unlock the ability to play special challenges, or to play *as* different characters throughout the game. Those rewards are fantastic, because the different characters each have their own tricks, like the storekeeper's shotgun, or the shortcut guy's ability to dig through solid rock.

Every reward in this game really feels like you've earned it.

Friday, October 23, 2009

Run, jump, plummet...

The level design in Spelunky - yes, even though a computer is doing it, it's still level design - at first looks totally random. You have long strethes of tunnel, deep craters. criss-crossing passageways and more, but even with a really clever program it would be almost impossible to create an actually playable level if you're using totally random level generation.

Note that all I'm going to talk about here is reverse-engineering the game, and may or may not be the way it's actually done. Some bits are more obvious than others, but I make no assumption that I know what's in the code.

The first thing that goes into the level is the path to the exit. You start with about four floors worth of map, with the entrance in one of the top corners and the exit in one of the bottom corners. Then, paths are cut between the different layers, they only need to be a single space wide, but we'll get to the variations in a minute.

Once a basic path is created, terrain is put in. After playing the game for some time I can see that there are a number of different terrain blocks that get used, most of them one floor high and twenty or thirty tiles wide. There are tiles that contain entrances, tiles that contain exits, tiles that contain paths to the next floor, tiles that contain idols, and other tiles that contain nothing but rocks, so far. (What's an Idol, you ask? I'll cover that next post, but it's a game mechanic). There are some special peices of terrain that cross more than one floor worth of space, and others that cross less than one, but for the most part, it's simple cut and paste from the database.

But that would make for a boring game, wouldn't it? Yes it would, but because Spelunky is great, the terrain doesn't stop it's generation there. First, on each terrain peice, there are a number of blocks that may or may not contain a tile of terrain. Sometimes, this allows you extra tunnels, other times it makes jumps harder, and still other times it gives the monsters distinct advantages over your character, for example in a tight tunnel with nothing but a whip (usually) spelunkyman really has a tough time overthrowing a yeti, who has to be jumped on to disable.

These little variations add an almost infinite amount of varaition to the game, even before you consider the enemies, treasure, and other challenges that are generated after the terrain, and especially before you consider the number of different interlocking art tiles that make even identical hallways look just a touch different. You really will play a different game every time you play, the occasional four-level deep pit or endless floor of spiked death mixing up what might be a standard crawl through.

Thursday, October 22, 2009

Exposition Expose.

From the opening screen of Spelunky, everything is randomly generated. The story too, although it is only three lines of setup.

It goes to show how little story is actually needed to make a good game great. Three lines transforms what might have been a fun little pointless platformer into what feels like an epic story, and the three lines aren't even related to what happens in the game, other than for exposition.

The exposition in Spleunky works through all the old movie cliches. Fate guiding one's steps, father's last words, mysterious voices, native guides, and so on. It fits the game's feel, diving into an underground tunnel to search for buried treasure so well that it makes this game feel like an old action movie - indiana jones in particular.

One procedurally game I particularly like is ADOM, Ancient Domains Of Mystery, and while the game is fantastic in many ways it's exposition is one of the simplest of them all, a fixed bit of information tied to a randomly generated story filled in with bits from your character creation. You were born in X, you grew up Y, your parents were Z. You trained to be a fighter and left for the draklor chain where chaos was threatening to destroy the world. A great story, and simple.

Procedurally generated games without any in-game story, like rogue or nethack always feel lacking. They become a world, and while adventuring through them is a number of rewards in and of itself, it's never quite satisfying. Why did you go into the Dungeon? Who were you before? Are you a champion of justice, a madman, or a greedy delver? Nothing is answered without just a touch of exposition.

Wednesday, October 21, 2009

Spelunking

So, I've been playing this game lately, called Spelunky. It's a freeware downloadable game by Derek Yu, and it is to nethack what mario is to zelda.

For those of you without extensive knowledge of all the gaming world, I'll clairify that little metaphor. Zelda is an expansive top down two dimensional world where you collect items, fight monsters, and generally be a sword-weilding menace. Every map in the game is lovingly touched by dozens of designers, artists and programmers to make the game perfectly balanced and nice to look at. Nethack is a procedurally generated dungeon crawler where the maps are randomly generated (sphagetti dungeons, unfortunately), and you collect weapons to kill monsters and generally be a sword-weilding menace. See the similarities?

By that extension, Mario is a two dimensional side-scrolling platformer game where you go through several worlds of varying types, jumping on the tops of enemies, hopefully collecting powerups and uncovering shortcuts. Spelunky, now that I've finally gotten to it, is a procedurally generated two dimensional sidescrolling game where you travel through several levels of varying types, jumping on enemies, trying to collect powerups and unlock shortcuts. The similarities are obvious, to both nethack and mario, and I feel this game is a stunning and essential addition to both today's gaming climate and the world of procedurally generated games.

You see, this game is good, and not just pong good, I'm talking will probably make it's way eventually to a console good; and while it's only been out for a month or so, the important telltale sign is that a community has sprung up around the game, spaders, overaccheivers, version testers and more. You don't get that on an average play-once-and-discard game.

Most importantly, Spelunky is a solid peice of proof that dungeon crawlers are not the only type of game that can be successfully procedurally generated. You could, theoretically, procedurally generate an entire game of *any* genre, and while the obvious place the industry started is on the simple end of the scale, I'd wager that eventually you're going to wind up with more complex games for more complex genres.

Sunday, October 18, 2009

Zzigy the Warrior

One thing that often bothers me is random name generation. Almost every 'random' name generator program anywhere is actually a single random number generator that picks a name out of an existing list. So, everyone who can't think of a name for a familiar in say, kingdom of loathing, winds up with one of four names, not an *actual* random name.

Names are complex things, I can give that up. Michael isn't exactly a word you would nicely find by putting in seven random letters, and words are generally more complex than that in the first place. So what can be done? Well, dwarf fortress has a good start to it (although like everything in the game it's way too complex). Each dwarf you randomly generate has a number of spaces in their names, and each one can be filled with one of a group of name sections like "shu" or "Meh". Unfortunately, almost all of them are from the same list, so it is possible for you to wind up with Shushu Shushu as a name if you're really unlucky. Each of the names has it's own description and if you're looking to build a dwarf name you can read them. But there's hundreds of them, and that's what makes the names seem random. Combined, you wind up with a few tens of thousands of combinations and that's what you're picking out of, but still, only a small fraction of them are both readable or interesting.

I've started fooling around with another program that generates random strings of characters. It's nowhere near random name quality, but it's certainly better than coming up with "Gort" or "Shushu" every thirty seconds. So far it generates two to five sections composed of one vowel and one consonant, in no particular order. There's about a ten percent change of getting a fantasy-name-joiner in there too, like a ' or a - . You get a lot of unreadable gibberish, but nothing unpronouncable save the rare cases where you have x's matching up and that's *still* not that bad. I'll let you know as it continues to shape up.

And for anyone wondering how tinyworld is coming along, I've stripped out all the code I had for making multiple floors, and am attempting a higher-level way to work it out. I'll keep you up to tabs if I ever get that working.

Tuesday, October 13, 2009

Mini Gaming

Mini games are one of the tender areas inside gaming that nobody is quite sure what to do with. Sometimes the mini games are as simple as pushing one button a hundred times in as short a time as you can. Other times it's more complicated and integrated with the controls of the rest of the game you're playing. One of the most popular methods of minigaming is the quicktime event.

Quicktime events are, to quote a narcissistic australian I'm sure you know, times when you are forced to press X to not die. It's simple, often unexpected, and can bring about long periods of gameplay you are forced to redo, because no matter how skilled you are, or how much time you put into training, if you fail to quickly and properly react to a particular series of all-but-random events, you are brought to the game over screen. So why are they so popular? Because they're easy to do! Programmers have to take like, fifteen seconds to code in 'if this button is not pressed by this time, the player dies', while if they had made it an actual in-game challenge it would have taken them hours, weeks or days to build it.

Allow me to say that I think minigames are absolutely required in today's gaming world. In shorter games they can provide some pacing as well as adding in length for much cheaper than standard levels, and in longer games they can provide a fast-paced moment of pickup much needed in slower sections of the game, especially if they provide in-game rewards for doing them.

Just so long as you don't go gold saucer on us, requiring hours upon hours of play to get any reasonable rewards.

Thursday, October 8, 2009

See Dungeon Runner... Oh, forget it, it's a boring joke anyways.

When randomly generating a dungeon, one thing you have to think about is the challenge of it. Is the average player going to be able to breeze through it? Will only the most experienced and quick-witted be able to pass? Are there going to be some challenges harder than others? Some challenges that allow the player to take a figurative breather? How quickly do they get more challenging, if at all?

Dungeon runner takes a very simplistic look at this, and like the shapes of the rooms that eventually get stitched together, the monster encounters are basically cookie-cutter fights, although even a cookie cutter can surprise you sometimes.

Basically, monsters are divided up into groups. Typically there is exactly one group per room, and they spread themselves out fairly randomly. That only matters on the first shot, though because the AI is extremely basic. If you kill a monster in one shot without it seeing you, you don't draw agro. If you don't kill it in one shot, regardless of whether the rest of the monsters in that group are able to see you, or the proximity you are to other, different groups, you draw aggro from exactly every monster in that group and no others. (in case you don't know, drawing aggro means to make a monster aggrivated, and chase you to attack). That's a fine system, but there are some 'scout' monsters who random-walk way outside of the room they are grouped in, allowing you to accidentally double-up a fight even when you're already losing.

There are several simple 'shapes' I've seen these cookie cutters come in. Medium, Swarm, and Boss.

Medium groups contain a half-dozen average melee units and one or three ranged units. Once in a while they'll contain a ranged unit who can heal your opponents or poison you or the like. Mostly it'll just be one knockdown per melee opponent, and then fight until they're all dead. No real variation, minimal strategy. It's not even much different based on what type of enemy you're fighting. All the melee enemies can knock you over exactly once. I suppose it's a charging bonus or something.

Swarm groups are larger than medium groups and in addition to a small handful of melee guys and a larger handful of ranged guys, they contain about ten or fifteen fodder guys whose only purpose is to absorb your fire and get in your way by getting as close to you as possible and doing the smallest amount of damage possible for you to want to kill them all. There's still not a lot of strategy here, you use an area attack once they get in close, then kill each of the fodder guys in one hit. It doesn't hurt that everyone gets area attacks of every element, so you can do it no matter who you're fighting. I'm sure there's other strategies, but this one works and it's simple.

Now we get to the boss fights, which is where the strategy actually comes in. Boss fights typically contain a good number of melee units, a few ranged units, and a boss enemy selected from among the available enemies that you're fighting. That does include the fodder units, but that just means they do less damage, they still have a huge number of hit points. Now, you actually have to prioritize your targets, because if you just attack the boss, then the other units will kill you. However, ignoring the boss will lead to the opposite scenario, forcing you to respawn and once again meet up with the now lackey-free boss and wipe the floor with him. I've found the best strategy is to take out about half the flunkies, then the boss, and clean up the flunkies last. It's simple, but the fact that the bosses have names, drop more loot than normal, and guard treasure chests puts just enough variation in the kill ten enemies, wait thirty seconds for health to recharge. Kill then enemies...

Of course, the names are 'randomly generated', too. Or, randomly picked from a list for that particular group. I'll never forget the first "Particuarly Rude Broodling" or "Pyrus the Smoldering" I fought. At least, until January when the game clears away.

Monday, October 5, 2009

Form or Function

I'm sure you can all think of a point in time where you were playing a game, running along, and you run across a peice of the story that doesn't fit with the game world. A character dies, for instance, and while you have a dozen scrolls of ressurection in your backpack, you can't save their lives.

The delicate balance of gameplay versus story is the most evident when dealing with resurrection. If you can bring a character back from the dead with no effort, any tension the game might be trying to build is lessened, because any threats are suddenly less so. If resurrection becomes too much of an obstacle, the game becomes hard and unforgiving. Worse still, since you should have more powerful abilities and more resources available at the end of the game than you did at the beginning, there have to be new, more challenging ways to keep the tension in the game.

This particular argument was raised by a discussion on Final Fantasy. The series has been handled well over the years, breaking ground in many different fields, having new stories with common elements and so on. In several of the games, however, you have characters die on you as part of the story. PCs, and NPCs alike. Then, you are jolted out of your suspension of disbelief because for ten hours you've been fighting monsters and getting killed regularly, only to cast a little magic spell (typically called 'life', so there's no confusion as to simply recovering consiousness) to pick your mangled body up off the ground, and it doesn't work in the cutscene you're watching. Or afterwards. You can drag 'dead' party members around for days and ressurect them at the drop of a hat, but if someone dies in a cutscene they're gone for good, and forget about raising that dead NPC king who was the only one who knew where the secret treasure room was.

And that brings us back to the challenge of ressurection in games. If you could raise any NPC from the dead who died, towns would no longer be in threat of being destroyed. The baddies would never be any sort of a threat, because all you'd need to do is get strong enough, buy a million pheonix downs, let them wipe all life off the world, and start casting ressurect!

One way to get around this would be to make there be something special about the PCs. They could have special amulets that allow the bodies to be raised if they fall - but most NPCs don't have that amulet (or whatever it's decided to be). a character could be in real danger if that item or trait is taken away, allowing a game to threaten the characters when needed, but make things easy otherwise. But, would it work?

Tuesday, September 29, 2009

See Dungeon Runner Run

Man, I really should have saved that little ditty from my past post for titles, there's a lot to talk about for dungeon runner.

Not only does dungeon runner generate dungeons, Dungeon Runner also randomly generates all the items in the game. And I mean all the items. There are, of course, upsides and downsides to this.

WHen you're randomly generating items, you don't have to worry about keeping things level appropriate. Every item has a stat that is simply multiplied by the level of the item, and the player can only equip items that are their level or lower. Great. In dungeon runner, items typically grant a +1 bonus per level, or twice that for your weapon. This is divided evenly amongst up to three attributes (of your four). It then also gets a secondary bonus for each rarity level it is (common, uncommon, rare, or mythic) that is applied randomly across a score of lesser attributes (like attack speed, elemental resistance, damage reflection, spell damage increases...). The item is then given a random name based on it`s stats (or possibly, the name is generated first and the stats are given afterwards.)

There`s one enormous problem not immdiately evident from this description - what do you call it? Dungeon Runner sticks with it's whimsical roots and gives things names like "overweight greatsword of the angry termite". Great, but what does that mean? You can take a quick glance at items to see their names, but that's now useless. How are players to know without research and memorization that termite is a bonus to intellect and dexterity? At least if it were called, say, clever greatsword it would be more useful. It's even worse when you get into more rare items, because they get more suffixes and prefixes added onto the end. "(warning may cause rash)" or "(size 17)" are funny, but utterly useless and ultimately degridating to gameplay.

Okay, so you finally decide that you want to buy a termite sword now. You walk to the shop, and open up the weapons tab.

Oh look, more random weapons. The weapons shop is not just weapons for you though, each of teh three equipment stores in the game holds random items for thirty levels of characters, meaning if you're level fifteen and walk into the shop, half the items won't even be usable to you, even before you exclude the fact that items only paid users can use about half the items, too. You wind up with a selection of items, probably two or three of which are near your level enough to be useful. Now, you have to cross your fingers that: -One of the items is what you're looking for and that -the shop doesn't refresh before you buy that item, because it refreshes every seven minutes regardless if you're looking at it or not. Sure, that gets rid of some of that poor selection problem, but it can just as easily exacerbate it by taking that item away at the last moment!

And to add onto all that, there are random item shops, where you get to either pay a small amount and get a random item near your level, or pay a large amount and get a random (typically useful) item for exactly your level, primary stat and slot. You still don't get to choose the look though, which can be frustrating for people trying to keep with a theme. Oh, and you can't choose if you're looking for a ranged or melee weapon either. You could just as easily get a bow as a longsword.

Did I mention that on top of all that there's about a dozen different armor sets? Most players take what they get and are satisfied with their character changing in appearance entirely each time they log in and play. Some people, I'm sure, will give preference to one type of armor over another, despite the fact that in the end, everyone should be in heavy armor because it has no penalties and a much higher defence. Sure it looks stupid to be carrying a staff while wearing it, but that's a small price to pay for improved DPS right?

Sunday, September 27, 2009

This is Dungeon Runner

See dungeon runner run.
run dungeon runner, run.

Dungeon runner is an MMO that I've been playing lately. I purchased it about a week before it released the news that it was going out of business. That's unfortunate, but I think I'll survive. I mean, I paid five dollars for the game *and* six month's subscription. I wish I could see how they went out of business with a business plan like that. Oh, and did I mention their server only holds 500 people, total? That's like, five thousand dollars of profit a year, man! Except that more than half their players subscribe to the free version of the game. That means their items are about 10% worse than paid customers. Boy, what value for that money, huh?

Obvious business plan flaws aside, Dungeon Runners is a pretty fun game. It's light-hearted, erring on the side of ridiculous, and looks nice, plays inteutively and so on. Did I mention that the dungeons are (kinda) randomly generated, too? All the better.

Dungeons in dungeon runner follow a few simple rules. There are eight floors, divided into three sections. Upper, lower and boss. There are also six sub-areas off of varying floors, two off the upper and four off the lower. Each group (upper, upper-sub, lower and lower-sub) has a different theme. Undead, blizzard, fire, standard dungeon and so on. Each theme has several variations, and overall it's not too sore on the eyes. They're then mapped out by taking a number of puzzle-piece like pre-generated areas and randomly sticking them beside one another until it's about half an hour to cross from one end to the other. It works out well for them.

There are four different classifications of monsters I've come across so far. Whiskers (rat-men), Oroks (orcs and ogres), Fade (undead) and mutants. Each of those groups comes in about six units (discounting bosses) and each unit comes in one of the six major elements. Typically a particular floor in a dungeon will contain either one type of enemy, or one element of enemy. There's a few problems with this, namely that you will either see hundreds of the same enemy on a given floor, or you will have to have many different elemental attacks ready making your play rather like a game of simon-says involving far too many healing potions.

You play through the game, completing quests for the various silly NPCs around the main area, unlocking a new dungeon every ten levels or so. It's a fairly good system. If not for the silly quests though, the game would get old fast. Now that the game is ending, you get five times the experience you would have otherwise. That means you can blow through a half-dozen levels in an afternoon, rather than one. Not that it matters. All levels matter is what skills you have available to you, and which enemies give you experience points. I'm now thirty levels too high to gain experience points in the first dungeon, but I still encounter swarms of enemies that force me to use healing potions, and enemies I can't kill in one hit. What's the point of being so powerful if you don't actually get stronger?

Despite all my nitpicks of the game, it does have a je-ne-sai-quas that makes it fun. Or, fun most of the time at least.

Monday, September 21, 2009

Randomly written story

Some undetermined length of time ago, in some undetermined place, some undetermined entity did some undetermined thing which ended up creating a dungeon.

Generating a story out of nothing is something that is easy to do at a most base level, but very difficult to do at a complex level that the player is likely to care about. Anyone can throw together a random plot generator with a few set paameters. After all, attacked the king, and fled into the . That makes a compelling story, right?

On the king's corination two years ago, your father built a great vast dungeon. The dungeon was built on the other side of the river, to keep for himself the alchemists stone. Unfortunately, for him, your evil twin located the dungeon, just yesterday.

With more variables, like my opening line, you can wind up with some interesting permutations of plot. But what does the player care if it's not going to affect the game? You could add in random snippets of plot and paste them all together, perhaps even generating a great fantastic tale. But the player is there to play a game, not to read a book. If they skip the story sections will it affect the gamepla any? It should, if only in little ways.

Long before you were born, a long ago king built a great vast dungeon. The dungeon was built just over the mountains, to seal away a terrible evil. Unfortunately, for them, a disloyal knight located the dungeon, just A few days ago.

Obviously, the villian I noted has to show up somewhere in the dungeon. How long ago determines how deep in the dungeon he should be. The builders of the dungeon should affect what the dungeon looks like, archetecture wise. How old the dungeon itself is should affect what sort of monsters have moved in. Newer dungeons should have less of a veriety of monsters than an older one that's had time for different monsters to move in and out, lock more doors and so on. And most importantly - the purpose for the dungeon should be what gets discovered on the last floor.

A few months ago, a lost civilization built a great vast dungeon. The dungeon was built not far from the castle, to seal away the fountain of youth. Unfortunately, for them, a murderer from a thousand years in the future located the dungeon, just as you are reading this.

Furthermore, each important randomly generated aspect of the dungeon should have *things* in the dungeon to relate to. Crumbling rooms for old dungeons versus unfinished ones for really new ones. Alchemical labratories show up in a dungeon designed to hold the alchemists stone. Magic circles show up in dungeons holding back a terrible evil. You get the idea.

Some short time ago, an evil DM wrote an article on randomly generating stories. The article was posted on a blogging site to open it to the public. Fortunately for you, you just read this article.

Wednesday, September 16, 2009

Havok and Chaos

So, I mentioned that I had started a new campaign on this website I'm part of. It's just gotten off the ground a few days ago, and so far it's going well. The characters are already out of their cells and it's only been what, thirty seconds since the guard slipped and hit his head? They're very resourceful.

Which is encouraging, because I don't actually have a plot for this game beyond the first castle. I have a plot for some good guys to come chasing them after, but at the moment they have to make their own goals. Some players are good with this, some aren't. Many players simply wait for a prompt from the DM before they take *any* action, let alone one that progresses the story.

In Havok and Chaos, I'm going to have to get creative, because at least at first they won't have any NPCs friendly to them. I'll have to dig through the character's backgrounds, find their motives, and build their story around it. How exciting.

Saturday, September 12, 2009

Real Dungeon Design

In order to properly build random dungeons, you have to understand the way that real dungeons are built up. And in order to understand how real dungeons are built up, you have to know what they were before they got filled with monsters.

Probably the most obvious one is the abandoned temple. However, the contrast between a real-life temple (or even one not yet abandoned), and one where monsters are crawling about is pretty staggering.

Real temples (take a church for instance) have one main area of worship. This is typically almost as soon as you come in, funnels as much traffic from the entranceway into it as possible. There are a few side passageways that occasionally connect and have a few small side-rooms off of each of them. That's about it. If you look at one designed to be a dungeon, you have to climb down three ladders, and walk down a hundred feet of corridor to get to the main altar way in the back. On the way there are dozens of branch-off passages each with one or more rooms, but none of them have obvious "main altar this way" signs. Most of the passages are even the same size!

Okay, it's more interesting like that, but less realistic. Is there a middle-ground? Of course, and while it requires just a little bit more work, it also produces far better results. Take a look at the map below.


This map could have been a real temple. One main entranceway, one main passage to the main altar, several smaller walkways to side rooms. Perfect. How does it make a good dungeon then, if you could just walk in and get to the biggest room undoubtedly holding the baddest guy? That dark grey circle in the middle. That represents a cave-in, and the main passageway is blocked from all sides, so you can't just stroll straight in. You have to take a side passage around the main walkway, entering about half the rooms in the dungeon and work your way to the other side of the rubble. It looks like a real place, it acts like a real place and it took one single grey circle to make it a good level, rather than just a real place.

Now that you have a basic design, you determine room use by location. Those mid-sized rooms right before the end? One's a bunk, the other's a mess. The small ones near the front? storage. The funny shaped ones around the side, library and kitchen. The more used and desirable a room is, the more it goes near the other desirable and used rooms. Thus, the food and the sleep go beside the worship, but the place to put all the extra mats for the ceremonies is further away (although you could put a closet nearby, containing treasure...). And the basic design is done. You can fill it with whatever you want, be it orcs and wizards, to a dragon and dopplegangers. What it was is set and now it just has to be a place for players to go and kill monsters.

Tuesday, September 8, 2009

PC of the living dead

So, I'm working on a new DnD campaign. It's a mid-level evil campaign where the characters are starting by breaking out from prison. That's not quite so important, but one of the characters applying to join the game has the ultimate goal of becoming a lich, which is a great goal for an evil campaign, right?

But what about the other characters? Liches are strong creatures, and when one becomes a lich, there's essentially a four level increase in power all at once. The other players alongside this character have to either get a similar increase in power or deal with an inferiority complex for a few levels. Both have some serious issues.

Becoming a Lich takes some time in-game, so let's say that the character goes off for one adventure to do this, while the other characters adventure. What does the player for that character do? Does he go away while the other characters gain *four* levels? That could be months! So, that's not really a plausable option. Does he play with nerfed powers? That's probably a good idea, although it won't be as fun for the player who now has to wait through even more time in order to complete their transformation. Why spend so much money to have to wait so long to actually get the bang for your buck.

So, we give the player all their powers after, say, one missed session. Now, the other players are four levels behind, give or take. Everything everyone does is incomparable to what the lich can do. He outcasts the casters, he soaks up more damage than the meatshield, he is more effective sneaking around than the rogue. So the other players need to gain power to match. Do they gain four levels to catch up? Then the lich suddenly feels gipped - he just sold his soul to gain power, and now everyone else auto-magically catches up to him for free. Same issue with items, either the Lich has to get a share of some way-overpowered treasure (making him even more powerful), or he'll be gipped. You could potentially squeeze it in while he's off becoming a lich but that'll still be taking from him one of the best bits of becoming the lich in the first place - power.

The best solutions I can come up with are these: Either the player has to spend levels as he approaches lichdom and slowly gain the power it would bestow. It requires building a several-step lich class, but that's a small amount of work for the pain you would otherwise be inflicting upon yourself. The other option is that lichdom requires a sacrifice of several class levels to do so. The player would have to take the option: lich power, or class power. It's not a bad option but it cuts down a lot of things the player's worked for for a good while.

Anyone else have an opinions?

Thursday, September 3, 2009

Four walls

Clearly I had no idea what I was talking about when I said starting a blog was the hardest thing to do. Coming up with things to talk about in a development blog when development is sluggish - that's what's hard.

Recently I've added roofs to the rooms in my dungeon. Before a player enters them, they are dark. After a player enters them, they're bright. Hurrah! Right?

There's a few issues this raises that aren't immediately obvious. Items in the rooms are drawn after the rooms themselves (that is, the room is drawn on the map, then the items are drawn in the room). Since the roof is part of the room, and not an item in the room - what do you do with all the items? Do they dissapear? Do they only generate when you enter the door? How about things that move other than the player entering a darkened room? The best solution I can see with the engine I have is to simple not draw any item that's in a room that hasn't been discovered yet. It'll be a little more computationally intensive than, say, keeping each room as it's own object and going from there. (rooms are collections of coordinates, see.)

The outside, of course, will have to count as a room too. Otherwise there might become strange logic as to things not being in a room - although with my code the way it is, things don't care about rooms or not, yet. Hell, they don't really even care about walls. But the outside has to be made a room just for carefulness's sake.

But now is the big question: walls.

Why are walls such a big issue when I'm drawing the rooms? Because you shouldn't be able to see them when you're walking around outside the building - you should only be able to see the walls once you've got inside. So, walls don't appear until you've entered the room. Great, the building will look like a big black shape on the map, because we now aren't drawing *exterior* walls. And If I start to keep them in their own buffer, what about when I draw a funny shaped building? What if I want to change the code to add more rooms on?

Sigh, times are tough...

Wednesday, September 2, 2009

Non-Player-Characters

No matter how much effort you put into your world, the player will only see what is on the surface without some method of relaying information to them. Sure, you could provide the player with a library of documentation, but that gets dull, and there's little way of guiding the player away from things they don't need to know until later, and things they might want to know now.

Enter the NPC, or non-player-character. This title officially covers anything in the game that can think, but isn't controlled by the player, although it's come to be a term for only friendly characters the player meets along their route. Evil characters are villians, anything that attacks you is a monster - or perhaps a boss. They're not considered an NPC until they shake your hand and say something to you.

In a video game, most NPCs typically have one, and exactly one, peice of information to give the player when prompted. You have to wonder what the player asks to get such varied responses from people all over the world, "What's going on?" perhaps? Regardless, the information almost always remains static throughout the game unless something signifigant happens in the area, at which time the information changes to that NPCs comment about the event.

NPCs are usually used to say something about the current point in the story and the current area the player is in. An NPC in the castle might say "Sigh, times are tough." An NPC in the forest might say "The green snails are plentiful this year." They provide you with a little window into the setting that the player wouldn't otherwise get a chance to know. Most of the information isn't useful, but it's interesting for the player to know. Sometimes what they say is important, but that's not quite what I'm talking about here.

While this is an essential window into the world, there is a problem with it. Once an NPC says the same thing twice, most players won't talk to them ever again. To make the NPCs more lifelike, more dynamic in the world, there needs to be a list of things for them to say. This can be drawn from a pool of tidbits about the current point in the story "I hear the volcano in Maxitone errupted", information about the area the NPC is in "granny makes so many pies now that the apples are ripe, anyone can get one", and a few that could be used for any NPC across the world, "My feet are sore". This lets the NPC, with little extra effort, suddenly becomes interesting for the player to listen to more than once. But, there has to be a balancing act between interesting and repeating. If the NPCs always have something new and interesting to say, the player's never going to go and save the world, they'll spend all day chatting in town!

Friday, August 28, 2009

The obvious choice

If you've been paying attention to my blog so far, you probably figured out what I'm planning on working on for this game design competition. That's right, my dungeon crawler.

Sure, there are dozens of dungeon crawlers out there for every day or every month, but as was my original goal with the tinygame, it wouldnt just be a generic dungeon crawler. It would be an infinitely replayable dungeon crawler with charm. It's a bit of a high goal, and I might not succeed for the game design competition, but that's what I want.

The first thing I need for the game design competition is a story. And how do you make a story in a 'generic' dungeon crawler interesting? Why, you make it as procedurally generated as the dungeon of course! Which lends me to the topic of procedureally generated stories in the first place.

One of the few games I've played with procedurally generated stories is Daggerfall, Elder Scrolls II. When you went to a guild and asked for a quest, it gave you a random reason to go to a random place and kill a random thing. Sometimes this was as simple as " got into house. Go kill it." Other times it was more complex, " broke into the guild and stole . We've tracked it to , go and kill it - and take back our stuff."

It was really simple, but it kept the dungeons - which were rather ridiculous in their own random generation - and the quests themselves nice and flavorful in a world that woiuld have otherwise been extremely samey. I want to implement a similar thing, but since my world is goign to be a much smaller scope, so my story behind it doesn't have to be painted with such broad strokes. I can talk about the creation of the dungeon and it's history, I can make the villian more complex than just a random monster. And most importatly, I can make the story the player discovers as he runs through the game different enough that he might want to play through it more than once.

Thursday, August 27, 2009

Mainstream

When thinking of the theme 'explore' the most common idea thrown about is that of a simple point and click adventure. You have a screen in front of you, or several to navigate around, and you click on things until you accomplish an in-game-goal. Like escaping a room, or finding waldo.

This was the second-to-last exploration idea I came up with, and while I like it, it's far too generic by itself to be worth anyone's while. There are thousands of room escape games out there, many of them good, many of them terrible for one reason or another. Poor execution, pixel-hunting, and puzzles with convoluted "space-logic" are the worst killers, especially that last one.

There are some great examples of the genre, though - and most of them are in the genre of where's waldo. Finding one object amid a sea of random obstacles can be great fun, or matching the differences between two concurrent storylines - which has become quite popular lately.

I didn't like the idea of just looking around for one object or another anyways, even ignoring the fact that it would take forever to draw all the art. Although where's waldo reminded me of a comic, and that comic co-starred carmen sandiego, which I think is to this day one of the best games that has ever touched on the topic of exploring.

In the "Where in the world is carmen sandiego" game, there is a random crime in a random city in the world, caused by carmen or one of her lackeys. You have to gather clues by travelling all around the world, and catch the villian before time runs out. It was executed well, it was fun, and it had replay value. But to be honest, I didn't think of this until after I started the game for the final idea I had in regards to the explore topic - although it might be a worthwhile idea to look into later.

Wednesday, August 26, 2009

Exploring the theme 'Explore'

After contemplating the maze idea for far too long, I realized that it would be way too hard to do properly within the time frame. After all, it's not a concept design competition.

So, I went looking for inspiration, and came up with a few more ideas. The next one was a text-based adventure. More of a mental one, it would be about exploring your mind, to come up with the answers for life's bug questions... or something. I didn't get very far before I gave up on this one, too. I didn't have any really good topics to 'explore'. I'm sure that with a good idea, someone could build this up, but not m right now.

The next idea was inspired by one of my favorite sites, Squidi. Exploring your memory, once it has been lost. Basically, the player wakes up with amnesia, and has to figure out what's going on. He discovers quickly that there was some crime he was involved in, perhaps even being framed for, and he has to discover who really did it. As the game progresses, the player is able to go back and dreg through the character's memories, as well as travel around the present day. Finding things in the persent day make things available in your memories, and memories unlock the ability to go places an talk about things in the present day. Squidi's twist was that as you walk around your memories, things that are there but you do not remember the signifigance of appear as static. That's a really clever way of showing the player the things they still need to remember within the memory.

Exploring your memory and travelling back and forth would be a really interesting game, and it would perhaps be the most successful if I could come up with a plot for it. But plots are hard. Villians? Motivations? Locations? Names? And all the art for everything.

That's ultimately what put me off this idea, the art required. I'm not very good at art, and producing a lot of it, especially the same character in different poses, is something that is simply beyond my skills. If I was working on a team, then perhaps ths idea would be plausable, but for now, I have to move on to different ideas.

Perhaps procedurally generated content would be a good place to start?

Tuesday, August 25, 2009

Jay is Games

So, there's a game design competition just starting at Jay Is Games. The theme? Explore.

When they originally suggested explore as a topic, there were a lot of ideas that came to my mind, none of which were what the public was afraid the competition would be full of.

My first idea was a platformer game, and the idea was based around a really badly designed maze I played about a year ago. Basically, you would be given some arbitrary, and more importantly impossible goal. The impossibility of the goal isn't immediately apparent, because any game can say 'find the boss' or 'collect a hundred coins'. Obviously, whatever is needed to access the end of the game is absent - the last coin, the key to the boss door, whatever. It is also important to have the game be extremely maze-like and moderately large. One-way tunnels are great for this. The goal, of course, isn't to have the player actually complete the goal you set for them, but in fact for the player to draw a map of all the different routes they could be taking. This would spell out - if it were done correctly - a code phrase, or even a world location that they would have not have been able to decipher without a map.

But there are a number of difficulties with this particular method. The biggest difficulty is the fact that the actual goal is different from the goal stated. Not all players - in fact likely very few players - will even realize the secondary goal, even if hinted at subtly. Most players would likely stumble around without a map until they got frustrated, then leave and say they didn't enjoy it - and that's the opposite of good design. There has to be a deliberate mechanism to encourage the player to make the map. The second difficulty is the lack of reply value. Let's face it, once one person has beaten the game and let everyone know that the secret is the code hidden in the map itself, there will only be a few people who continue the game, and nobody will come back to it once they've beaten it themselves. The last difficulty is level design. How do you build a game whose map contains an obvious message for the player drawing the map out, but has the message - or even the fact there is a message - hidden from those who aren't drawing that map. Have it be really big? Have the paths between areas be the letters? Only display the points, and have the players connect the dots? ... actually, that last one's proven effecive in Kingdom of Loathing, but again - once one player picks up the trick and lets everyone know - it gets redundant for others to do the same.

The next idea I had had, was actually an offshoot of this. What about doing the above in the dark, using a flashlight? The message is written on the floor spread across all sorts of different areas, but the sections of the letter won't appear until you shine your light on them. It's another neat idea, but the idea of programming a flashlight in a maze is daunting for any programmer. It still has almost all the same problems, too. No replay value. The message is either totally obvious, or completely abstract. Intensely complex maze design required. Clearly, this particular idea isn't going anywhere.

Time to move onto the next idea.

Monday, August 24, 2009

Choose your own adventure

Branching stories are occasionally chided for being unrealistic becase of the limited choices available to the player, versus the number of real posibilities. Why can't I use the sledgehammer I'm carrying around on the locked door? What am I really supposed to be doing?

In my game at work, email conversations are essentially choose your own adventures. You're presented with a problem and a number of solutions (typically two) and proceed. The conversation is recorded as it happens, and at the end you've either successfully accomplished your goal based on your responses, or you haven't. It's one of the few situations that I feel branching stories actually work well.

When you're at work, you typically only have a small number of actions, like do the work yourself or delegate the task to someone else - so having only the options "Tell her to go ahead" and "Tell her to meet with the team first" is actually plausable. You don't have to worry about many different plausable options, because you're not doing estranged problem solving, you're balancing efficenty of what you think is happening against efficency of what you're asking to be done.

Plausability is a very important thing in games, beacuse of the all-important suspension of disbeleif. Once something starts happening that forces the player to step away with a "huh", they lose the world you're trying to immerse them in. When you fail to present an option that a player would think is plausable, they stop reading, playing and having fun. That's catastrophic.

Saturday, August 22, 2009

realistic responses

In the game I'm working on for work, we attempt to simulate a real social network in a real company. There are a number of characters, several of them canadian, several of them not canadian (this is important, because it's a game about how immigrants are different from canadians in various important ways).

There are a number of challenges therein, some of which I had a hand in helping to solve, some of which I did not. One of the biggest challenges was making these characters in the game feel like real people, rather than just props - which they ultimately are. Backgrounds for the characters were crafted, resumes written, and personal photographs created, but what really gets the player involved with the characters is the conversations with them.

There are two types of conversations that exist in the game, chats and emails. Chats give you insight to the character's lives, allowing you access to their thoughts, feelings, and backgrounds. It also helps you build trust with them, which opens up more conversational opportunities, which allows you to learn more about them and so on. Depending on where you chat with them, how quickly and how deeply, determines your untimate success in the entire game, because later-game decisions need to be based on information you uncovered in these early chats with your in-game coworkers.

Emails are more work-centric. They involve your projects, the different teams, who's in charge, and wind up affecting how effectively the characters work - which is also important when you're attempting to be their manager. Good decisions in the emails leads to good results, and bad decisions leads ultimately to poor results, just like the real world.

But the point of making this game so realistic isn't to amuse people, unfortunately. It's to show people how different people are in canada than people from elsewhere in the world. Asians are very group-centric - and it reflects in everything they do - while americans are self-centric, looking for personal rewards and praise, unlike most immigrants who would prefer the team be rewarded even if much of it was their own effort.

Which do you prefer?

Friday, August 21, 2009

A whisp of Smoke

Shadowkin, also called shadowlings, live near the equator of Ronar in the jungles of Grittlanni. Their race is clever, quick, and not entirely solid, allowing them the opportunity to pass through even the tiniest crack - though it requires sufficent concentration and energy to do so.

Shadowkin appear to be black-skinned humanoids with long thin fingers and a beaklike mouth, and feathers for hair. They are shorter than humans, and take well to both water, and magic. They do not easily speak the same languages the other races do, and as such are a virtual unknown across the rest of the world.

Adding to that, the devestation of the race during the ancient age of magic, they are not as advanced as a society as far as any of the other intelligent races, opting for a more tribal way of life, among the creatures and trees of the jungles.

Thursday, August 20, 2009

Short and hairy

As elves are to Torin, so are dwarves to Unofotine. They fill the role of short, hairy men that live mostly underground, and they keep great pride in their work - and for good reason.

Unofotine were created at the same time as the Torin by the god of challenges. They were placed on a desolate rocky continent and forced to eek out a living from the rocks and their own two hands. As such, their simple survival as a species gives them a lot to be proud of, and they are feircely defensive of any member of their own race. They dug down to escape the harsh sunlight, building first caves and warrens, then a grand civlization. Hundreds of years after burying themselves underground, they spread out to the surface again, now prepared for it's dangers, and ultimately to mingle with the other races and the rest of the world.

Unofotine would average five feet were they to stand straight, but their lives underground give them hunched postures, and with their hands and forarms evolved with thick bones and long talons for digging through the ground they mildly resemble gorillas, although in face and temperment they would more likely be likened to bears. The claws at the end of their hands make it difficult for them to use their hands for much delicate work, and they have developed only the crudest written language.

They are not craftsmen of fine and delicate things, but of great and rough things. Caves, magic stones, occasionally armor or weapons, and mostly buildings. They are great architects and tireless laborers, but their services are not cheap - they enjoy the labor of the more finely-fingered races for delicate workings. Still, they mostly stay to themselves when they can.

Wednesday, August 19, 2009

Tree-Huggers

In Ronar, Torin fill the place that Elves fill in most fanasy worlds. That is, they are more magical than humans, taller, have pointier ears and are more in touch with nature. However, that's about where the similarities end.

Torin are tall and lanky, with large catlike ears extending out the side of their head and a thin layer of usually tan fur covering their entire body from their ears to the tip of their tail. Well, of course they have a tail, why wouldn't they? They are based after jungle cats, afterall. Males tails are thicker and typically used for balance when climbing through the trees, while females tails are more dextrous and can even be used to hold more delicate objects like a quill or a sword.

Unlike Human villages which sprawl out over a countryside, Torin villages are built much more vertically around large trees, and occasionally lack many walkways between the structures at all, the Torin leaping from branch to branch with ease. While the cities of all the other races are accessable to most of the other races, most of the Torin cities are inaccessable, merely due to their design, adding to the race's desire to be left alone by the other, more destructive races.

There are a lot of paralells obvious between elves and the Torin, but the idea was to make them familliar enough to the player that they would be comfortable with them, yet different enough that they would be curious about them. I may still have some aspects of Torin society that need to change to make them interesting enough, but I think this is a fairly good start.