Wednesday, June 23, 2010

It puts the treasure in the dungeon

Rewards require several things before they are actually rewarding. They are required to increase something, somewhere - be it your score and sense of self value, your stats, or simply a counter saying 'treasure collected'. They also need to have some sort of challenge to attain them. This challenge can range from the simple 'wait ten seconds to claim treasure' or 'overcome this specific challenge'. The quality of the reward is usually matched to the difficulty of the challenge. Make it too rewarding and the reward feels cheapened, make it too challenging and the reward feels lacking.

Overcome a challenge, get a matching reward. It's a simple formula, and in a game you're planning out ahead of time it's a simple matter of putting the challenge in between the player's starting location and the treasure.

In a procedural game, it's a lot more complex than that. You don't know where the treasure is going to be located, and you don't know what the map is going to be. You can't assume anything.

Currently, there are three types of treasures, ground, monster, and trap. ground is pure reward, and monster and trap are both challenges. Logically, I'd be most likely to create a good challenge to reward ratio. But it's not just as simple as choosing a floor, piling treasure on it and moving on. I have to keep track of when the floors don't connect all the way, or when there are multiple branches. The monsters won't be in the way, if they're in the shallow dungeon to the left, and the treasure is in the deep dungeon to the right.

I have no current plan for how to deal with this, but I'll let you all know when I do.

Monday, June 21, 2010

Loot!

The goal of every game, on some level, is to collect stuff. In herocrawler, that goal is no different, and in fact the primary goal of the little delvers in the world, to collect all the treasure.

The laws to do so are fairly simple. Every hero has a number of types of treasure they want to look for. Delvers look for loose treasure, monster hunters look for monsters, thieves look for traps. They generally ignore one another's goals, but the goals don't always ignore them, though I'll get to that in a moment.

Beyond a 'type' each treasure has two numbers. How valuable it is, and how much it weighs. Each delver can only carry so much treasure at a time (why you may need all eight heroes), and when they hit their top load, they climb out of the dungeon and move on. The more a treasure weighs, obviously, the few other treasures the character can carry at once, and the more it's worth.

The three different primary types of treasure so far all haev different rules regarding how they act when players move past them. Ground type treasure, which is picked up by delvers, is ignored by the other types of heroes. Traps have difficulties and dangers and while thieves are immune to them, non-thieves have a chance to trigger the trap and take damage based on their stats. The higher the stats, the less chance they have of tripping it, and the less damage they'd take if they did. Monsters are similar to traps that always trigger. I'm planning on, but haven't implemented yet, an equipment system that allows the characters to wear armor and equip weapons that will allow them to boost their 'do damage' and 'dont take damage' stats.

The next question falls to where in the dungeon does the treasure get placed, and I'm still working on that. I'll post up my thoughts on it later.

Sunday, June 13, 2010

Crawler Dungeons

While I'd like to start with the character and player classes, I'm going to start instead by talking about what's already done. Basic dungeon generation.

I've actually already worked out a lot of the kinks in the system, so I'll talk about the problems as I'd seen them.

Firstly, I know the top floor of the dungeon is going to be the ground. I'm going to be adding above ground 'building' dungeons too, but they're not ready yet. Anyways, the top floor is the ground, and there are three types of tiles. Floor tiles the character can walk on, wall tiles the character cannot walk on, and ladder tiles the character can walk across, and also climb up and down. Simple.

Really, what this is is a conditional type of simple maze. When a hero looks for a treasure, they calculate all the paths based on moving left and right or up and down, then they go to it. there's less need for the algorythm I wrote now then there originally was, but for the moment it's still in there. I might make the dungeons more complex again, though they look far better when simplified.

Pathfinding aside, the first way I generated random floors was to pick between one and five floors at random, and fill in the entire floor as walkable space. Once all teh floors were filled in, for each floor I picked another floor to connect with a ladder. It was a little complex, and it made it possible to have disjointed underground sections. Also, it made it possible to overwrite floors that already existed with ladders as the ladders came afterwards. Sometimes, there were just huge bricks of space with one ladder next to another and it was hell on the pathfinding, as well as looking ugly.

The first improvement I made was changing how I picked the floors. Rather than picking two to five floors at random, every floor is now picked to be one to three levels below the last randomly chosen floor, counting the ground. That allowed for potentially more floors, and no longer were there floors regularly all pressed up against one another.

The next major improvement I made is the ladder creation. Ladders had been previously started after all the floors were made. They would randomly connect from one floor to any other random floor in the dungeon. So, it was possible with six floors for all the ladders to cut through all the floors above it to reach the ground level, which looked terrible. So, I changed the ladder code. The ladders now pick a random X location on the current floor (as they did before) and they go upwards until they hit any other walkable space. This solved both the problems of having disjoined space (no longer can the ladders pick to go to a space below them), but also with the mess of ladders cutting through multiple floors. If that were to happen, it would just result in one floor acting as a junction between the next, and a sort of staircase effect. Overall, elegant I think.

But, it was still boring. Everything was flat, the dungeon floors always spanned every space on a particular level. So, the most recent change to dungeon generation I made was that floors now span a random number of spaces, from three to two less than the map is wide. They're placed randomly across the map, and with natural random staggering it creates a really nice, burrow-look. Some places have a large deep room with several smaller ones below it and a single separate hole off to the side, some are zig-zagging holes where the characters have to walk the whole length of the dungeon to go down a floor. It's really nice looking.

But what good is a dungeon without treasure? I'll get to treasure, it's mechanics and difficulties next time.

Friday, June 11, 2010

HeroCrawler

Okay, I said I was working on a new project, this is it. HeroCrawler. Hero Crawler. Hero Crawler: Adventuring Agency.

The name is not totally nailed down, just close. But, that's not the point here, really.

HeroCrawler is a game with a simple premise. You have a group of heroes under your control, you have a (not randomly, but) procedurally generated map, and you set loose your heroes to collect as much treasure as they can carry from within.

The idea came from, interestingly, raindrops in a game I talked about a while back, Paradise Island. The raindrops fell from the sky, hit the ground, and randomly moved left or right each time they struck, until they enter the sea, or a pool.

So, in a similar style, the heroes arrive, and descend, but unlike the raindrops they both know where they're going and then come back up afterwards.

Unlike Tinyworld, this game has a defined ending. As you collect all the treasure from dungeons across the world map, your party gets stronger, eventually strong enough to conquor a super dungeon. The specific goal of that dungeon is still in the air, but there are three sub-goals, one of which is defined as most important at the start of the game. There's collecting an artifact, conquoring all the map, and... probably amassing a certain wealth. Once those are done, you get legendary hero characters related to those quests. The most important one of them actually unlocks the final dungeon, and when you beat that dungeon you win. Probably there's a specific evil monster at the bottom of the dungeon - though that goal isn't decided yet either.

I've got a good chunk for the game ready already - I'll be talking about that as I get even more on it done. Sounds awesome.

Tuesday, June 8, 2010

Desktop dungeons

I played another almost-procedural game today, Desktop Dungeon. It's a little game, very pared back to it's basics. You are an adventurer with a race and a class in a dungeon, you start at level 1 and your goal is to beat the level 10 monster.

I haven't managed to beat it yet, but it's a fairly simple little ditty I should be able to, the biggest problem is that I haven't beaten it yet.

Now, some would say that it increases the difficulty factor if you know you're not going to win all the time. But in this game it's not 'not winning all the time' it is 'you only win one in ten games' more-less. It's all at the whim of the RNG, because of the locations of the monsters and the mechanics of the game, there are hundreds of ways to generate impossible scenarios, and only a few winnable scenarios - even then you have to know what you're doing.

The map is linear, literally. You start off iwth a solid 2d space, and start drawing straight lines through it. When you wind up with no wall thicker than one space, you go to monsters.

Monsters are roughly one for every four open spaces in the dungeon, or maybe every five or so. There's a lot of them, and with most of the space linear corridors, that means you have to fight through one monster after another to explore. Okay idea, but where the problem comes in is monster levels. Each monster is assigned a level from 1 to ten, with only one monster being level 10, and more of each level the lower it gets. But just because there are lots of level 1 monsters doesn't mean they're based near you. Or even after you beat them all you'll have enough EXP to fight the level 10 monster. Some games, you'll start trapped in a hallway with no exit but to fight a level 6 monster. There's no fun there.

I think the game is good, but not great. There are lots of things that could be improved upon, especially regarding the dungeon generating. if the monster's strength was based on where it started relative to you, you automatically drop out most of the unwinnable scenarios, only leaving those where there's not EXP to be had on the map.

More on this later though, I just wanted to give you guys something to read.

Saturday, June 5, 2010

Coolest cave design method ever,

http://roguebasin.roguelikedevelopment.org/index.php?title=Cellular_Automata_Method_for_Generating_Random_Cave-Like_Levels

Whoever said the game of life was just a game, huh? It's a frigging life-based random level generator.

Thursday, June 3, 2010

Blog? What Blog?

OKay, okay, I've fallen behind in posting. I know.

