tag:blogger.com,1999:blog-35742628278393054172024-03-21T14:59:50.632-07:00Building a WorldRonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.comBlogger89125tag:blogger.com,1999:blog-3574262827839305417.post-23418106623556882542010-06-23T09:08:00.001-07:002010-06-23T09:18:28.800-07:00It puts the treasure in the dungeonRewards 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />I have no current plan for how to deal with this, but I'll let you all know when I do.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-80849114774730874922010-06-21T13:59:00.000-07:002010-06-21T14:54:44.368-07:00Loot!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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-58748767038033988262010-06-13T07:49:00.000-07:002010-06-13T08:05:24.437-07:00Crawler DungeonsWhile 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />But what good is a dungeon without treasure? I'll get to treasure, it's mechanics and difficulties next time.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-24278568520431511142010-06-11T14:01:00.000-07:002010-06-11T14:33:25.291-07:00HeroCrawlerOkay, I said I was working on a new project, this is it. HeroCrawler. Hero Crawler. Hero Crawler: Adventuring Agency.<br /><br />The name is not totally nailed down, just close. But, that's not the point here, really.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-45745380592013888152010-06-08T12:50:00.000-07:002010-06-08T13:01:44.955-07:00Desktop dungeonsI 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />More on this later though, I just wanted to give you guys something to read.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-74672368067111853492010-06-05T15:54:00.000-07:002010-06-05T15:55:52.557-07:00Coolest cave design method ever,http://roguebasin.roguelikedevelopment.org/index.php?title=Cellular_Automata_Method_for_Generating_Random_Cave-Like_Levels<br /><br />Whoever said the game of life was just a game, huh? It's a frigging life-based random level generator.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-61846998225339168752010-06-03T05:50:00.000-07:002010-06-03T06:01:51.814-07:00Blog? What Blog?OKay, okay, I've fallen behind in posting. I know.<br /><br />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.<br /><br />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 <em>The Genesis Gauntlet</em>. 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<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com2tag:blogger.com,1999:blog-3574262827839305417.post-39402468030773358902010-05-25T05:45:00.000-07:002010-05-25T05:46:03.004-07:00More dungeons in the skyGreat 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.<br /><br />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. <br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-81440212596666141182010-05-21T08:08:00.000-07:002010-05-21T08:35:46.884-07:00Great Dungeon in the skyHey 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.<br /><br />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.<br /><br />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!<br /><br />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.<br /><br />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.<br /><br />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. <br /><br />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.<br /><br />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.)<br /><br />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.<br /><br />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.<br /><br />I'm quite enjoying the game, and you should look into it too.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-87598414753537677642010-05-17T11:22:00.000-07:002010-05-17T11:35:02.048-07:00Rescue: 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-76563937047387853942010-05-10T09:45:00.000-07:002010-05-10T09:55:08.128-07:00Self DestructHeck 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />Now, the look of the enemy ships were dfferent each time you loaded the game, that'd be awesome.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-58540398975443155602010-05-07T08:16:00.000-07:002010-05-07T08:30:40.937-07:00Probability ZeroYou 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />The only other question to ask is, 'is it fun?' to which the answer is 'once you get the hang of it, absolutey'RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-9294968375747261192010-05-05T08:35:00.001-07:002010-05-05T08:44:40.693-07:00Paradise FortParadise 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.<br /><br />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.<br /><br />Frankly, the seagulls are the worst danger.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-36576009789805553652010-05-03T10:07:00.001-07:002010-05-03T10:21:13.027-07:00Dwarf Fortress BuildsEventually, 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.<br /><br />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.<br /><br />But I'm not really going to cover the gameplay much here, more the procedural stuff.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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?<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-74751512453062092062010-04-28T09:48:00.001-07:002010-04-28T09:58:21.506-07:00Dwarf Fortress Settles DownOnce a world exists in Dwarf Fortress, you can then start the game. Obviously, but it's not so simple as click start and go.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-13373430804737691362010-04-27T10:46:00.000-07:002010-04-27T10:58:03.068-07:00Dwarf Fortress Builds a worldThe best place to start with dwarf fortress would be the same place the game does. Generating a world.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />I don't think Tinygame would need this level of detail, but a good degree of it can't hurt, eh?RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-11895025621491287522010-04-26T05:57:00.000-07:002010-04-26T06:07:53.027-07:00Smells like dwarf fotressI'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!<br /><br />http://www.bay12games.com/dwarves/<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com1tag:blogger.com,1999:blog-3574262827839305417.post-5933123553139639012010-04-09T12:15:00.001-07:002010-04-09T12:30:25.591-07:00More DungeonsSo, 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.<br /><br />It's undoubtedly better than spagetti dungeons, but it's still not exactly what I want. Close, but no cigar as it were.<br /><br />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.<br /><br />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.<br /><br />Small progress, I know, but progress nonetheless.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-73794912893451744152010-04-06T07:39:00.000-07:002010-04-06T07:52:50.711-07:00Exploring the worldTinyworld 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!<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-21151285424502690222010-03-31T10:45:00.000-07:002010-03-31T11:26:46.052-07:00Globetrotting - Debugging part 2So, I think I've tracked down the true source of the chug, and it's pretty funny.<br /><br />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?<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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...RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-10400063597628857442010-03-28T07:17:00.000-07:002010-03-28T07:24:50.376-07:00A funny debugging storyAs 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.<br /><br />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.<br /><br />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?<br /><br />The transcript for war and peace was printing on every line!<br /><br />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)<br /><br />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.<br /><br />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.<br /><br />The answer: Makes no difference. Good to know, though.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-76848654006667722062010-03-28T06:55:00.000-07:002010-03-28T07:12:59.383-07:00Globetrotting - debugging 1So, I've been working on fixing the extra walls showing up in tinyworld, and I've made a lot of progress.<br /><br />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.<br /><br />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...<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />I've got other debugging and optimizing still to do, but the change is enormous.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-7008973940383443102010-03-20T11:15:00.000-07:002010-03-20T11:30:06.868-07:00Globetrotting - part 1Tinyworld 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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />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. <br /><br />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.<br /><br />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...RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-76273467876751806282010-03-19T07:00:00.000-07:002010-03-19T07:06:40.355-07:00Plans for the TinyFutureI'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.<br /><br />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.<br /><br />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...<br /><br />It's going to be a big projct, I just wish I didn't get distracte from it so easily.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0tag:blogger.com,1999:blog-3574262827839305417.post-17730620517321120932010-03-18T09:55:00.000-07:002010-03-18T10:06:10.066-07:00The players see a plot deviceFor 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.<br /><br />Anyways, the idea is for the community to vote on them, based on the judges comments.<br /><br />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 <plot device>'. Sometimes it's as simple as 'and so the players see the shadow flicker'. In fact, I'll use that exact example.<br /><br />One adventure states 'the players see <her> 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.<br /><br />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.<br /><br />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.RonarsCorruptionhttp://www.blogger.com/profile/15060311914181468796noreply@blogger.com0