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.