Recently, I've come to the realization that tinyworld is a good idea, but without having planned things out in advanced, the code is becoming more and more, well, dangerous. I love the progress I've made, but I think I'll leave it as it is, a super simple dungeon generator with a little dude to run around. If I ever want to build it again, which I'm sure I will, I will absolutely have to plan things out better in the future.

But, that's not the end of game projects from me. I'm still working slowly on Ronar, I've also been working on a choose-your-own-campaign The Genesis Gauntlet. It takes a few weeks for each adventure, then there's testing and playing, and finally release. Release, you say? Well, it's going to be run for Comminuty Supporters over on a website I'm part of, www.dndonlinegames.com

I've got another procedural game in the works, and I'll start talking about that shortly too. More pressing though, I'm starting up a Pathfinder Campaign.

I love what pathfinder's done to the OGL d20 system, and while the existance of the super-bard orginization reeks of product placement, the system is otherwise polished to a near mirror finish. Which is awesome. You'll be hearing more from me on that, too.

Tuesday, May 25, 2010

More dungeons in the sky

Great Dungeon in the sky is a lot of fun, and a really well made game. But that won't stop me from picking it apart - that's fun too.

The first thing worth noting is the balance of the weapons. In GDIS every character has zero to three weapons, and every time any weapon is used, you get a delay until you can use any other weapon again. So, if you fire off your super spell, you have to wait ten seconds before you can hit something with your staff, but if you use your staff, you only have to wait one before you can use your staff again. There are four broad types of weapons, melee weapons, ranged weapons, spells, and other stuff.

Melee weapons recharge relatively quickly, and generally hit whatever is in front of you for a small amount of damage. There are a few exceptions, charge for instance has a really long recharge time but also knocks someone back. And peck has no recharge time at all, but never does more than 1 damage. As enemies typically have 25 health, that means you have to be really fast with your fingers to make it effective, but it can be.

Ranged weapons are slower than melee weapons, but have the distinct advantage that you aren't right next to what you're attempting to kill. As every attack in the game acts a little differently, you'll have to understand how your attack is going to move before you rely on it. Bows usually fire in arcs, bullets fire right ahead, and rays shoot based on how you're moving, and bounce off walls.

Spells are more varied than other things, but follow the same sort of rules. They can fire off multiple projectiles, restore your health, paralzye an enemy, summon a monster, go invisible, change your shape or a lot more. Typically though, all spells have a long recharge time, five to ten seconds. I'll get into why this is a problem in a moment.

other stuff is exactly as you might guess. Things like putting up a rope, dropping a bomb, super jump and, er, making toast. They rarely do damage on their own, but are useful in other ways. there are areas you can only access by super jump or flying, though. their recharge rates vary, but are typically fairly long.

After playing the game for a long while, I've decided that the best thing to use is melee weapons, as the recharge rate is the lowest. enemies will attack fairly slowly, so if you're quick with your fingers, you can kill things before they have a chance to hit you, and you can hit multiple things in one swing to boot. the best melee weapon is the staff, as it hits for 8 damage, twice, and only has about one second of recharge. The best ranged weapon is shock, because it seems to do the same amount of damage as every other ranged attack, but recharges slightly faster. It's a ray too, so it bounces off walls and you can aim it downwards to shoot at monsters below you. The best spell is healing, which isn't much of a contest because it's only got a five second recharge time, and nearly all other spells don't do half enough damage as to be worth their weight in salt. ten seconds to wait after shooting three 8 damage rays (two of which are into the air - where no enemies stay), when i can do twice as much damage in one second with a staff? I don't think so. The best other ability is... well, I haven't found one. Then again, now that I've found someone with flying and a staff, I hardly need to be able to jump extra high.

That brings me to the other factor in the characters you select, their attribute. Most characters don't have any, but some do. They include fast, slow, flying, strong to fire, and no combat. While the other options make for a more challenging game, you need flight to actually unlock a bunch of the content - so there's no real point in picking any attrubute other than that until after you've unlocked everything. Especially, because that means you no longer have to worry about all the tricky platforming bits. Okay, sure they're fun, but as I've said there are something like a hundred levels, and missing the same jump thirty times flight is glad to have - it's just being able to jump even when you're in the air.

the best character I've found is the birdman tribe leader. He flies, has a staff, and a three-ray spell. there are a lot of other good options, all depending on your play style, but strength wise it's birdman tribe leader, all the way.

I’d also like to put props to the music in the game. I normally play games without music, as I play most of my games in a room with other people and they get annoyed, but the music and sfx in the game are wonderful. There are a half-dozen tracks that shuffle so you never listen to the same one twice in a row, and it both fits in with the game wonderfully and loops perfectly. I’m thoroughly impressed.

Friday, May 21, 2010

Great Dungeon in the sky

Hey guys, I haven't dissapeared, I swear. I'm working on some other projects, but until I actually get a goal figured out, I want to keep it quiet on here.

For now, I'll just talk about another more-less procedural game, the great dungeon in the sky. It's an online flash-based game, too. Which is awesome.

GDIS, put into one sentance is a platforming game where you select one of... oh, about two hundred characters each with around three of... about five hundred abilities and run through... about a randomly generated hundred levels. That's a lot of content!

What makes the game so fun is not that you have so much selection, but in fact how that selection is unlocked. In order to play as a particular character other than the starting ten, you have to defeat him in one of the maps. Not so hard, until you consider that with three hundred characters that's a lot of guys to look for.

There are a handful of map types, each with a particular pattern. There is a small cave to the bottom left, a series of collums to the top right, and so on. each map is different and difficult in it's own way, some moreso than others.

Each map also has a number of spawns, each of which can spawn one of a certain number of creatures. For instance, in one map you start off facing against an animal over a hole in the ground. This animal is randomly selected from the twenty or so in the game (every one with a unique sprite, too), and that's what you see. Then you drop down to a random selection of orcs, then you fight your way through several mages, climb the stairs to fight a ghost, and the level is done.

No single level is too long, you can run through a level in three minutes, but each of those encounters can be fatal if you're not careful. One of those orcs might be a shaman, who can paralyze you - and then the warriors can take their time cutting you to bite-sized bits. The ghost might happen to be a strage cube of redness, and transform you into a red cube. It's different every time, but the strategy is always much the same. Get to the end, watch for ambushes, and win. Also, every type of map has different types of enemies in it - one is always full of various soldiers for instance, so not only do you have to survive, you have to fight everything to unlock them.

There are also a few more-secret type areas that are harder to get to, with a more powerful selection of monsters. If you climb up those pillars to the right, you'll reach a small plateau with a powerful monster. If you delve into the cave to the bottom right you can fight a powerful elemental. (okay, fine, except for the citrus elemental.)

But then there are a few even *more* secret areas that can only be accessed by the small group of characters with super-jumping or flight abilities. these characters are more special characters to run across, like the green knight or the baby boy - just fun and challenging to collect them all.

While there could be a lot more to the game - some sort of random map generator would add a little more variety to the game, but I wonder if that'd even be nessicarry. there are enough maps to add variety but few enough to breed familiarity with them, so you never know quite what to expect, but neither are you totally surprised. A good balance as it is.

I'm quite enjoying the game, and you should look into it too.

Monday, May 17, 2010

Rescue: The Beagles

'Rescue: the beagles' is another randomly generated game passing under the guise of procedural. I should go into more detail at some point about the difference between the two of them, but for now, onto the game.

Rescue is a platformer at it's heart, wrapped around a kernel of advertising the inhumane treatment of animals. You know the type, like that game where you clear forests in south africa to grow burgers for mccdonalds and such. The thinly veiled criticism of society as a whole linked arbitarily to a fun little game.

In Rescue, you are given three paths to traverse, one at a time, and your goal is to collect all the beagles. Fairly simple, press up to jump, down to drop through to the next layer, and left and right to move approprately. Space shoots owls at marketing executives for points, too.

The three paths move randomly up and down relative to one another, within certain perameters. The top path is always between one height or another, as are the bottom, and middle restricted in the same way, they never touch. Beagles, enemies, and powerups - ropes, parachutes, and owls, all appear randomly on the right of the screen and move forever to the left. Miss a beagle, it's game over.

Really, the gameplay is simple, and while it's mostly fun there is one real problem. Some of the jumps are higher than your character can survive, but there's no real way of telling which ones short of memorizing the distance you can move. Coupled with the fact that you can move side to side at ludicrous speeds compared to falling, you really have to know exactly how to control your character to actually get a good score.

There are two big improvements that need to be made to this game to make it more than just another advergame. The first would be to remove the auto-scrolling. This would change the dynamic of the game a lot, but mostly it would make it so you're able to actually pay attention to what's on screen at a given time. Frankly, all I know at the rate the game currently moves is avoid big white spots, touch everything else. There's no strategy. The other change is make the differences between the layers more pronounced. When the fall would be lethal, make the ground rocky or something, it's not that hard. It'd stop players from rage-quitting when they;re just abou to collect the last beagle and move to the next randomly generated map.

Monday, May 10, 2010

Self Destruct

Heck shooters, amongst not having a real consistant name within their own genre of top-down ship-based shooters are proably one of the best genres for procedural generation.

Self Destruct takes these two styles and marries them nicely together, creating a nice heck shooter. I've never been good at heck shooters, and they're not terribly common so for those of you who don't know what it is, I'll explain.

Top-down ship-based shooters are ultimately descended from Galaga, where you have a single ship at the bottom of the screen, and waves of various types of enemies descend from the top, whereupon you shoot at one another until one of you is dead. Heck shooters take that formula, and kick it up a notch, where enemies don't fire occasionaly, they fire constantly, and from all directions. Typically, you can regognize a heck shooter by the number of bullets on the screen at once, if there are more than there are ships, that's a probably a heck shooter.

In Self Destruct, you're given simple controls, and a simple goal. Reach wave 250. The good news is that most waves only last three seconds. The bad news is that's because the enemies are shooting down the screen so fast that you need to apply every reflex you've honed over the years to avoid being blown to smithereens in the first few seconds.

Unlike Probability Zero, Self Destruct is procedural rather than random. The guiding distinction? Pregeneration. Ships don't just randomly shoot from the top of the screen, they come in particular waves and combinations of waves. Sometimes you'll see a wave of fodder ships protecting a wave of attackers, sometimes it's a wave of explosives. Sometimes, the fodder ships will be in the shape of a V, other times an X, and sometimes there's just a huge thick line of them. The waves and their contents are randomly generated, but not the specific waves themselves. That's procedural.

Now, the look of the enemy ships were dfferent each time you loaded the game, that'd be awesome.

Friday, May 7, 2010

Probability Zero

You might have guessed, but I've gone on a bit of a procedural game downloading binge lately. The lastest is probability Zero, a prodcedurally generated falling game from a game design competion some time ago.

The idea is as simple as any; you start at the top, and climb down a procedurally generated maze of blocks and foes until you lose, then you get a highscore, rinse, and repeat.

But, at it's heart lies it's true form - procedural generation. One that reveals under closer speculation that it's not procedural at all, but merely random. Which is unfortunate, because the game is fairly fun if not for the few issues that plague it, revealing the crunchy random center that tries to pass itself off as Procedural.

You see, a procedural falling game would base what randomly appears next on what the character's curren abilities are. The enemies that shoot out from under things would wait until you've unlocked the horizontal attack, longer drops would generate more often when you buy the increased falling distance upgrade and so on. But it's not the case. The game doesn't (seem to) care whether you can fall X distance wthout taking damage before it adds it to the map. It doesn't care if it generates two equally likely looking paths, and then seals one off beyond your ability to jump out of the scrolling screen.

Okay, the last one is probably a bug that would crop up in a truly procedurally generated game of the same type, but only because the screen scrolls. Still, there are too many times you simply have to give up and wait to be crushed because the path you chose is one tile too high to jump out of, and has been revealed as sealed off on the bottom of the screen.

The one thing that would reveal the game as procedurally generated instead of random would be the existance of pre-planned jumps. Your character can always move within a certain parameter of speed and height, and while it might change as you improve it's not like it goes outside certain boundries. Pre-programmed jumps are blocks that are in an exact relative location to one another such that a player can jump between them using their expected abilities. Maybe it's one space up and two over, maybe it's three over and two down, these are jumps the player can make if they know how to jump, but they're not impossible, ever. Probability zero has no such set of jumps, it's not designed for the player to fel like they're playing a scrolling game aginst the clock, running an endless gauntlet until you mess up, instead it feels like you're playing against a computer hoping it doesn't generate a too high jump for you to make without getting stunned by the fall then shot off a cliff by a nearby enemy.

So, it's not really procedural, it just pretends to be. Sure, that's good enough for most people who don't know the difference, but maybe that's why it didn't win the contest.

The only other question to ask is, 'is it fun?' to which the answer is 'once you get the hang of it, absolutey'

Wednesday, May 5, 2010

Paradise Fort

Paradise fort is a small downloadable game with much the same concept as the name implies. You build a random island using the generate button, and then you build a fort on it.

The game is a side-viewed 2d platformer type game, and despite it's unintuitive controls (cancel outside of a menu is confirm in a menu, and vice versa) is a fun little procedurally generated game. You start off with only an island, a guy and a pickaxe and you have to defend yourself as long as you can from seagulls, the military, and forces of nature.

Frankly, the seagulls are the worst danger.

The island itself is about twenty tiles wide by ten tall, though it varies, and and the center of it is usually hollow. The ground of the island is made of varying parts of trees, rocks, gold and... coal? These three resources, plus fish you can kill are all you have at your disposal to build a fortress that will defend you for as long as you can survive. It's harder than it sounds.

You use your limited resources to build a few cannons, floors and ladders. Then the milirary arrives, intent on blowing you up. I've never seen such angry balloons or helicopters. Each only takes a half-dozen shots, but they have a variety of weapons at their own disposal as opposed to your fixed 45 degree peashooters. You've got to plan your defences carefully, because if an enemy arrives from the side of the screen you're not expecting, they could knock down your entire fort before you know what hit you.

The contents of the game is procedural, and as you get more resources from blowing stuff up, the stronger type of enemies are more likely to appear, and you're more likely to take more damage.

There are other challenges, like meteors that you can't shoot down and are as bad as bombs, the rain that can flood your fortress and drown you if you're not careful, and the birds that can damage you, knock you about, and your automatic guns totally ignore, you have to kill them by hitting them with a thrown rock. Since the ground is water, they knock you in and you're not paying attention, you're toast.

Monday, May 3, 2010

Dwarf Fortress Builds

Eventually, you set out with your dwarves. You'll jump right into play with a wagon sitting there on the ground, and your seven dwarves milling about aimlessly.

Typically, you drill into the side of a wall, start hollowing out bedrooms, dining halls, workshops and such. Sometimes you have to drill straight downwards because you're on flat ground. On rare occasions, you'll be forced to build upwards because of wet ground, but the concept is much the same.

But I'm not really going to cover the gameplay much here, more the procedural stuff.

Depending on where you settled down, you might get goblins or other monsters wandering your map on a random regular basis. They're not such a problem, before long your fortress will attract attention not from enemies, but from other dwarves. Depending on how much you send off as trade with the caravans that pass by, the game will start to calculate migrants to show up at your doorstep. You can't say no, you can't send them away again, you just get more dwarves. They each have a random selection of starting skills, typically a few conversation peices to let them interact and one or two related skills of note.

They might not be useful skills, like sope-makers who are trained in something that's not actually implemented yet, but they will have skills, and they'll start work if there's anything to do. Otherwise, it'd be better to assign them to the army.

The army is nessicarry, because once you get about eighty migrants, you run quickly into other things taking notice of you. You'll fall under attack from some of the neighboring groups, often goblins, elves and humans but perhaps even giants, dragons, or zombies. They surround your fortress and simply wait for an opening to attack.

Seiges add an important and interesting aspect to the gameplay, because they forcve you to think of a lot more than just profit when building a fortress. Doors, traps, defendability. They're not too simple, either. Depnding on the type of enemy you're fighting they might come with archers, or be able to smash down doors, or if you're lucky they'll be too heavy for your drawbridge. Once the seiges start, then they keep on showing up regularly until you've been wiped off the map. Sounds fun, huh?

There's another aspect of the game outside of gameplay worth mentioning, dwarven economy. Once you hit a hundred dwarves, dwarven nobles will start showing up, and dwarves will stop acting as an anarchic community and more like a proper city. They'll need to be paid, they'll want to buy things, they'll have mandated items to make/not make and so on. It adds a whole new dynamic to the game when you stop mining new rooms and your miners suddenly can't afford to pay for their rooms and are forced to sleep on the floor.

Wednesday, April 28, 2010

Dwarf Fortress Settles Down

Once a world exists in Dwarf Fortress, you can then start the game. Obviously, but it's not so simple as click start and go.

First, you need to pick where, in this vast vast world you want to begin the game. Do you want to start in the arctic, in the desert, the mountains, the forest? Each has different resources available and thus different challenges for the player.

There's lots of different options between those few generic choices, too. Do you want there to be sand to make glass? How about coal? How plentiful and near the surface is the magma? Do you want a lot of plant life nearby? How about animal life for hunting? What races do you want as close neighbors? How about soil to grow crops? Each of these has a strategy and costs and rewards associated with.

Most of these things will make your game easier if chosen right. Lots of coal, great - you have easy metalsmithing. Lots of sand, glass is really valuable! Lots of plants outside? Wood, and food. A lot of people choose deliberately harder starting areas to have more fun while playing, because as DF is still 'in alpha' that means there is no real goal. Much like simcity, actually. You have to make your own goals, the biggest of which is to pace your city's growth so as to avoid having other civilizations become jealous and attack you before you're ready.

But this isn't about gameplay yet. This is bout picking a location for your fortress. Ultimately, I prefer to choose a maps with a river, lots of rock, and some trees. But, there have to be balancing acts there too. If there's rock that water can seep through, your fortress is quickly going to flood. If there are no trees, you'll have a hard time buildng beds (sleep on a rock? silly man). It' really interestng, but as everything else in DF it's probably a lot more complex than i really needs to be. Certainly far more complex than I need for tinygame.

Tuesday, April 27, 2010

Dwarf Fortress Builds a world

The best place to start with dwarf fortress would be the same place the game does. Generating a world.

I don't pretend to udnerstand everything that goes on behind the scenes in the game, it's incredibly detailed and complex, but this is what I understand.

First, one of several types of maps is selected to generate. This could be a pangeta, several continents, or a land-based world, where the oceans are less common and more intersperced. From that, it builds a randomly shaped landmass of a few thousand grid spaces to a side. Each space is randomly selected to be from a biome (that is, the type of rocks in that section of the world map) based on it's Y location in the world, and closeness to water.

Then, it shakes things up,and adds elevation to the areas, which has the effect of creating seas, mountains, and valleys and such. Then, it adds the temperature. Towards the ends of the map are ice caps, towards the middle it's much hotter. This will effect the creatures and plants found in that area.

Next, it adds rivers, by selecting coastlines, and basically blasting inwards randomly, creating very river-like rivers. They sway all over the map, and it's pretty cool. Then, it does lakes. I'm pretty sure all lakes are tied to rivers, but like I said, I don't know everyting.

After it does that, it actually generates the specific content of those tiles. It determines the exact stone, plants, wildlife and so on in each area of the world. It decides if an area is full of predators, or calm. If the area is evil or good, and if evil whether or not it's a full-undead map.

Then, it creates civilizations, and megabeasts like dragons. And if that's not enough, it simulates a thousand (by default) game years of cities rising, falling, killing and being killed by beasts. Heroes rise and fall, gods fight demons and demons eat civilians. The races war it out and make peace. And it writes it all down so that you can look t it later, and your dwarves can talk and write about it in the game. They do a lot of writing.

I don't think Tinygame would need this level of detail, but a good degree of it can't hurt, eh?

Monday, April 26, 2010

Smells like dwarf fotress

I'm sure you're asking - what's happeed to you, Ronars? You had been just getting back into the swing of things, ad then you disssapeared!

http://www.bay12games.com/dwarves/

Dwarf Fortress happened, is what. I thought I was clean, I swear. Then a new, major update was released, and I was like 'oh, one fortres won't hurt'... I've only put maybe a dozen hours ino it, but those hours are almost exclusively from time I should have been working on tinygame, so I'm a bad person.

But at least I can blog about it, as Dwarf Fortress is probably the single biggest procdurally generated game out there. Even bigger than Diablo, though less mainstream. I'm hoping I an tear myself away from the game long enough this week to actually blog about it. Wish me luck.

Friday, April 9, 2010

More Dungeons

So, I was talking about tinygame a while back, and it was pointed out to me that when I'm talking about procedural dungeons, I'm the one writing the specific, and in this case short, procedure. There aren't a infiite number of dungeons that can be generated, there are a finite () number of them, all in one specific style.

It's undoubtedly better than spagetti dungeons, but it's still not exactly what I want. Close, but no cigar as it were.

So, for now, I'm adding in another few types of dungeons as I work my way towards code that will generate a huge, sprawling dungeon. The first is a massive, single floor room. Not the best dungeon, and something that would have made sense to work on first, but it was easy enough to implement. One big room, boring. I'll probably remove this before I'm even done.

Next, I made a change to something that had been bothering me. Towers used the same random generation code a the rest of the dungeons. Which means that the first floor could be a tiny, 5x5 hut, and the second a massive 30x20 labarynth, suspended inexplicably off the ground. I've changed it, though it's still not perfect. The bottom floor generates normally, but as the floors increase, the tower remains a simple shape, and gets narrower and narrower.

Small progress, I know, but progress nonetheless.

Tuesday, April 6, 2010

Exploring the world

Tinyworld is coming along well. I managed to fix all the issues with items displaying in the game world, all the issues with multiple floors, and all the issues with things drawing off the edge of the map. Great!

However, this brings me to an unfortunate point, one I knew would come (because I'm not the most efficient coder). The game is slowing down the more content I add in. The effect is certainly not as large as when things were drawing wrongly, or on the wrong maps, but it is there. The game is just a hair slower now than it used to be, and I've only got two dozen small maps.

Which means, as much as I didn't want to, I have to turn off the bulk process of every tile in the world, every clock tick. I really want the world to be living, so I'll have to come up with a more general way to handle this, perhaps running through each map the player isn't on one at a time (and thus much less frequently), or perhaps finding a more generalized way of handling them. Regardless, I have to make other maps static for now.

There's been a tiny bit of progress in working on the world, though. I know there are a few things I need to get building before I'm fully into an alpha though - towns, roads, more than the one type of dungeon, and so on.

Roads, is what I started with. They're the easiest. Of course, they're not randomly generating yet, but what I have working is that a map is chosen, and then a width, and weather the road runs horizontally or vertically. It then recursively calls each adjacent map and draws a road in the same position, direction, but one width smaller. And so, you can follow roads to their sources - which will eventually be towns. There's another thing I'll need to add, a source direction. This way, when you're on a map, you'll be able to tell which direction the road on it came from, and you won't need to guess. It'll be handy for dungeons and such, too. Put a big crosshair on each dungeon so you know when you're walking near them.

Wednesday, March 31, 2010

Globetrotting - Debugging part 2

So, I think I've tracked down the true source of the chug, and it's pretty funny.

You see, the way my drawing code works is that I check to see if the player is on the current floor, and if it is, then draw everything within so many tiles of him. If not, then just skip the entire drawing section. Sounds like a great idea, right?

There's one major problem, and that's that the objects I draw have no place to be until I actually go onto their floor, because their location is based on the draw code. Which means they'll all appear to be on square 0,0 - but won't really be.

The other problem is that while I'm not drawing any of the procdural art for these foors, I am still loading all the movieclips for them. And they don't go invisible until I've left the floor they're on. Which means, if I change the code for things to go invisible as soon as they're loaded, we should lose all the things showing in the top left corner of the map, and thusly the chug with is confirmed to only be associated with them being on the screen.

EDIT: Yep, this solved it. I can now have all the dungeons I want... well, almost. Items are still being annoying, but I figure the majority of the same fix will work for that problem, too.

EDIT2: turns out it was a different problem for the items, though the walls soltion dropped down the chugging by another sizable amount. Every frame something is handled, everything that is being told to calculate what it's doing goes invisible. Every time it's told to draw itself, it becomes visible. Thus, if something is told to draw itself, but then never toldto do anything - it will stay visible forever.

Which brings me to the issue with the items. Items are being held on tiles. Tiles tell the creature on them to calculate what they're doing. The did not, until a moment ago, tell *items* on them to calculate what they're doing. As such, the moment an item appeared on sceen (which before was when it loaded, and now is only when the player walks onto it's map) it stayed there forever, as it didn't get a 'calculate what you're doing' command until someone picked it up.

Now, items are told to figure out what they're doing, even if all that means is that they go invisible - that's what I really wanted them to do anyways...

Sunday, March 28, 2010

A funny debugging story

As I'm debugging, something funny popped into my head that happened at work a while back, which prompted me to test something different than I usually do.

At work, two years or so ago, we were starting to see slowdown in one of our games, and we simply couldn't figure it out. The particular game was less complex than our other games, but it was running so much slower that it was starting to become unplayable.

Then, one day, I noticed this tiny little line at the very top of the screen. It must have only been one pixel. I hovered over it, and I got the text cursor. I thought 'huh, that's odd'. So, I clicked, then hit ctrl+A, and ctrl+C. Went over to notepad and hit ctrl+V. You know what I found?

The transcript for war and peace was printing on every line!

Nah, I jest about that - but the amount of debugging text that was being printed to the screen in a place it couldn't be seen but was still required to process was of a similar size (text takes up a lot of space in a vector engine, it's about the only thing that's more efficient to do raster-based, AFAIK)

So, here we are, wondering why everything is slowing down, and I go into the code, toggle off 'display debug', and run it. *BAM* it's running so fast we have to go in and decrease the framerate. It's funny how that worked.

I say this because my previous blog I realize - hey, what if my slowdown is coming from all the traces I'm putting in, whenever I run the game I'm running it in debug mode.

The answer: Makes no difference. Good to know, though.

Globetrotting - debugging 1

So, I've been working on fixing the extra walls showing up in tinyworld, and I've made a lot of progress.

The first thing I did was I added a clause in the 'draw a room' function. You see, when a dungeon gets built, it only actually calculates the size of the first room - everything off of that is recursive (well, kinda). It just says 'based on the size and position of the first room, draw a room over there'. Which means if a 20 space wide map generates a 10 space wide room, and it wants to have a ten space-wide room on either side of it - those would have run off the edge of the map before. Now, they just look ugly. >.> Which is an improvement, running wise, but I need to come up with a more eloquent way of keeping that from happening.

Actually, that makes me think of another thing I need to add to the program - a recursive dungeon generator. What I have is highly random, but not perfectly so. There's only a few dozen possible combinations. Something to add to the random, but stay away from that spaghetti dungeon feel would be great...

Anyways, keeping rooms from generating off the edge of the maps made a noticable difference in the number of 'null location walls' that were drawing at world 0,0. That's a great thing. But it didn't fix all of them, only a few less than half. I soon realized, that's because every time I drew a wall, I just threw away whatever was on that space beforehand. Okay, that's fine - except that I draw rooms adjacent to one another, I redraw the walls, because the code doesn't care what walls are external. So, for a 5x5 room with a 5x5 room adjacent, I'm creating adn then losing track of five walls. With six rooms (often closer to 10x10) across five floors times five dungeons, that means probably 200 (or 500 with less conservative numbers) walls being created, told to keep track of themselves, and then dropped.

So, I make it clear off a square properly before adding a wall on it. Instant speed increase. But it still doesn't get them all, and I think - well, it's probably the same problem but slightly different.

The answer is staring me in the face - doorways. I draw doorways after I draw walls, and that involves deleting the wall there. I was right, I wasn't removing them properly. I don't see a speed increase here, but that's okay - it's only really affecting twenty squares to the previous change's 200.

Still, there's one square left that's eating away at me, and I can't figure it out. I'm almost positive it's related to the stairs, and it dissapears once I reach the top floor. Weird.

I've got other debugging and optimizing still to do, but the change is enormous.

Previous time taken to take one step: minimum ten seconds. Now? One and a half. Still unnacceptable, but there are a bucketload of things I'm doing wrong somewhere, and that last null-location wall is going to fall some day.

Saturday, March 20, 2010

Globetrotting - part 1

Tinyworld currently is just that. Tiny. If it were the real world, there would be the space for about two football fields side by side, and that's it.

But, the world is more than one map large, and more than one map tall. It is, effectively, a three dimensional world. Good for it. I've recycled my stairs code to connect one map to another side to side and top to bottom, and like all good fantasy worlds, it loops.

But some old bugs have come back to plague me, and I fear I won't be able to continue working on the world until I sort them out, and I hate debugging. Even when it's my own stuff. Especially when it's my own stuff.

So, every tile contains a number of items, two of which can have art associated with them - the variable names for these onMe, and the holding. onMe is anything that fills the space. A player, a creature, a tree, a wall, things like that. Things will run into and interact with these things. holding are anything that can be picked up. swords, shields, eventually gold.

When something is off screen, it's supposed to not draw at all. But that doesn't work. When a holding item is on another map, it still draws, and that takes up a lot of memory. Furthermore, if a building ever hits the end of the map, it will attempt to draw an item in a square that doesn't exist, and those will also always draw.

Which is where we come to the problem. Drawing stuff takes insanely longer than simply calculating it. My testing environment was a 5x5 world containing 10x10 maps. That's 2500 tiles to calculate. Without dungeons, no issue. With one dungeon, mild slowdown (okay, each dungeon increases the number of tiles by 500 or so, but see below). with two, it's chugging. Three or more and it's unplayable.

But I know it's not the tiles. I've tested this by increasing the number of maps to 20x20, and the size of the maps to the same amount, that becomes 160,000 tiles. Not a chug in site.

So, I have to stop and debug. First, the obvious problems - when a dungeon gets too big and draws outside of it's boundaries. Ironically, I could avert this by having huge maps, but that's a little counterproductive, because I want to make the dungeons bigger than they are, too. So, fix overflowing dungeons. Then fix overdrawing stuff. Then, back to the top, and see if we can have dungeons in the world...

Friday, March 19, 2010

Plans for the TinyFuture

I've been thinking about tinygame lately. Most of the programming I've been doing has been to simply get the game to work, with all of those darn 'make the game fun to play' problems being put on the 'do it later' shelf.

I've still got a few impotant things in the single dungeon area, which is arguably going to become the bread and butter of the game, but once I finish those few things I've got to start thinking ahead for the future of the project.

The next step, of course, will be to get a world (and a world map, damn, there's another new thing). Then towns. Then NPCs, then come up with a better way to generate and handle all the equipment and monster data in the game...

It's going to be a big projct, I just wish I didn't get distracte from it so easily.

Thursday, March 18, 2010

The players see a plot device

For any of you who don't know, Paizo's been holding their annual RPG Superstar competion over the past month and a bit, and the've gotten into the finals where the competitors each have to produce a full adventure proposal, the same sort you'd normally submit if you were a professional wrter.

Anyways, the idea is for the community to vote on them, based on the judges comments.

Now, I respect the judges of this competition a lot, they're industry pros, game designers, and generally awesome people. But there's one peeve of mine that cropped up a lot in the adventue proposals - 'and so the players '. Sometimes it's as simple as 'and so the players see the shadow flicker'. In fact, I'll use that exact example.

One adventure states 'the players see shadow suddenly whoosh away outside. While chasing it...' But, the players have no idea that they should chase the shadow. It could be a trick of the light, it could be a trap, and at this point, they probably don't even know that the person they're speaking to is an imposter. In fact, without knowing that fact, it seems like the shadow is more of an alarm to summon help, rather than anything else. I don't think I know anyone who, while interrogating a theif, if they saw the theif's shadow run away would follow it. Mos of them would stay there and interrogate the theif as to why, which would lose this thing.

Anything that assumes the players will act in one specific way, especially when it's an important aspect of the story (in this case it's crucial for the players to continue), is a bad idea. And I'm really surprised nobody called them on it. In the previous challenge, the judges marked down entries for saying so much as 'the cold is uncomfortable' because there might be players immune to cold effects - and here none of them notice that some of their most lauded entries use this not just once or twice, but several times each.

Perhaps I'm just picky, I mean they did have to come up with something entirely from scratch in only a week or so, but I feel they could have done a lot better in that regard, seeing how good these people all are.

Thursday, March 11, 2010

Marketing Bananzi

Last post, I was talking about starting adventures, stories, games, movies, whatever. I was talking about the little peices of information you have to get whe you start something to determine whether or not it will be interesting to you. But really, there's more than that. There's even things you get before you have access to the product that might determine whether you'll like it or not.

It's called marketing.

Before you even turn on your console, before you even open the first page of a book you see it in the stores. Most of the time, your first impression will be the size, color, cover image, and title of a product. You have to form your initial impression before you even touch it. Many people will know the difference in what they like between 'The flowers of Jehusbeth' and 'war of the death-tyrants', but what abou 'Mr. Smith'? It could be anything, and while it's most likely to be a biography or something similar, it doesn't provide enough information.

Now, we get to the image they pick for the cover. Most of the time, the images you'll see on any advertisements are artist representations of some of the content. Sometimes it'll be totally accurate to the content, sometime it won't. Terra in the final fantasy series is a good example. In the games, she has yellow hair. You can see it right there. In all the advertisments, she has bright green hair. Needless to say, people were confused at the time, but not much. Fast forward a few years, and Final Fantasy Dissidia comes out, using the advertisment art as the basis of the characters, instad of the in-game art. Now people are totally confused, because Terra looks totally different. These characters were based off a character based off her character.

Still, the images are really the selling points on most products. You probably would buy a air freshener with flowers on it. You might by an air freshener that was in a solid red container. You probably wouldn't buy an air freshener if it featured the picture of a fire hydrant. Who wants their house to smell like fire hydrants and dog-pee?

The problem here arises because you're most often going to see a dozen of these things at once. Artists have to pick either one of the most dramatic scenes of the book to illustrate or someone looking at the cover will choose the dragn breathing fire on a princess over the guy with a cloak in a hallway.

Ah, for the simple call of 'hey guys, let's play some DnD'

Wednesday, March 10, 2010

Starting an Adventure is Always the Hardest

Every world has to have a jumping off point. A first line you read in a story, the first image you see in an atlas, a first decription your dungeon master reads you. The question is, as always, what do you want this to be?

This first snippet of information can be the basis of your audience's entire perception of the world, and it had better be good or you might lose them. In today's market, people need to be hooked in seconds or hey might never delve deeper. But I can get into the ADD of marketing another time.

In an adventure in dungeons and dragons, the starting point is where the players meet. Oftentimes, the players will meet in a tavern, and get roped into doing something they had no real initiative to begin. Others are more creative, driving all the players to a common location by means of a threat, or even having the players be captured by some now-common foe that they must escape. But, even the best adventre hook can feel estranged when the characters don't have any motivation to be there.

One thing I try and do when creating a campaign, is give a notice to the players about things they need to involve in their backstory. 'You need to be broke, and willing to work for money' 'You belong to a theives guild' 'You must be searching for a specific holy maguffin' are all examples of requirements I've given players in the past. It's like building in a handle for your adventure hook, and it makes campaign planning much easier, because you don't have to design a hook for any imaginable subset of characters, but for any characters that might fall into a particular category. If every one of the characters seeks the same maguffin, they have a very strong reason to keep working together once they find themselves out of whatever trouble they found themselves in.

Of course, you can't expect this connection to the first hook to continue to be the hook for every adventure, or the players will start to feel dragged along by the nose. Higher level and follow-up advenures still have to be tailored to a general group of just about anyone.

This hook/handle concept is something that other dungeon masters should consider, to make their own lives easier, and the players feel more connected.

Tuesday, March 9, 2010

Response Ready

As you know, I work as a game developer, and while I do take pride in that position the projects often take a long time, and since they're educational games, they're a little dry for taste here in this blog.

But, even dry content is better than no content, right?

In between the other projects at work, Ive been working on refurbishing one of our oldest games, Response Ready. This game won all sorts of awards, got all sorts of attention, and is still in the news today, simply by virtue of still being in the news. I've never been party to old news re-hashes before, but I've seen it now.

Anyways, Response Ready is, at it's core, the child of a hidden object game and a choose your own adventure, with a time limit and a resource management game thrown in. You're given a scene, and are tasked with identifying the dangers in the area. For example, the gas pumps might spill, or the train running nearby might derail, or someone at the furniture shop might knock over a shelf of wood-treating chemicals. Then, you rank them as you find them based on how dangerous they are and how likely they are to happen, and you get a procedure out - for instance 'clean up spill'.

Then, you go into the timed choose your own adventure, and immediately something goes wrong. From the list of procedures based on the dangers you found, you have to respond, and get your people moving to solve the problems. But it's not just that simple, as you're working the emergency continues to worsten, so you have to be both proactive and watchful.

It is a good game, and a brilliant idea, but it's really old. And the art is only a handsbreadth above 80s cartoons (admittedly, it was styled that way on purpose). Really, the game needs a makeover. I'm porting it to a new system, then we're going to add new levels, and if I can find someone we'll redo the art for it. But, that's in the future.

Sunday, February 28, 2010

Going Underground

You know what difference is between a building on the ground and a building underground? A front door.

I've been working on tweaking spawn points, item generation, and a number of other little adjustments to tinygame, none of which would make good blog posts, really, but one thing I did accomplish that's worth talking about is the creation of underground dungeons.

Now, before this point, there were staircases randomly generated on a map that would link to a staircase randomly generated on a different map. Good for them, that part had my brain wrapped around it like a small slice of lemon wrapped around a large gold brick. Now that I have staircases working, the next step is to get them working predictably.

The first item of business was to have the staircases generated only inside the buildings. So, after randomly generating a spot inside a random room (tweaked of course by my code which now almost always works for getting items inside rooms). So the staircase on the ground floor where I had the building now appeared inside. Unless the building was really small, then it occasionally appeared inside the walls instead. Like I said, not quite perfect.

Now that we had it appearing in the building on one floor, we needed it to appear inside on the next floor down (down being my decided direction for this first generation to go). But all I had was code to generate a randomly colored ground with a building with a nice front door. Obviously, both of those had to go.

I added new ground tiles to represent being underground, (and ones to represent sky, though they're not in use yet), and added a new algorythm to generate a building without a door, for use on non-ground floors.

And, now we have actual floors underground! My next planned step is to properly tie the spawn points to rooms in the dungeon - so you no longer see the monsters all wandering around underground, outside the dungeon!

Friday, February 26, 2010

Unlikely Candidate

I don't just play games cause they're fun. I play them for science. The case in point, is noticing procedural content in one game that I certainly never expected to be talking about.

Animal Crossing.

You might ask what about animal crossing is procedural, and that's the obvious question, because everyhing *seems* the same each time you play, right?

It's not, not quite. There are a few dozen characters you can ecounter in the game, many of whom are the same, but some of whom are random. I don't know what, if anything, the generated characters are based on, but simply having a random assortment of pre-generated characters who will react to you in a somewhat random way makes the game procedurally generated. They can move out, and more characters move in and so on - to some interesting results, though as a downside, there's a lot of the game you cannot get unless you have a group of friends playing the game at the same time.

There are other aspects of the game that are procedural too. Weeds grow randomly around town, fish and insects appear randomly based on the time of day and the season, amongst other things.

I suppose some of this could be considered 'random' instead of 'procedural', but I like to think this sort of programming is making it's way into a wider spectrum than just RPG games ad the occasional shooter.

Wednesday, February 24, 2010

Back!

I've just returned from my recent vacaton, an it was good. But, this blog's not about my personal life, it's about gaming, really.

While I was on vacation, I started playing a DS game called Eterian Odessey. It's not procedurally generated, per-say, but it acts like it, which I find really interesting.

Basically, it's an isometric rpg where you go around and fight monsters, level up and your goal is to get to the bottom of the dungeon, exactly like the type of procedural game I'm working on now - except that in EO you've got a 3d view of the map in addition to the isometric view, except it doesn't do much other than give some nice extra visuals.

I find it particularly interesting as the game itself is the sort of thing I would want tinyworld to create. Ambitious sure, but not as much as it might be - I'm already generating dungeons as nice as sections of the map, I just need to make them more than a dozen rooms.

Friday, February 12, 2010

How much is too much?

One question that always comes up when working on a game is how much information to store. Do you store everything that's running in the game at once? Do you only store some minimal information about the game, like accomplishments?

In tinygame, I'm attempting, at first, to store and run *all* content on all maps simultaniously. I've only got a half-dozen maps running right now, and they're not even connected in the complex way I want them to be eventually connected, but I'm running all the content on all the floors and calculating everything at once.

Which means I have to be very careful how many monsters I let spawn on each map, the size of maps and so on.

I've touched on the game recently (no, really, I do work on this thing!) and I've decided that about eight monsters per spawn point is a good starting value. Eight monsters per flor, plus the player, and... well, it can get a little processor intensive.

One way I've premtively attempted to divert some of the processor chug is to break the game down into running at different frames per different things. Things like the player run a few times per second, most spawn points run once every three seconds, monsters act every one or two seconds. This has a umber of immediate effects. First, the player has the advantage over all monsters that he can act several times faster than them. They'll still chase him, but he can outrun them, he can outfght them, and so on. A clever player could fight a powerful monster and win without damage by moving at the right times. Secondly, it means not everythinbg in the world needs to be calculated at the same time. If there are ten thousand monsters, they migt be broken up between a hundred cycles of processor, which is a hundred monsters a cycle, and while it might become slow is still a huge advantage over ten thousand in the same time frame - and only a very minor change in the game play.

What do you all think? Anyone who'se out there?

Thursday, February 11, 2010

Historical Architecture - Part 6

The flying castle

In the age of magic, gravity was no longer a law. For, with near limitless power at one's fingertips, it became possible to fly, or even to levitate a small building. Such was the power trapped forever within the weapons of the elements.

One of the weapons of the elements harnessed the power of the air, and it was a bow. Hundreds of years later, a shadowkin got his hands on it, and the power drove him to the heights of shadowkin culture. His name was Marshal Hian.

He harnessed the near limitless power of the elemental weapon to create a massive fortress bound instead of to the ground, to the sky. It became, over the years Marshal Hian was alive, one of the most powerful and influential cities in the world, though like all good things, it came to an end one night when Marshal Hian passed away in his sleep. The castle carshed to the ground in the jungles of Grittlanni, killing everyone inside and destroying all the great art and culture that had been built around this nigh-utopian society.

Today, still people make it their quests to locate and delve into the ruins, if not in search of treasure, in search of the elemental weapon of the air - for since from that day, it has been lost to the pages of history.

Thursday, February 4, 2010

Historical Architecture - Part 5

Altar of the third god

In Ronar, Geisfarl was the first to gain awareness, and he created the second god, Garsog. Third, the world was created, and then the six goddesses. The altar of the third god is a location confused in it's purpose but signifigant nonetheless.

The altar of the third go was actually created by the Fallen Angel, the Reality Master who began the conflict of the universe for mortals to worship himself. He apeared to mortals in their dreams to cause them to seek it out and venerate it, though they do not know why.

Though it serves no true divine purpose, the altar is a menangere of goddess worshipers, faithless who serve no gods, and those who worship natural powers as if they were gods themselves. It has become a hub of those who are unsure of their own destinies, unsure of their place in the world, and a place where soothsayers travel to tell the future to them.

Tuesday, February 2, 2010

Historical Architecture - Par 4

The Temple of Pain

Ner, the goddess of pain and suffering, has always been an active force within the world since the day she was created by Garsog and Geisfarl. Before the Age of The Faithless began, however, she was particularly active, even to the point of travelling to Ronar to aggrivate the dragon wars to cause more strife between the races, and even the dragons themselves.

On one of the southeast banks of Maxitone stands a large temple structure, now long destroyed by time, and by repeated attempted ressurections and seiges. When it was new, it was the size of a small city, with a wall of obsidian around the perimiter, and a central structure of the same black stone. The stone holds no true signifigance, but Ner likes black, for the only reason that it makes most mortals feel more uncomfotable - as is the case for most things Ner likes at all.

For centuries following, the structure was one of Ner's only places of worship, and doubtlessly the most impressive. The central structure was dedicated to three purposes, worship of Ner in the central altar, and the holding and torture of prisoners. Out of deference to their god, Ner's clerics ate, slept and performed all other duties away from the main structure. In the event that triggered the age of the faithless - where great heroes struck down an avatar of Ner's for the torture and destruction it and she were causing - the avatar's bones were fused to the central altar as it's energy exploded from it's body when it was struck down.

It was, for a long time, a place of mixed powers. Heroes and Villians alike would search out the temple to try and gain power from Ner's avatar's remains, as did the heroes who first struck it down. Some of them ascended into godhood from it's presence, it is said. And so, those seeking godhood, or to worship Ner, or those who fought against them, travelled to the temple again and again, each year bringing about more damage to the temple until it collapsed and was eventually left to rest. Some still say there is power hidden within the bones of the temple structure.

Thursday, January 28, 2010

Historical Architecture - Part 3

Angel Temple

The continent of Grittlanni is a freign place to the civilized races, even to many of the shadowkin who call it their home and homeland. Few such places are more mysterious than the angel temple, a building built in a unique style of uniqu materials, and inhabited (ocasionally) by unique creatures.

The building is built atop a large stone pyramid, built of stone blocks each wider than the one above it - and the largest one at the base nearly a quarter mile in both width and length of flawless sone, though only a foot tall. The block above it is fifteen inches less from all sides, and it repeats until the top, each block flawless in all ways. The building itself is also square, and appears to be carved from a similarly flawless single peice of stone. The ceiling is a hemisphere of thick, impenitrible glass, and all the walls, inside and out are fit with ensconced torches that burn without fuel inside golden-lined archways to illuminate the building constantly, even in the darkest of nights. It is, in fact, this light that most often leads explorers to this building.

Outside of the strangeness of how the building is built, there is the strangeness of when it was built. Each of the gods in turn will deny having built it, yet the power it contains insist it was done so by magic, yet it's earliest sighting places it well beyond the first day of the year of recording, and centuries before magic was granted to the land by the gods.

The truth of the structure is in what lies beyond the gods, and in the true nature of the multiverse. From another reality came creatures never created upon Ronar, and never intended to be seen there. These creatures are the angels, the creautres that occasionally visit this magical world, and tap into it's powers.

Visitors to this site often find simply it's incredible architecture. Occasionally, if one is lucky, they may see one of the angels that visit, and if they are even luckier, be granted he opportunity to learn from them.

Wednesday, January 27, 2010

Ronarian Locations - Part 1

While there is no place in the world without history, some places have less exciting histories, and many have shorter histories.

The city of Arianna is a present-day callback to the ideals of the age of magic, and while it is part of the kingdom of Wetisa, and the current throne of it's Queen Mysti, it is a magocracy in all other ways - even the queen has some magical powers.

For those of you who don't know, a magocracy is a city whose ruling class is formed of, and decided by the members of the city who can use magic, and in a standard fantasy setting, that means arcane magic, instead of divine. I'm sure divine magic has some sway in magocracies, but that's the basic definition of them. But, back to the city.

Arianna is smilar in many ways to the cities built during the age of magic, in that rather than building structures on archetectural stability, they are built on magical supports, leading to Nine almost spindle-thin towers dozens of floors high. Their open construction allows the high updrafts to whip through the large windows (because hey, who'se going to fire an arrow through a window twenty stories up?) making the entire city a place aways literally humming and whistling. Most days the inhbitants agree that the sounds are soothing and pleasant, but there are rare days where the sound obviously becomes grating, forcing the people to use ear protection against the sounds.

The centralmost tower is the castle, and at over fifty floors tall and containing nearly a thousand rooms, is easily the largest tower on Ronar outside of the tower-city of Mer. Like the other towers, the walls are white plaster and rather than supporting them with beams and stone blocks like oter cities, or even other buildings in the city, the floors and walls are all supported by extremely thin and magically strong threads of metal - or even just walls of force. Some people in the city worry that a particularly clever sabateur could knock out an entire section of the city by toppling the towers, but the mages in charge of maintaining them assure them that the wards are strong enough to endure anything but the strongest of magical assaults. They survived the reign of Astra, the age of souls, and a seventeen year long inheritance war, after all.

The city itself is circular in nature,even to the point that the buildings have curved fronts facing the castle, and backs facing the outer walls. Almost exclusively, they are one tory tall, and built from brick, fronted with white plaster, giving the red-paved streets city a clean, serene feeling.

Friday, January 22, 2010

Historical Architecture - Part 2

Haiga's Clock

Along the western coast of Maxitone, the oldest settled continent is the vast forest of Wedra, stretching thousands of miles along the coast. This forest is the homeland of the Torin, where they were placed by the gods with the command to guard the forests of the world. Many Torin have since moved on, but most of them remain here.

Less than a hundred years after Torin were created, there was a Torin named Haiga born into one of the families who had taken it upon themselves to organize the people, these families were th nobles of the Torin folk, and while not quite he same as the noble of the humans they sufficed. Haiga was a passionate torin, and his first great passion was a toy brought from far away human lands, a small clockwork statue that would walk about, and a true marvel of engineering at the time. He spent many years obsessing over the way the gears meshed together seamlessly, and even after he was banished from his homeland (which is another story althogether) he retained the passion for the smooth and seamless workings. In fact, in common history, he is heralded as the father of clockworks, although it is obvious to those with more informaton that it is impossible, it is agreed that it was the torin who brought clockworks into the hands of the common man.

Haiga built over the years a number of creations, each grander than the last (although none of them quite as delicate or precise as the toy he admired as a child). Eventually, he found himself needing to know the time of the day it was precisely, for being immortal (which is really a story for another day) the times and days belended together into a great blur. And so, Haiga returned to one of the sites where he had battled dragons along heroes of the past, heroes who had all moved on to other lives, or ascended into a more complete existance, and asides the town he began to build a massive structure, four stories tall, and stradding a small river.

This structure contained a waterwheel at it's base, and a mill for the local villagers, but the wheel would power his most impressive structure yet - which he named 'A Clock'. This tower had four great glass faces, each one revealing the exact time of day to the distance and could be seen for miles around. Haiga's Clock, as it is know today is the first precise timepeice on Ronar, and it's inner workings have been sealed off from others to examine - all people know is that the clock continued to count exact times of day even during the droughts when there were no water, and during the floods, while the wheel was spinning furiously. The building itself is rather delapidated now, but so far the clock has been respected by wariors, and passed over by weather. Perhaps the immortal still visits and maintains it, for he has not been seen in many years, perhaps he lives inside.

Tuesday, January 19, 2010

Origin of the races

Fantasy worlds have long-since been defined by JRR Tolkien's lord of the rings books and his take on the fantasy creatures out of classic faerie tales. Elves, classically, and dwarves are very similar. They're tiny creatures that live in the earth and go about playing tricks on people. So are gnomes, so are faries, and goblins. They're all very similar creatures - in earth mythos.

But Tolkien took these creatures and made a series of distinct races from them. Drawves live in mountains, elves live in forests, and the two don't get along. Hobbits are flighty, Orcs are brutish, and so on. Dungeons and Dragons took these types and ran with them, and thus he generic fatasy world is born.

I started Ronar as a generic fantasy world, with elves, dwarves, gnomes, halflings and so on - but I gradully felt that it wasn't my world doing that. Everyone who thought of elves in that world made them the same as elves in other worlds. It wasn't what I wanted, when building a new, distinct world. The idea to make my own races came when was playing final fantasy. They stopped using elves and dwarves long ago, they created Vierra, and Moogles, and Bangaa, and a dozen other races in their recent games to populate the world in their place. Some of the races, Vierra and Bangaa, make clear lines to more generic races, elves and dwarves respectively but they were still new and exciting. A race made entirely of sexy bunny-girls who wear lingere? A little unrealistic, but certainly fun.

And so, I cast about to create my new races. Torin were the easiest, cat-people. You can probably see where the insiration came from already, but such is life. You need to be inspired from somewhere. Unofotine were next, a race of bear-like mole people. Cyclops were next, although their histry has been changed and re-written more times than I care to remember. Hopefully they're in a more steady place now. Last came Shadowkin, and I will admit they were someone else's creation that was looking for a home - only to find one in my world.

Wednesday, January 13, 2010

Historical Architecture - part 1

In any world the size of Earth (which Ronar is, near enough) there is a lot of world to exist. You might think a city is a big place to learn, or you might think a country is a hard place to move about, imagine the number of things across an entire planet! In starting my epic campaign on Ronar, I've been inspired to work on some of the landmarks across the world.

Alladora's Orphanage

Alladora is the goddess of fertility, and of children. As such, it only makes sense that her followers will be devoted to the health and wellbeing of children. Many of them run orphanages for both the protection of children and the access to the magical energies they draw from their godess by virtue of the children being present.

The most prominent orphanage is Alladora's Orphanage, named after the goddess herself, rather than the founder as is traditional. It was founded Circa 339, after the first dragon wars and during the age of the faithless, to take in many of the children whose parents had died during the wars. Despite the absence of their goddess, the faithful of Alladora followed her tennents to build the structure at the base of Mount Fejj (currently mount Silen, the home of the gods)

In current Ronar, the main structure of Alladora's orphanage is four stories tall, and at least twice as wide and deep as it is tall. Atop it's roof, since it's founding, are smaller additions, raising the building's height another two stories. It has the capacity to hold over a thousand people, mostly children in large common rooms and bunk beds. Still, for it's age, at nearly 1,200 years old it is one of the oldest buildings on Ronar, thanks in part to it's being a temple in such an actively religious city, and part of it being constructed with the aid of powerful magics that prevent it from decaying or suffering from any of the natural wear and tear a busy building would normally suffer. It usually houses about 500 orphans from across Maxitone (currently many from the inheritance wars between Barakaan and Arianna), although the number has increased steadily over the years as the number of people in the world has done likewise.

Friday, January 8, 2010

Looking ahead

Once you have a procedurally generated world of any kind, you have to ask yourself how it's going to be used. Sure, we know in my case it's going to be used for a rogue-like roleplaying game, but beyond that I mean how the player is going to play through it.

Once a dungeon is built and the player delves into it, clears out all the monsyers and grabs all the treasure laying around; what happens to it? Should the dungeon fade away to be replaced by another one later? Should the dungeon get refilled with more random monsters and treasure? If so, how long should it take? Instantly, so the player never needs to go looking for a new place? After a predetemined, or even random length of in-game time forcing the player to go back to town? After a year so only after the player has cleared a hundred other dungeons can they come back?

A solution on another blog I read inspired me to the solution I offer. Every map has two states of information - who currently 'owns' the map, an who is supposed to own the map. Thus, a map within orcish territory is supposed to be owned by the orcs, although it could be actually owned by the humans, or the elves, or even nobody if the player just ran through and killed everything. That part's simple.

Next, each map knows who is currently owning the maps adjacent to it, and for simplicity's sake we'll say there are four of those, one in each compass direction. So, each map has six crucial peices of information to be used in the next step - spawning.

Every map is constantly (if slowly) spawning creatues based on those four peices of information. Each group represented in the six areas (supposed to own, actually own, and owns north, owns east, owns south, owns west) spawns slowly into the map - probably at an even rate, with the group supposed to own the map highest of all. Obviously, this will probably lead to a conflict in who actually owns the map, if more than one group is represented, but that's fine - conflict is what makes the engine easy. You see, if humans own a square, and strong human units spawn into the adjacent square, eventually they will take over that adjacent square, having lots of spare units there, though they will constantly be under attack. Then,a single strong orc unit could spawn into it, and then the map would be quickly owned by orcs again - changing the power balance.

This way, the player could pass through a village one day (which normally only spawns peasants) and two days later pass through to find it overrun by orcs. The player kills them all, goes away, and comes back later to find the town once again filled by peasants, respawned once there were no orcs to kill them.

Dynamic background information makes the player feel a lot stronger about their influence in the world, but also that it doesn't seem like the world is totally at their control. A player who kills everyone in a town then comes back three weeks later to see everyone still laying in the street knows that nothing will happen they don't control. A player who walks into a town they like and finds they have to save it from monsters feels like they make a difference, and that the world is more real. Which,of course, is something we really want.

Sunday, January 3, 2010

Unreal Holidays

Happy Holidays, everyone.

Holidays are interesting things, all full of stress and family and gifts and so on. They've been comercialized, and only the most base idea of what the holiday was continues on in tradition. Christmas, for instance, was adapted from a pagan ritual to banish away the darkness. Now, it's a holiday celebrating the birth of the son of god, where everyone is expected to give to everyone else and spend time with family. I *totally* see that connection.

I've recently created a calendar on Ronar, and with it some holidays. I needed it because I realized I needed to give important events in Ronar actual dates and timelines beyond what era they happened in.

The first step was to decide how the calendar was set up. How many days in a year. In my case, the world was created by the gods, and a simple, even number works best. Three hundred days. The calandar was made by man - and so ten months makes a beautifully symmetrical calendar. That puts thirty days in a month, which doesn't divide by the classical week value of seven. That's fine, Earth calendar months don't divide by seven, right? But I'm making a well-balanced, symmetrical calendar.

What I finally decided, four weeks in a month is 28 days, then two days of rest, one every second week. It fits a classical religious feel with the days of rest, which don't fit nicely into the regular calendar already. These days are often holidays - though not always - and represent time for people to relax from their normal routines and spend time with their families and such. Like Christmas.

Then, we have to come up with names for the months, and there are generally two schools for doing that. The first school is similar to the japanese language where every month is simple named after which month it was numerically. Onemonth, Twomonth, and so on. A little plain, but certainly effective. The other school is to name months after what they represent. A friend of mine called the first month of his year 'yeardeath' to represent the end of the old year, which is an oddly morbid look at things - most people look for the positives in the end of things, but that's his world, ne?

The ten months of the Ronarian Calendar are as follows: Newyear, Winterbreak, Journey, Downpour, Kingsith, Scorching, Queensith, Harvest, Greybark, and Barren. Good names for months, but what do they represent? I'll tell you my friend. I will tell you.

The month of Newyear is the first month of the year. It is cold, and snowy, and much of the month is spent preparing what can for the year ahead. Craftsmen are fond of this month for the extra time they are able to spend crafting. Most craftsmen will produce their best works in this time.

Newyear 4 is the Day of the Divine, marking the first day the gods made themselves known to Ronar, circa 103. This holiday is typically celebrated only by clergy and strongly religious folk, and is used as a day to reinforce the presence of the gods in everyday life.

The month of Winterbreak is when the winter finally turns to spring. Typically begins the coldest, but ends with little to no slow. Farmers will spend this time getting their fields ready for planting, merchants will get ready for travel, and laborers start work in earnest.

The month of Journey is when everyone who has holed up for the winter gets out to start working again. Typically, this means most merchant caravans which slowed or stopped over the winter months finally get up and running again, bringing a surplus of trade to all the cities, for most places have an excess of crafted goods of a high quality from a long winter. Typically, most crops are planted during the middle to end of this month, as the weather becomes particularly pleasant outside. Also importantly, most humans are born during the month of journey as with the festival of fertility and the nine month gestation period of humans, most children are born around this time.

Journey 15th is The day of beginnings. Not only is this one of the most common birthdays on Ronar, but as the month of Journey represents the new travels, new caravans, new crops, and new life. This day is a large celebration, and often merchants will hold large sales on this day and the week preceding it to celebrate the beginning of the trade year - making the day of beginnings a day where most people will receive and give many gifts.

The month of Downpour is the end of spring, and where there is the most rain. Worhippers of Malladine are busy this month, for this is the most important month in the years harvest. Clerics of Malladine will often hold month-long celebrations to please the goddess.

Downpour 30th is the Festival of fertility, celebrating life, and harvest. This day, above all others, love and lust is in the air, and the temples to Malladine, Sanfra, Alldora are packed with worshipers and revellers. Malladine has been known to occasionally reward farmers who pay her particularly strong homage with divine aid on this day, so they may rest and relax - all the more reason for them to celebrate.

The month of Kingsith is named through the arrogance of King Sirra, as the month in which he was born. Originally named Kings month, the name was later shortened to Kingsith. This is also the month where spring changes to summer.

Kingsith 6th is the King's day, originally King Sirra's birthday, it has become a day where everyone celebrates their lords, ladies, kings and other nobles. The ruling classes will hold lavish parties, and while most people don't get to attend, entertainers commonly put on shows about the lives the lords and ladies of the lands to entertain.

The current month of Scorching was originally Queensith for King Sirra's wife's birthday, Scorching is a warm month, and the month where harvests are reaped but not yet stored for the coming winter. Often, this month is a month of relaxing for that reason.

The month of Queensith, Like Kingsith, was called Queens month after King Sirra's wife. It was swapped with the seventh month from the sixth by Queen Mellichai, King Sirra's daughter, in year 93 to mark the day of her mother's death, rather than the day or her birth. This month was originally Scorching, and is the hottest month of the year.

The month of Harvest is exactly as it sounds. As the fall approaches and the temprature starts to fall, farmers and craftsmen alike harvest what they can to prepare for the coming winter. Typically, by the end of this month, there are few crops still in the ground.

The month of Greybark was named as such by King Sirra after an unusual tree he had in his possession that as it's leaves turned from green to red for the fall, it's bark also turned from brown to grey. The first cold month.

Greybark 15 is Reverence. As the world slows down for the winter, the gods require that everyone take at least a single day to go and worship and pay homage to the gods that created them, and are the source of power in the world. Almost exclusively, this day is spent in temples to one's patron deity, and the greatest sacrifices of the year are made on this day.

The month of Barren is when the trees have lost all their leaves. This month often ends with snow, and is one of the slowest months of the year. It is a month for gathering the last of provisions for the winter, wood and water, supplies, and the month where only the slowest and bravest caravans are still on the roads.