A roguelike game inspired by the complexity of Dwarf Fortress, Adventurer seeks to provide a deep level of detail to an Adventurer in a setting more like Nethack. Realistic combat, an item crafting system, and a general attitude of improvising what you can out of what you have in order to overcome the challenges of the dungeon; that's what I'm trying to do with this. You can find the project at: http://code.google.com/p/adventurerroguelike
Saturday, December 25, 2010
Adventurer 0.0.2.2 - Unified Tileset and De-dragoned Rats
So I've got this uploaded to Google Code. I pretty much just took a fan suggestion and went with it. Basically, someone needs to be able to edit a tileset. I'm a horrible sprite artist myself. Not that I didn't try: I had to draw 253 ASCII tiles, which took up a good chunk of my time. Then there was actually getting SDL to properly load and display from this file, which took some time. But that all works, and should be easy to edit for anyone that would like something to look different. I'll improve it even more later on so that colors are properly preserved with the internal recoloring that happens right now to ASCII tiles.
Anyway, the edit also saw me having to work on rewriting the way grids of tiles are handled. I had to make a constant, which I really should have done to begin with, and then fix all the damage that caused everywhere. Eventually, I got it working fine. You should see some aesthetic differences, as in the picture above. Another slowdown is family holiday festivities including seeing a synchronized music/light show, and my monitor going down. The replacement also didn't seem to want to work on my computer. Third time was the charm though, borrowed my console monitor that was rigged up as a TV.
I also corrected some other bugs, most importantly the bug in the way DNotation was stored, causing rats to end up with dragon claws. Also, attempting to load a bad save file shouldn't crash the game now. Amongst other little things I worked on.
Next week I'm going to again try to work on adding a lot of creatures to flesh out the bestiary, if I don't get sidetracked by something else that needs to be done. And remember to check out the new forum, we need more members there.
Merry Christmas if you celebrate it, everyone.
Sunday, December 19, 2010
Adventurer Forum
I am again suprised to find that adventurer.freeforums.org is not taken. WELL IT IS NOW MINE! But seriously, it's a good way to get discussion going amongst users, as opposed to what we have here which is targeted primarily towards myself. I have never been an admin or mod or even a very participating user before, but I've been a lurker on various forums for a long time. I promise to be a very lenient admin. I really only have one rule: Don't disrupt usage of the site. It's a broad rule and the host probably has rules that you also need to adhere to like not posting gore images everywhere. Which also would happen to follow under my rule because angering the host would pretty directly to disruption of the use of the site.
I've seen too many sites get trigger-happy admins and mods, that ignore the rules on people they like and take action on people not breaking any. Myself, I'm all for freedom of expression. Go ahead and flame war as long as you don't break the primary rule. As long as it doesn't result in pages of spam obstructing view of the good stuff, have at it. I do reserve the right to take this back since, you know, I'm the admin. But I want to watch how things go like this.
So have fun.
I've seen too many sites get trigger-happy admins and mods, that ignore the rules on people they like and take action on people not breaking any. Myself, I'm all for freedom of expression. Go ahead and flame war as long as you don't break the primary rule. As long as it doesn't result in pages of spam obstructing view of the good stuff, have at it. I do reserve the right to take this back since, you know, I'm the admin. But I want to watch how things go like this.
So have fun.
Friday, December 17, 2010
Adventurer 0.0.2.1 - Classic Update
Well my usual time of update has come and gone without an update, but I have good reason. I could complain about college eating up a lot of my time and then suddenly quit on the project altogether. But nah, I'm not like that. Seriously though, last week was the next-to-final week and had some of the hardest, most time consuming stuff. Never, ever try to do a "combo matrix" by hand. And then there was a lot of studying for both final exams, which I took today.
But that was only half of what is taking up my time. The other half is Adventurer. I'm working hard on 0.0.2.1, but it's not quite ready yet. ...actually, you know what? I just think I fixed it enough to give it to you all. I started to write this blog post before I finished it, but yeah. Here you go.
The major change here is one that may not be perfectly agreed upon. I switched to a more classic roguelike style health and damage system. There are a few reasons why I did this. The first is that it was hard to tell how close you were to death before. The second is that it was extremely unbalanced. The third is that I have much more source material to borrow data off of in this format. Hopefully, the increase in fun will outdo the temporary loss of an uncommon combat system. I do intend to either switch back to a realistic style or to continue using the current system, but with a lot of improvements that will go hand in hand with it while increasing the detail level of combat.
The other major change, the one that suddenly increases this game's longevity by a lot, is an experience system. Yes, you can finally gain levels and grow stronger. I even rigged up save files with it and improved those. You can save and pick up exactly where you left off, current hit points and all.
A more personal change is that I totally redid how the game internally handles input from the player. I shifted everything over to use the WaitForKey method instead of weaving my logic in with my SDL. I started on this because rats spontaneously decided they could save their moves up, then use them in one burst. Dealing with it in the SDL mire was a no go. So now it is MUCH more simple on my end. It's just what ate up most of my time this week.
And finally, I fixed a bug where kicking down a door would leave a permanent shadow spot where it was. I'd forgotten to set the tile back to transparent when a door is kicked down. The other bug that was pointed out was the duplicate body parts. I have no idea what's causing that yet. It shouldn't affect much, I'll see if I can spot what's causing it next week.
So next week. The bestiary is looking pretty thin. Now that I've got this classic-style update done, it will be easy to add in a ton of creatures and some more items. So I'm going to do that.
But that was only half of what is taking up my time. The other half is Adventurer. I'm working hard on 0.0.2.1, but it's not quite ready yet. ...actually, you know what? I just think I fixed it enough to give it to you all. I started to write this blog post before I finished it, but yeah. Here you go.
The major change here is one that may not be perfectly agreed upon. I switched to a more classic roguelike style health and damage system. There are a few reasons why I did this. The first is that it was hard to tell how close you were to death before. The second is that it was extremely unbalanced. The third is that I have much more source material to borrow data off of in this format. Hopefully, the increase in fun will outdo the temporary loss of an uncommon combat system. I do intend to either switch back to a realistic style or to continue using the current system, but with a lot of improvements that will go hand in hand with it while increasing the detail level of combat.
The other major change, the one that suddenly increases this game's longevity by a lot, is an experience system. Yes, you can finally gain levels and grow stronger. I even rigged up save files with it and improved those. You can save and pick up exactly where you left off, current hit points and all.
A more personal change is that I totally redid how the game internally handles input from the player. I shifted everything over to use the WaitForKey method instead of weaving my logic in with my SDL. I started on this because rats spontaneously decided they could save their moves up, then use them in one burst. Dealing with it in the SDL mire was a no go. So now it is MUCH more simple on my end. It's just what ate up most of my time this week.
And finally, I fixed a bug where kicking down a door would leave a permanent shadow spot where it was. I'd forgotten to set the tile back to transparent when a door is kicked down. The other bug that was pointed out was the duplicate body parts. I have no idea what's causing that yet. It shouldn't affect much, I'll see if I can spot what's causing it next week.
So next week. The bestiary is looking pretty thin. Now that I've got this classic-style update done, it will be easy to add in a ton of creatures and some more items. So I'm going to do that.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Tuesday, December 7, 2010
0.0.2.0 Graveyard Files
I'm almost back on track with this update. I'm a day late, so sue me. Actually, don't sue me, I haven't even made five dollars yet. This was never meant to be a major update, so don't expect a ton of new features.
What I did do, first off, is fixed some of the bugs from the last update. Yeah, that was a major update. You had items multiplying on reload, and sometimes when a level would try to save, it would hit a null item, give up, and cry. No more, I fixed that. As far as what I added instead of just fixed, two things. The first is graveyard files. Whenever you die, a file is buried in the graveyard preserving some stats on your run. Also I fixed potions to where shattering against a foe causes their effect. This opens up the options for things like poison and acid later.
I also sped up pathfinding considerably by having it return a path in a stack of moves, instead of a single move that has to be calculated each time. What this means is that the processing can be used elsewhere. Specifically, what I'm going to work on next week, temperature and its effects.
Yes, next week will have temperature and ways to affect it, as well as things it affects. Set things on fire, freeze water, etcetera.
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
pathfinding,
project,
roguelike,
rpg
Friday, December 3, 2010
End of Month 5 - November; Full Persistence and Save Files
I'm not dead. I'd just locked myself away in a white room, with only a television, a bed, and a computer to fulfill my needs. And guess what? I only watch TV out of utter boredom or to get a laugh out of the ads. As in, laugh at some of the cheap marketing techniques that no one should really fall for, but do. But mostly, I spent my time working on this update.
I cannot begin to describe the complexity of what went on here. Wait, I think I can: I can perfectly (presumably, there may be bugs) recreate a session's universe based on what I've saved in text files. They are relatively small. A universe in which I dived down fifty levels was less than 300 kb saved. Basically, I crammed a universe into 2 million on/off switches, and can recreate it all from those files. It wasn't easy, either; there is no command to write what's in memory to the hard drive that I know of. I had to write it all in legible text based on what is in memory, and save it to a plain text file. What all this means for you? Truly persistent levels and save files. When you drop an item and come back, it will still be there.
I had some hilarious bugs while I was working on this, too. At one point, I was randomly switching bodies with random wildlife. Dragon on a rampage through the forest, while I was suddenly a wolf. We had whole inventories shuffling from one creature to another. I was suddenly a quest giver. And I can't even near promise all the bugs are out. But it seemed to work well enough after a fair amount of play testing.
As for the statistics so far. 1308 downloads grand total. 549 blog views this month, up 27.38%. 636 code page views, up 36.77%. $4.63 in ads grand total, $0.66 this month. No donations. So it seems that views are definitely on the rise, and downloads are either maintaining or growing in their rate. While the money is lackluster, I don't mind. I've learned a lot on the way and maybe I've given a few people a few minutes of fun. And I will continue to work diligently.
Next week... wow. Let's see if I can't get something simple done to get back on track, and submit Monday. Perhaps the things I've been saying the past three weeks. Maybe graveyard entries. That would be partially on the road to bones files.
I cannot begin to describe the complexity of what went on here. Wait, I think I can: I can perfectly (presumably, there may be bugs) recreate a session's universe based on what I've saved in text files. They are relatively small. A universe in which I dived down fifty levels was less than 300 kb saved. Basically, I crammed a universe into 2 million on/off switches, and can recreate it all from those files. It wasn't easy, either; there is no command to write what's in memory to the hard drive that I know of. I had to write it all in legible text based on what is in memory, and save it to a plain text file. What all this means for you? Truly persistent levels and save files. When you drop an item and come back, it will still be there.
I had some hilarious bugs while I was working on this, too. At one point, I was randomly switching bodies with random wildlife. Dragon on a rampage through the forest, while I was suddenly a wolf. We had whole inventories shuffling from one creature to another. I was suddenly a quest giver. And I can't even near promise all the bugs are out. But it seemed to work well enough after a fair amount of play testing.
As for the statistics so far. 1308 downloads grand total. 549 blog views this month, up 27.38%. 636 code page views, up 36.77%. $4.63 in ads grand total, $0.66 this month. No donations. So it seems that views are definitely on the rise, and downloads are either maintaining or growing in their rate. While the money is lackluster, I don't mind. I've learned a lot on the way and maybe I've given a few people a few minutes of fun. And I will continue to work diligently.
Next week... wow. Let's see if I can't get something simple done to get back on track, and submit Monday. Perhaps the things I've been saying the past three weeks. Maybe graveyard entries. That would be partially on the road to bones files.
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Monday, November 22, 2010
0.0.1.8 - Hunger, Engraving, and Post Mortems
You know how I said I was going to work on status effects? Went off on a tangent. Take my mspaint crud as apology, along with that update.
So I'd started with adding status effect definitions to creatures. You know, confusion timeouts and stuff. Well, I added a hunger level too, and then I found myself working on that more. So I got that working good. Then I thought, hmm, let's stop having sudden death restarts and instead do something with it. So, I built it to give appropriate messages related to how you died. And then, while I was figuring one more thing to throw in before I upload, I added engravings.
I also have more blog comments I'm going to go back and respond to. Also, I noticed I have an Issues tab on the Google Code site, I already replied to the two things there. And I have hit a milestone: my first spam comment on the blog. Something about pricey glasses. Just so you know, if I ever do dump a comment off in spam wrongly, let me know and I'll move it back in. If there's ever a bit of drama about that, I'm likely to move it back in, I like free speech. In the meantime, if I spot obvious junk accumulating, I'll move it over to spam.
So thank you all for what is becoming more than monthly responses. I will try to keep up my average weekly rate of uploads, and I'll try to keep up with comments and such as much as I can.
Next week, I may just get around to actually adding items and stuff like I said I'd do last time. I've got some of the structures in place from the bit I dabbled with it this week, so it shouldn't be too hard to do. See you then.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Monday, November 15, 2010
0.0.17 - Creature Select
Yup, the new version's up. You can play as any creature in the bestiary. Also, I fixed an AI crash bug, and added some appropriate features about what should and should not be able to do things like open doors.
I am also cripplingly tired for some reason, so I won't take long with this post. I may edit and extend it in the morning.
Next week, I'm going to try to add things like status effects, scrolls, wands, and perhaps magic.
I sleep now.
I am also cripplingly tired for some reason, so I won't take long with this post. I may edit and extend it in the morning.
Next week, I'm going to try to add things like status effects, scrolls, wands, and perhaps magic.
I sleep now.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Monday, November 8, 2010
0.0.1.6 - Towns and Trading
You all have no idea what I've been through this week. I have literally hauled 3 tons of cinderblocks. I did the math. I've fought with all sorts of weirdness and problems in my web classes. I even aced a trigonometry quiz, and I knew next to nothing of trigonometry until last week. But that's all irrelevant. Because the most important thing here to this blog, is the next update. I kinda sorta did miss a day, but mainly because it also happened to be the end of the web class week, so I was dealing with that. After singlehandedly finishing the block hauling job, your hero got right back to work on Adventurer, and turned the half-done job of mindless humans standing about in their houses into some decently proper quest givers.
If you go to see one, they'll want an item, and in exchange for it, they'll give you another item. They're persistent like levels are; which is to say, only semi. They won't know if you've completed a quest before when you come back, but you don't have to worry about them wanting a stick one time and wanting a flail when you come back. Later, when truly persistent levels are in, I'll do that kind of thing. Also, I fixed a few small things. Including the whole infinite rope thing as Anonymous so kindly pointed out.
Also of note, I got a FormSpring account. If you're shy about comments here or just want to ask a question there, go right ahead. I increased the number of 'gadgets' here on Blogspot, I didn't just willy nilly add all, just the stuff I thought wouldn't be a total waste of bandwidth. I'm on dial-up, I know these things. Also, no one has edited the wiki at all. :/ Link comin' at you whoa.
And finally, plans for next week. I actually had a conversation with one of my cousins where I basically rattle off huge walls of text, and then suddenly inspiration strikes. "I think I'll let the player be any creature. I wonder if I should balance it, like having new dragon adventurers be totally wimpy and rat adventurers be totally awesome. Or not. I could leave it natural, but then all the powergamers would pick dragon and go on a rampage, kill everyone in town, or at least until... ...the other adventurers hear about you and come after you." Yeah, maybe not all of that latter part will be in, but I'm totally going to work at letting the player be an adventurer of any race in the book.
The long term implications of this, when Adventurer is more developed, is that the creatures with a higher difficulty class are also going to have a higher natural level of fame. Dragons are sorta a big deal for fame-seeking adventurers. Rats? Not so much. New and wimpy adventurers just starting out. I do see that balancing in the long run; you can be tougher but hassled more often, or you can be weaker with less glory-seekers trying to kill you, letting you work in more subtle and secret ways. So I think this will be the first step of something good.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Tuesday, November 2, 2010
End of Month 4 - October
Well, I've got a lot done this month. I set up a donation button, got the overworld forest in, and fixed the 64-bit problem. I've made $4.04 in ads, and the only donation was from my mother to test the thing out. I have a fair amount of downloads now, going from 20 to 100 each week. And according to the analytics, still growing. Things have really picked up this and last month, and I hope it does continue that trend.
So, um, I really don't know much else to say about the month. I've started college back, which may or may not slow down progress. Front porch roof is removed, so that's ready to be moved out so the trailer can be moved out, and a doublewide can be moved in. My days now, instead of porch deconstruction, are going to be occupied by cinderblock siding removal and other packing. And still, I'm going to keep on updating.
As far as the progress goes on the next update, I've got a few things done in level generation and creature data. Still a bit early on to tell if a town should really be ready.
So, um, I really don't know much else to say about the month. I've started college back, which may or may not slow down progress. Front porch roof is removed, so that's ready to be moved out so the trailer can be moved out, and a doublewide can be moved in. My days now, instead of porch deconstruction, are going to be occupied by cinderblock siding removal and other packing. And still, I'm going to keep on updating.
As far as the progress goes on the next update, I've got a few things done in level generation and creature data. Still a bit early on to tell if a town should really be ready.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Sunday, October 31, 2010
0.0.1.5 Forest Overworld and 64-Bit Fix
And then, vast stretches of untamed wilderness. The green forest stretches endlessly in all directions. Dungeons are hidden around the world, waiting for an adventurer to find them.
Yes you all, I have made an overworld. Although unlike I said before, towns are not yet part of it. I pretty quickly figured that before I start putting in more individual one-map-tile locations, I need a backdrop for it. Namely, an immense forest. That's the biggest thing I worked on the past week, along with web classes and work getting ready for moving. However, there is one more big thing about this update. Something so important it requires a new line and a special formatting:
****************************************
*ADVENTURER NOW WORKS ON 64-BIT SYSTEMS*
****************************************
Or at least, as far as I can tell. I found that a person I know has a 64-bit system, had them test old Adventurer and tell me what the crash log put out. It seemed to be to do with the Sdl.dll not being 64-bit. But I couldn't find one, so stumped, I went on #RGRD. There, a person (goes by nihilanth) said they thought a simple tweak to the .csproj file may fix the actual problem. I did it, sent it off to 64-bit guy, and it ran perfectly. So I assume the 64-bit problem is now fixed for everyone. Tell me if it isn't. And yes, you have #RGRD to thank again for helping a new developer put out better stuff faster.
As for next week, I'll see about getting towns in proper, and maybe some other stuff.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Monday, October 25, 2010
0.0.1.4 - Traps and Ludicrous Gibs
Good news everyone! I got around to updating. I didn't realize how fast the days were going by. But what's going on in this update is mostly that I added traps. Namely tripwires. If you or a monster walks on one unaware, you trip and are stunned for a couple turns. Related to that, you can build a trap by [u]sing the proper items. And also, you can dismantle a trap by [k]ick/dismantling it. De-limbed monsters drop said body part as an item on the ground, and dead monsters leave behind corpses. Also, I added a couple more items like flails.
I also had a lot of "almost-happened"s. I was going to make it to where pathfinding accounts for the attributes of a monster and its capability of working on the environment. Mostly, being able to path through closed doors if they can open them. Well, they increased the processing required for pathfinding to the point that it got laggy. So while it totally worked, I had to undo it until I can get that working more efficiently. Also, I started to improve the pathfinding so that instead of checking every single step, it checks once and all steps go into a monster's memory as a queue. That I can totally do. I was just burnt out in the brain on pathfinding after the doors fiasco, and I had more important things to work on. Maybe next update.
And now... my plans for next update. I don't care how much work it takes, but I am going to work on the things that will make Adventurer different from other roguelikes. I am going to work on the overworld - at the very least a town. Let's get out of that dreary dungeon.
I also had a lot of "almost-happened"s. I was going to make it to where pathfinding accounts for the attributes of a monster and its capability of working on the environment. Mostly, being able to path through closed doors if they can open them. Well, they increased the processing required for pathfinding to the point that it got laggy. So while it totally worked, I had to undo it until I can get that working more efficiently. Also, I started to improve the pathfinding so that instead of checking every single step, it checks once and all steps go into a monster's memory as a queue. That I can totally do. I was just burnt out in the brain on pathfinding after the doors fiasco, and I had more important things to work on. Maybe next update.
And now... my plans for next update. I don't care how much work it takes, but I am going to work on the things that will make Adventurer different from other roguelikes. I am going to work on the overworld - at the very least a town. Let's get out of that dreary dungeon.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Saturday, October 16, 2010
0.0.1.3 - Semi-Persistent Levels
You can get the most recent update at Google Code, as always. Two big things I did for this update. The first is semi-persistent levels. They'll keep the same floor layout when you return to them. Items and creatures will still shuffle. This, at least, will have nil effects on memory.
The second thing is that I fixed some combat bugs. Like in the quick MSPaint crud above, I think it's pretty obvious why rats were still hardcore. They were wielding daggers. It happened because in the creature loading code, I never set the default item back to null. So since rats came after goblins and rats have no weapon data, the goblin data never got overwritten in that regard. I fixed that. Also, I added something else that will help combat make more sense.
Weapons now, instead of replacing natural damage, add to it. So I went through and reworked the item damage data and natural creature damage data to compensate. In the bit of testing I did, it seemed much better. Rats are just annoying, a single goblin can seriously hurt you, but you probably won't die in an encounter unless you have terrible luck with RNG and just keep fighting. I didn't encounter any ogres or minotaurs or dragons yet, but I wanted to get the update out faster than making sure those are balanced.
So next week, I'll work more on that. I'll also see about getting more interesting interactions going on. Such as a creature not having arms and being unable to wield a weapon or open doors normally, but still able to bash down doors if they're large and strong enough (aka dragon). Also things that can get through doors should path through doors, while things that can't don't. See you then.
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Thursday, October 7, 2010
0.0.1.2 - Range Examination and Throwing
I've finally managed to get an update ready. What with the short vacation last week missing an update and all the work this week on getting ready to move another house in, it's been hard to find a time to work on it when I'm not totally tired and zoned out. But, I did, so no worries. We should be back on track now, with another update coming on the 14th-ish.
So let me explain what I did for 0.0.1.2. First, I made it to where all items can be used as weapons. Non-weapon weapons are gonna suck, but what the heck, no reason to prevent you from wielding a cork. Second, I attempted MonoDevelop so the non-Windows people could use Adventurer. For some reason it crashed on me. I'll have to look into fixing that. I also put a lot of work into the "WaitForPosition()" method. Basically, it allows the user to use a cursor to select a tile. A lot can be done with that position. Including what I've done now, which is the ability to look at things at a distance, and the ability to throw items.
And crud, I just remembered that I didn't remember to update the menus with the info that those things are available. It's e[x]amine (Main Game) and [f]ire (Inventory Menu), for those reading the blog that haven't figured it out themselves yet. Anyway, it seemed to work pretty well when I was testing it.
So next week's thing is to figure out why the heck the rats are still hardcore on me (lost several body parts to the first rat I met). I thought I nerfed them, the data says I nerfed them. It's like they have the combat data of a goblin. I need to check that to see where it's going wrong, if it is. Or if I'm just very unlucky. And more general improvements I'll work on as they come to me. Again, I'm probably going to be busy with work packing, but I'll see what I can do.
So let me explain what I did for 0.0.1.2. First, I made it to where all items can be used as weapons. Non-weapon weapons are gonna suck, but what the heck, no reason to prevent you from wielding a cork. Second, I attempted MonoDevelop so the non-Windows people could use Adventurer. For some reason it crashed on me. I'll have to look into fixing that. I also put a lot of work into the "WaitForPosition()" method. Basically, it allows the user to use a cursor to select a tile. A lot can be done with that position. Including what I've done now, which is the ability to look at things at a distance, and the ability to throw items.
And crud, I just remembered that I didn't remember to update the menus with the info that those things are available. It's e[x]amine (Main Game) and [f]ire (Inventory Menu), for those reading the blog that haven't figured it out themselves yet. Anyway, it seemed to work pretty well when I was testing it.
So next week's thing is to figure out why the heck the rats are still hardcore on me (lost several body parts to the first rat I met). I thought I nerfed them, the data says I nerfed them. It's like they have the combat data of a goblin. I need to check that to see where it's going wrong, if it is. Or if I'm just very unlucky. And more general improvements I'll work on as they come to me. Again, I'm probably going to be busy with work packing, but I'll see what I can do.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Friday, October 1, 2010
End of Month 3 - September
Sorry, no update yet. My parents had a week to themselves for their anniversary, so I went on a little vacation with a relative. I couldn't do much with Adventurer. But now I'm back, and I'm back to work.
The goals this time are a lot like I had before. I've already fixed it to where every item is now wieldable as a weapon. I also tried to get Mono working, but for some reason MonoDevelop wouldn't run for me. I'll look into that some more. Another big thing will be examining things - and particularly, examination at range. If you see a red !, there will be a simple tool much like Nethack's ';' command to send a cursor around, gathering info about what is on that tile. That system will also prove useful in developing things like range combat.
Overall, this month has been pretty good, other than the missed update. I got the SDL overhaul done and fixed some of the worst crash bugs, which means that if you're on a 32-bit system using some kind of Windows, you should be able to run this. I attempted Mono but that's giving me problems running, so until I get that sorted out, non-Windows users are out of luck for now unless they have some tricks of their own. 64-bit users will presumably still have problems unless that somehow disappeared, I need to look more into that, I just haven't yet.
But most astounding is the increase in downloads I've seen. Over 50 downloads of 0.0.1.1. That makes me feel a whole lot better. Maybe this will start to get a few players, then. I'll just keep on going, as always. Also, I didn't see any more ad revenue last I checked, but ah well, I don't expect any until I can do something more with this.
So yeah, expect an update in the next couple days, one that will allow you to look at things at a distance, wield any item, and probably some other things too.
The goals this time are a lot like I had before. I've already fixed it to where every item is now wieldable as a weapon. I also tried to get Mono working, but for some reason MonoDevelop wouldn't run for me. I'll look into that some more. Another big thing will be examining things - and particularly, examination at range. If you see a red !, there will be a simple tool much like Nethack's ';' command to send a cursor around, gathering info about what is on that tile. That system will also prove useful in developing things like range combat.
Overall, this month has been pretty good, other than the missed update. I got the SDL overhaul done and fixed some of the worst crash bugs, which means that if you're on a 32-bit system using some kind of Windows, you should be able to run this. I attempted Mono but that's giving me problems running, so until I get that sorted out, non-Windows users are out of luck for now unless they have some tricks of their own. 64-bit users will presumably still have problems unless that somehow disappeared, I need to look more into that, I just haven't yet.
But most astounding is the increase in downloads I've seen. Over 50 downloads of 0.0.1.1. That makes me feel a whole lot better. Maybe this will start to get a few players, then. I'll just keep on going, as always. Also, I didn't see any more ad revenue last I checked, but ah well, I don't expect any until I can do something more with this.
So yeah, expect an update in the next couple days, one that will allow you to look at things at a distance, wield any item, and probably some other things too.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
roguelike,
rpg
Tuesday, September 21, 2010
Adventurer 0.0.1.1
I've got Adventurer 0.0.1.1 up. It feels a bit overwhelming to try to match what I got done last week, and this week was probably really more of a break. But I did get some important things done. For example, if you've been crashing when attempting to load the Encyclopedia data, I think I fixed your problem. It was a weird thing to do with localization. When I use float.Parse(line), it thinks I mean the string is in the local format when running it, not the local format when compiling it. So 123.456 and 123,456 are the same thing depending on your region, but will cause crashes if yours doesn't match to mine. If you use dot-decimals, then you should already have been good. If you've got comma-decimals, give it a try for me and tell me if it works, or if I should work more on that.
An in terms of new features, you've got pick axes, shovels, and potions of regeneration. And chunks of dirt. All items now have potential "uses". Like a pick can mine out adjacent tiles, and a shovel can dig into the ground. It's in list form, as well, so items can have lists of many, many different ways in the future, which will be awesome. Also, I fixed up the item spawn rates. Components you can craft together will spawn now. I think this will be more and more interesting as crafting gets more developed.
Sorry to 64-bit users, you're out of luck for the moment. And anyone not on Windows. But other than that, this version should work just fine for you. Tell me if it doesn't and I'll see if I can figure out what the problem is. I'll be looking at fixing it up for 64-bit users, and Mono for cross-platform development.
Okay! For next week, I'm going to be taking a look at the aforementioned improved compatibility. Maybe add more items, like always. Also, I'm going to fix a bug that is making creature stats behave weirdly. I thought I nerfed rats, but I still got an arm bitten off. Maybe some more creatures. Maybe creatures with some unique quirks, like slimes that can't see but can smell and hear well, and use that to sense stuff rather than sight.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Tuesday, September 14, 2010
Adventurer 0.0.1 Stable
If you've had the headache of seeing the Windows Standard Useless Error Message when trying to run Adventurer, then I think I just made your world a whole lot better. For the past couple days, Adventurer 0.0.1 has been repeatedly taken down and put up again while I tried to make it work for more people. I found what the problem was.
The Tao.Sdl.Dll file was missing from the archive. I had it on my computer, so it ran for me. And some of the C# writers, too. But not the average user. After finding out what the problem was, I included it, and everything seems to run fine for most people. The only two crash bugs in the current version were from one person on a 64-bit system (apparently 64-bit users will have problems for now), and another with a weird bug loading the Encyclopedia. Both of those put out crash logs, which is a huge step towards making things more compatible. All others that I know of have been able to run it.
So go grab a copy, and give it a try.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Sunday, September 12, 2010
0.0.1 - The Complete SDL Overhaul
For all of you who were waiting for compatibility - here you go. This should now run on about anything. Even before I've looked into cross-platform compatibility, you should be able to run this on other operating systems if you use the right tools. XNA has been completely obliterated from Adventurer. No more heavy requirements. In fact, I don't even know what else you would need. I've got the dlls with it. Hence, why it's half a megabyte now whereas before it was less than 100 kb. It's because the old versions required huge libraries that would be a headache to download. This should include everything.
It was a lot of work (as you may know from my last two posts), but that's done and more. In addition to using a whole new display and input system (which should have no visible change to the end user beyond increased compatibility), more has been added to the game itself. Creatures now generate uniquely, instead of being a copy of a prototype. That means all creatures, with more statistics in there, now start with their own unique statistic levels. Stronger ones hit harder, more dextrous ones are more accurate, higher constitution ones take less damage, etcetera.
All creatures now start with their items in the appropriate slots. Which means you start wearing your clothes rather than carrying them. Creatures should also recognize and manage their weapons and armor now - if they've got a dagger in hand and come across the more powerful hand axe, they should unequip the dagger and then equip the hand axe. Also, item crafting was balanced better and I fixed a bug with multiple of the same components. Which means you need three pieces of cloth to craft pants, but only one for a hat.
And I think that's about it, other than little nick and knacks. Next week's going to see about capitalizing on the improved crafting system and possibly getting an experience system going. And anything else I think up as I go. Also, I'm going to ask around about ways to increase visibility. I've been on it over two months, and I've still had never better than 8 downloads in a week. I mean, I'm going to keep going regardless. Maybe it's normal. I don't know, I've never done this before. Anyway, check it out if you like this sort of thing, and I'll be back no later than next week with more of the fruits of my labor.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Thursday, September 9, 2010
SDL Conversion Complete
Since I have two or three more days before the expected update, I'll spend the extra time adding stuff. On my end, an object to handle the generation of creatures separate from the creatures themselves. This will save processing power and speed by reducing irrelevant data. On the user end, creatures will be individually generated with their own quirks, and a stat system with growth should be coming in.
But yes, the SDL conversion is complete. Everything is done and behaves exactly as it did. The advantage? Come next update, you will be able to run it right out of the box, pretty much regardless of your system layout. Heck, theoretically you can run it in Mono on non-Windows systems. I'll need more people to play test it though. I've only got one download on last week's update. :/
I faced several problems during the conversion. The first of which is that SDL is written in C, and I have to get at it with Tao. Which means lots and lots of pointers. Like I said in the last blog post, I was able to sort that out in safe code with IntPtr and Marshalling the pointer into accessible data. The second was that SDL alone does not come with some of what you think would be pretty critical commands, like drawing text or a rectangle. You have to import SDL_TTF and SDL_Gfx respectively. Which it turns out Tao included, and it took me forever to find.
And the third time-waster was looking up how to change the color of an image. You know, I have a white @ sign, I want to turn it green because it's a goblin. Well, SDL doesn't have a command for that. SDL_Gfx doesn't have a command for that. In fact, there are no commands for it whatsoever. The things I found about color key switching were all theoretical and did not work for me. No one had working code anywhere. That's when I decided to check out if anyone on the roguelike development chatroom #RGRD could give me any ideas. I will say right now that if it weren't for them, Adventurer may very well have taken two weeks to convert and still be in black and white.
#RGRD is your hero, guys. It turns out that there really is no easy way to do it, but someone helped guide me through how to make it happen. So I had the data, and the color I wanted to change it to. I have to be able to get at the data. Not normal C# stuff, I had to get at the ^raw^ data. So I needed a pointer. And not just an IntPtr. I needed an honest C style pointer. So I had to flip it to unsafe mode. Got a pointer to the raw data. Now, how to mess with it?
You can get at pointer data by saying pointerWhatever[somenumber]. That finds a block of data in there. In this case, a pixel stored in RGBA format. Or maybe it was ARGB. I forget. I then had to convert a color into its raw ARGB data. Thankfully, there was a command for that. Then I had to put it in an appropriate pixel. Well, at first I just picked one at random. White dots started appearing in images, which meant that it worked.
Next, I had to get at not just one, but all the pixels. Pixels are not stored as [x,y] coordinates in an image. They're all one dimension. Which meant I had to write a function to make that happen. Which I did with the help of the #RGRD folks. All this with the help of the #RGRD folks. Once I had access to all the pixels, I had to work out criteria for changing the color, or else I'd end up with solid color blocks. Color multiplying was brought up, and I tried to implement that. Basically, R100 * R50 = R75. Well, it didn't work like I wanted. But then I figured something else.
I simply looked for any pixel that was not transparent (Alpha > 0), and changed only those. It suddenly worked. From misshapen color garbles to the old Adventurer. And from there, it was smooth sailing. Well, except for a little kink with the shift key that I just today finished working out. After all that, the final thing was just a logic slip on my part. So it's all working, and expect an update in two or three days. I can't seem to find the chat log, which has a link to a Pastebin post which would have given you all the code. Nor can I properly thank the person who showed me how to do it. So to all my players, all of #RGRD, all of the roguelike community, and in particular that one #RGRD guy, thank you!
But yes, the SDL conversion is complete. Everything is done and behaves exactly as it did. The advantage? Come next update, you will be able to run it right out of the box, pretty much regardless of your system layout. Heck, theoretically you can run it in Mono on non-Windows systems. I'll need more people to play test it though. I've only got one download on last week's update. :/
I faced several problems during the conversion. The first of which is that SDL is written in C, and I have to get at it with Tao. Which means lots and lots of pointers. Like I said in the last blog post, I was able to sort that out in safe code with IntPtr and Marshalling the pointer into accessible data. The second was that SDL alone does not come with some of what you think would be pretty critical commands, like drawing text or a rectangle. You have to import SDL_TTF and SDL_Gfx respectively. Which it turns out Tao included, and it took me forever to find.
And the third time-waster was looking up how to change the color of an image. You know, I have a white @ sign, I want to turn it green because it's a goblin. Well, SDL doesn't have a command for that. SDL_Gfx doesn't have a command for that. In fact, there are no commands for it whatsoever. The things I found about color key switching were all theoretical and did not work for me. No one had working code anywhere. That's when I decided to check out if anyone on the roguelike development chatroom #RGRD could give me any ideas. I will say right now that if it weren't for them, Adventurer may very well have taken two weeks to convert and still be in black and white.
#RGRD is your hero, guys. It turns out that there really is no easy way to do it, but someone helped guide me through how to make it happen. So I had the data, and the color I wanted to change it to. I have to be able to get at the data. Not normal C# stuff, I had to get at the ^raw^ data. So I needed a pointer. And not just an IntPtr. I needed an honest C style pointer. So I had to flip it to unsafe mode. Got a pointer to the raw data. Now, how to mess with it?
You can get at pointer data by saying pointerWhatever[somenumber]. That finds a block of data in there. In this case, a pixel stored in RGBA format. Or maybe it was ARGB. I forget. I then had to convert a color into its raw ARGB data. Thankfully, there was a command for that. Then I had to put it in an appropriate pixel. Well, at first I just picked one at random. White dots started appearing in images, which meant that it worked.
Next, I had to get at not just one, but all the pixels. Pixels are not stored as [x,y] coordinates in an image. They're all one dimension. Which meant I had to write a function to make that happen. Which I did with the help of the #RGRD folks. All this with the help of the #RGRD folks. Once I had access to all the pixels, I had to work out criteria for changing the color, or else I'd end up with solid color blocks. Color multiplying was brought up, and I tried to implement that. Basically, R100 * R50 = R75. Well, it didn't work like I wanted. But then I figured something else.
I simply looked for any pixel that was not transparent (Alpha > 0), and changed only those. It suddenly worked. From misshapen color garbles to the old Adventurer. And from there, it was smooth sailing. Well, except for a little kink with the shift key that I just today finished working out. After all that, the final thing was just a logic slip on my part. So it's all working, and expect an update in two or three days. I can't seem to find the chat log, which has a link to a Pastebin post which would have given you all the code. Nor can I properly thank the person who showed me how to do it. So to all my players, all of #RGRD, all of the roguelike community, and in particular that one #RGRD guy, thank you!
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Monday, September 6, 2010
XNA to SDL Conversion Progress
I'm in the midst of a massive conversion. XNA is getting the boot. Compatibility will rise significantly. I made a test SDL-using program and even some old junk computers I have around were able to run it, when they couldn't with XNA, even after I thought I'd updated all XNA requirements. That's the easy part for all the players. But for me... well, let's just say that it took me a full day just to figure out how to get a sprite on the screen.
Most SDL tutorials are written for C or C++. Which while on the surface is quite similar, has a big difference. Pointers. Ye gods, the pointers. C# doesn't like having the programmer have to use them. If they are used, they have to be marked as unsafe and you have to do your own garbage handling on that. Eventually, I found a way of wrangling the pointers into something I can use outside of unsafe code with IntPtr and something called Marshal.
But, once I got past that, it got much easier. SDL does plenty of things even better than XNA. That problem with cropping images? SDL can do that. Keyboard input? SDL can tell you if a button's just been pressed. Text drawing? Well, you need another part of the SDL library, but SDL can do that. So it should be better when I get this done.
And as you can see from the above image, I'm not done yet. A lot of things to fix. Right now, it's at a state where I've put all the things that were in XNA Adventurer over to SDL Adventurer. Even organized it better as well. Now I have to translate anything and everything I was doing with XNA into its SDL equivalent. And since I'm learning SDL on the fly, that could take a little while. But not much. I already know the basics of sprite drawing, as well as input. Now I've got to get text drawing and sprite transparency and color.
But overall, it's going well after the initial rough start. Steadily making progress. And again, many more people should be able to play it when I'm done.
Most SDL tutorials are written for C or C++. Which while on the surface is quite similar, has a big difference. Pointers. Ye gods, the pointers. C# doesn't like having the programmer have to use them. If they are used, they have to be marked as unsafe and you have to do your own garbage handling on that. Eventually, I found a way of wrangling the pointers into something I can use outside of unsafe code with IntPtr and something called Marshal.
But, once I got past that, it got much easier. SDL does plenty of things even better than XNA. That problem with cropping images? SDL can do that. Keyboard input? SDL can tell you if a button's just been pressed. Text drawing? Well, you need another part of the SDL library, but SDL can do that. So it should be better when I get this done.
And as you can see from the above image, I'm not done yet. A lot of things to fix. Right now, it's at a state where I've put all the things that were in XNA Adventurer over to SDL Adventurer. Even organized it better as well. Now I have to translate anything and everything I was doing with XNA into its SDL equivalent. And since I'm learning SDL on the fly, that could take a little while. But not much. I already know the basics of sprite drawing, as well as input. Now I've got to get text drawing and sprite transparency and color.
But overall, it's going well after the initial rough start. Steadily making progress. And again, many more people should be able to play it when I'm done.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Sunday, September 5, 2010
0.0.0.10 Bug Fixes and More Creatures
Psyche - Still not 0.0.1. It's mostly just a bug fix, I'm still not at that "this is at least a good time waster" level on how much of a game I feel it is. Although adding minimum depth creatures certainly added a good deal of that flavor. The major thing I've done in this update is fix a huge deal of bugs of varying importance, from pathfinding accounting for creatures in the way to crashing when a creature died while carrying too many items. There's more to be done, but I caught quite a bit in this update. But I don't feel I did quite enough with this one. Mainly, I'm holding back for the next update, which is probably going to cause more bugs.
Specifically, the next update is all about taking XNA out of the game and switching to OpenGL. OpenGL is used in things like Dwarf Fortress, and it's the leading competitor to DirectX. And more importantly, it is a cross-platform thing that almost no one should have to download anything extra for. I'm getting at it with something called the Tao framework, for C#. Since OpenGL is cross-language, it needs a 'binding'. Which is basically what Tao is. A go-between for C# to OpenGL commands. OpenGL itself being a platform-independent way of getting at various output and input stuff. It should involve no work for the end user. Most should be able to just unzip the archive and play the executable file directly. No more downloading huge frameworks and hoping it works.
With this, the requirements should drop to near nil, and it may in fact fix some crash on startup problems people have been having. So that's what's going on next week. It'll be a big week. In fact, I'm not sure just how big of a thing this is going to be until I get in there and do it. If it's much worse than I'm thinking, it may stretch on for longer than my usual weekly update. Hopefully not. It may even be shorter, letting me play around with more tangible updates in the gameplay. So see you next week.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Wednesday, September 1, 2010
End of Month 2 - August
It's the end of the second month of working on Adventurer, and I think it's going well. It is fast approaching what can be called a game, and it will only get better from there. In the past month... heck, I don't know what all I've done. Armor, weapons, a simple item crafting system, a system that should track crash bugs, a lot. I know all of what I've done so far is probably buggy. I know because that's what I'm fixing right now.
Next update is going to be mainly about smoothing out the mechanics that are already in, as opposed to making yet more new ones. Melee attacks should always target the appropriate foe from now on. Creatures will take advantage of the new items. The size of the Creature files is smaller relatively. More bugs as I spot them will be fixed. As well, I'm also putting in some mechanics that will give a sense of progression. Different and tougher creatures as you go deeper. Maybe I'll get that statistics system going, so that your character can grow in power over the course of your journey. Again, no promises. Next update is mainly a bugfix, stability thing, where I round out the implementation of the systems that are already there.
As for this month's statistics: 195 views of the blog. 2 ad clicks. $0.16 in the ad revenue. 5 downloads of 0.0.0.9, and a grand total of 38 downloads. 21 of which were in August. So it's a slight growth in downloads, and that's a good feeling. I just hope it does catch on. It feels weird being in this limbo where I've done so much, but it hasn't caught on yet. Maybe I need more ways to get it seen. Maybe I just need to wait.
And in any case, I'll keep working on it. I've learned so much already, and it's pretty satisfying.
Next update is going to be mainly about smoothing out the mechanics that are already in, as opposed to making yet more new ones. Melee attacks should always target the appropriate foe from now on. Creatures will take advantage of the new items. The size of the Creature files is smaller relatively. More bugs as I spot them will be fixed. As well, I'm also putting in some mechanics that will give a sense of progression. Different and tougher creatures as you go deeper. Maybe I'll get that statistics system going, so that your character can grow in power over the course of your journey. Again, no promises. Next update is mainly a bugfix, stability thing, where I round out the implementation of the systems that are already there.
As for this month's statistics: 195 views of the blog. 2 ad clicks. $0.16 in the ad revenue. 5 downloads of 0.0.0.9, and a grand total of 38 downloads. 21 of which were in August. So it's a slight growth in downloads, and that's a good feeling. I just hope it does catch on. It feels weird being in this limbo where I've done so much, but it hasn't caught on yet. Maybe I need more ways to get it seen. Maybe I just need to wait.
And in any case, I'll keep working on it. I've learned so much already, and it's pretty satisfying.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Saturday, August 28, 2010
0.0.0.9 - Item Crafting
Adventurer 0.0.0.9 is out, and I'm back on my 7 day per update average schedule. The big thing that got done with 0.0.0.9 is that the framework of item crafting is in place. You can break down any item into its components now (liquids and gases will have no container and be lost, so watch out for that). Axe becomes a wood stick and an iron wedge. The other half of all that alchemy is the construction of new items from components. If you have a stick and a wedge, you can now make an axe from it. Simply select either item you want to start with, hit [c]ombine craft, and you'll get a list of all the items you can presently make from it. Pick one, and it will be made.
The other thing, not as major as the item crafting, is I fixed up the crash-out code. I managed to trigger going into that part of the code when I was working on the rest - only to find that it had problems with simple Console output. I mean, what the heck? "The handle is invalid"? Can you be any more generic, Microsoft? Oh, wait, they can. Anywhoo, I looked up what that was about. Turns out my project isn't a Console Project, so the ball is dropped when I call console commands, because nobody bothered to set up console stuff if it's not a console application.
In retrospect, I might be able to fix that if I can find the right settings. But more importantly, I fixed it another way. Instead of Console output, whenever the game fails to continue running, it dumps whatever exception occurred into a text file at ErrorLogs/crash.txt. So if the game has crashed on you, consult that file to see if anything's there. If you email me at zahru.tesla@hotmail.com or just post a comment here or something, include that file's contents. It'll help future versions be more stable.
Next week's updates' tasks are... hrm. Wow. A lot to be done. As a new feature, skills and attributes can be in. That way you can become more powerful as you do things. Skills are going to work on a 'natural' system. You get more 'axe' skill whenever you use an axe. You get tougher body parts whenever they're injured. That could be a lot of work though - no guarantees that it will be ready. Also, AI still needs work to make use of the new armors and weapons and crafting and such. So that can use some work. Also, combat mechanics need some work - you aren't guaranteed to hit the right target if more than one is adjacent to you. So I'll see you next week with another update. And I'll post another blog post at the start of next month.
The other thing, not as major as the item crafting, is I fixed up the crash-out code. I managed to trigger going into that part of the code when I was working on the rest - only to find that it had problems with simple Console output. I mean, what the heck? "The handle is invalid"? Can you be any more generic, Microsoft? Oh, wait, they can. Anywhoo, I looked up what that was about. Turns out my project isn't a Console Project, so the ball is dropped when I call console commands, because nobody bothered to set up console stuff if it's not a console application.
In retrospect, I might be able to fix that if I can find the right settings. But more importantly, I fixed it another way. Instead of Console output, whenever the game fails to continue running, it dumps whatever exception occurred into a text file at ErrorLogs/crash.txt. So if the game has crashed on you, consult that file to see if anything's there. If you email me at zahru.tesla@hotmail.com or just post a comment here or something, include that file's contents. It'll help future versions be more stable.
Next week's updates' tasks are... hrm. Wow. A lot to be done. As a new feature, skills and attributes can be in. That way you can become more powerful as you do things. Skills are going to work on a 'natural' system. You get more 'axe' skill whenever you use an axe. You get tougher body parts whenever they're injured. That could be a lot of work though - no guarantees that it will be ready. Also, AI still needs work to make use of the new armors and weapons and crafting and such. So that can use some work. Also, combat mechanics need some work - you aren't guaranteed to hit the right target if more than one is adjacent to you. So I'll see you next week with another update. And I'll post another blog post at the start of next month.
Sunday, August 22, 2010
Adventurer 0.0.0.8 - Armor and Weapons
Here's 0.0.0.8, a day later than I would have liked. But hey, it works. So! Armor and weapons are in, and a slight rework on the inventory controls. 'e' and 'd' no longer do anything from the main game. Since now there's more than health potions, you need to select those items. Hence, the inventory menu actually does stuff now. Play around with it. When you need to remove armor, un[W]ear it. When you need to put your weapon away, un[w]ield it. All from the main game.
Weapons have their attack data, which override your own when wielded. Armor shaves off some damage, if you're hit in a body part it covers. And something else I added is a random item generation system that I can use varying weights for. Which means when I implement it, YOU can modify the encyclopedia entry on items and change their drop rates. As it is, armor has about a 30% chance of generating. Which armor is all equal.
Next thing I'm working on is item crafting. Yeah. Snap that hand axe, turn that shirt into strips of cloth. You'll be able to craft them into things. And maybe, just maybe, I'll add some skill growth.
Saturday, August 14, 2010
Adventurer 0.0.0.7 Level Upgrade
Adventurer 0.0.0.7 is ready for the world. I know last time I said I was going to do armor and weapons and stuff. Well, here's how my train of thought went: "Okay, to do armor, I'll need to be able to place the items down. I could add that to the mix with potions, but... eww, the potions are all in the halls, too. They need to only be in rooms. Now how am I going to do rooms? Hmm, I could do it this way... what about doors? That would be cool. And stairs. Those could all be fixtures..." And before you know it, I'd completely rewritten the level generation.
But I think it was worth it. The dungeon layout feels a lot better, and now we've got doors that you can [o]pen and [c]lose. The goblins and rats handle it perfectly; goblins can open doors, rats can't. Rats don't have any body parts dextrous enough. Also, since I had doors working, I went ahead and made another dungeon fixture, stairs. You can now go up [<] and down [>] stairs to the next level up or down. Now, the levels aren't persistent like Nethack; that'll involve saving levels to files, and I'll tackle that once I try to tackle save files in general. You can, however, go deeper or more shallow through the dungeon, and it all seems to work right.
Also, while I was at it, I fixed up the inventory menu a little better. Still not perfect, but you can see what you're carrying with you now. Also, I used the same principle to make a health menu. You can see all the body parts you have, and the general condition they're in. Also, I color coded everything to do with health so it's easier to notice you've lost over 30% of your blood, and your head's about to be hacked off.
Next update will probably be more to do with armor and weapons and such, if I can get the equipping of items to start working right.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Saturday, August 7, 2010
0.0.0.6 - Body Parts and Combat
......_............
...../.\.I'm.Okay!.
.....\_/...........
......|./..........
......|/...........
......|............
......|............
...../.\...........
..../...\..........
...................
It's another week, another update. What gifts does Kala bring this time? Why, a Body Part system that lets rats know they don't have opposable thumbs, and lets limbs be broken, maimed, and even completely taken off. Even threw in a splash of blood for you.
So yeah, there really isn't much more to say on the matter. You can now get into fist fights with the goblins and get your arm broken. You can also bleed out. You can theoretically survive without a leg, but if your head's damaged beyond repair, you're a goner. Also, rats have finally stopped picking up potions, and going for them. The AI has been shifted over to Creatures, rather than the main Update loop. This means that the AI can be more individual to the individual creatures. Go have fun with it.
As for what I'm working on next, probably armor and weapons. And getting that inventory menu to show you your items. Same concept, a screen to show your health. From here 'till version 0.0.1, I'm going to be focusing more on stuff that will use the systems I have in place, rather than go out of my way to make more. Really, a lot of the framework I needed is up now. So expect armor and weapons, some feedback, and maybe some skill gains or something like that. And a system to save your game, that'll be useful, if complicated to make. Hey, maybe I can even do multiple levels.
Oh, and something interesting, I found a bug. Memory leaks, they're causing the memory requirement of the game to rise the longer it's run, until eventually it will have to quit. I'm downloading a program that will help me track down what's causing that. It's not of critical importance, but it's on a list of things to do. Still, I think other things could use more of my attention right now, I'll get to the memory leaks once I've done some other things. Technically, they're probably not memory leaks. Rather, some bit of code is hanging on to variables it shouldn't need anymore, and keeps making more. Not so much garbage collection's fault. But I call 'em memory leaks. They act like memory leaks, and I'm going to track those down sometime.
...../.\.I'm.Okay!.
.....\_/...........
......|./..........
......|/...........
......|............
......|............
...../.\...........
..../...\..........
...................
It's another week, another update. What gifts does Kala bring this time? Why, a Body Part system that lets rats know they don't have opposable thumbs, and lets limbs be broken, maimed, and even completely taken off. Even threw in a splash of blood for you.
So yeah, there really isn't much more to say on the matter. You can now get into fist fights with the goblins and get your arm broken. You can also bleed out. You can theoretically survive without a leg, but if your head's damaged beyond repair, you're a goner. Also, rats have finally stopped picking up potions, and going for them. The AI has been shifted over to Creatures, rather than the main Update loop. This means that the AI can be more individual to the individual creatures. Go have fun with it.
As for what I'm working on next, probably armor and weapons. And getting that inventory menu to show you your items. Same concept, a screen to show your health. From here 'till version 0.0.1, I'm going to be focusing more on stuff that will use the systems I have in place, rather than go out of my way to make more. Really, a lot of the framework I needed is up now. So expect armor and weapons, some feedback, and maybe some skill gains or something like that. And a system to save your game, that'll be useful, if complicated to make. Hey, maybe I can even do multiple levels.
Oh, and something interesting, I found a bug. Memory leaks, they're causing the memory requirement of the game to rise the longer it's run, until eventually it will have to quit. I'm downloading a program that will help me track down what's causing that. It's not of critical importance, but it's on a list of things to do. Still, I think other things could use more of my attention right now, I'll get to the memory leaks once I've done some other things. Technically, they're probably not memory leaks. Rather, some bit of code is hanging on to variables it shouldn't need anymore, and keeps making more. Not so much garbage collection's fault. But I call 'em memory leaks. They act like memory leaks, and I'm going to track those down sometime.
Sunday, August 1, 2010
Adventurer 0.0.0.5, End of Month 1 - July
I bet you're wondering what that huge image up there is. I'll tell you - it's a healing potion mapped down to an atomic level. And it's in the most recent update, which I just posted at my Google Code page. Maximize the image if you want to see just how detailed it's mapping down that potion.
Now, I'm not saying that I track every single atom or anything like that. Or even that at the moment that all of the data held within is correct. But the system is up and in place, and I can now start working with it.
Adventurer 0.0.0.5 (I'm being conservative with the version numbers: I see 0.0.1 as being something I can reasonably call a game, and 0.1 as something I can be proud of. 1.0 Will be a stable 'finished' product, though I'll likely keep working on it pretty much forever. The big thing it does above the previous is that now I'm importing all the libraries of creatures, items, materials, and what-have-you all from text files in a folder labeled "Encyclopaedia Adventura". These text files simply hold information about creatures or whatever, using a system of "[TAG] variable". So "[CREATURE] human" says that a creature type named "human" exists. [/CREATURE] closes it. Everything in the middle is information about the human creature type.
The big advantage of this is that people will be able to mod the game easily just by adding, removing, or changing stuff in the encyclopedia file for it. The game file later opens it, searches for tags and data, and compiles it all into internal lists of Creatures and Items and stuff. So all I have to do to add a feature is to tell the code to look for another tag, add a variable to a creature, and update the library. So right now, theoretically, you can create any creature of any power that you want.
But right now it's pretty generic. I only have two creature images ready, @ and r. There's only health potions. And the rats drink the potions just as readily as the goblins. So the next update is going to fix that some. I'm putting in a Body Part system. In fact, if you look at the code, you can see that I've partway implemented it already. Basically, instead of saying "You're a rat, you can't drink potions", I can say "You can't drink potions because 1 - you're too dumb to figure it out and 2 - you need a body part capable of using items." This will be much more realistic. And it leads right into the second major thing I'm doing, an AI update. Right now, all creatures act the same because the AI code is in the Update code. But that's silly, it should be somewhere in the Creature code. So I'm getting around to implementing that Sentience object I set up earlier. Every creature will have one (possibly more in the future), called 'mind'. The mind will have a function for figuring out what the creature wants to do next. So then, all I have to do is say something like "action = thisCreature.mind.thinkOfAction();". It will then figure out what it can do, and what it should do. All this is planned for 0.0.0.6, which shouldn't take as long as this update to get around.
And finally, a retrospective on Month 1 - July. I have taken the game from a rough, weak concept to something that is starting to take shape. I've got some rather impressive systems in already, though sparsely populated. And I'm just bringing in more, now that the hard stuff is going by. Overall, I would say the work on this project is a huge success so far.
On the other hand, the project has almost no one watching it or downloading it. I have a whopping total of 16 downloads, most of those from people I already know. I have zero comments, except for a brief bit of interest on the Dwarf Fortress forums. I've only had one person contact me directly. I have 133 page views, most of those I bet come from myself.
Ah well, I'm doing it for the Fun and XP, not the Fame.
Adventurer gains +1 Months of Maturity Points.
Adventurer gains +1 Level of Awesome.
Kala gains +5 Update points.
Kala gains +4 Weeks of College.
Kala gains +1 Level of Game Programmer.
Now, I'm not saying that I track every single atom or anything like that. Or even that at the moment that all of the data held within is correct. But the system is up and in place, and I can now start working with it.
Adventurer 0.0.0.5 (I'm being conservative with the version numbers: I see 0.0.1 as being something I can reasonably call a game, and 0.1 as something I can be proud of. 1.0 Will be a stable 'finished' product, though I'll likely keep working on it pretty much forever. The big thing it does above the previous is that now I'm importing all the libraries of creatures, items, materials, and what-have-you all from text files in a folder labeled "Encyclopaedia Adventura". These text files simply hold information about creatures or whatever, using a system of "[TAG] variable". So "[CREATURE] human" says that a creature type named "human" exists. [/CREATURE] closes it. Everything in the middle is information about the human creature type.
The big advantage of this is that people will be able to mod the game easily just by adding, removing, or changing stuff in the encyclopedia file for it. The game file later opens it, searches for tags and data, and compiles it all into internal lists of Creatures and Items and stuff. So all I have to do to add a feature is to tell the code to look for another tag, add a variable to a creature, and update the library. So right now, theoretically, you can create any creature of any power that you want.
But right now it's pretty generic. I only have two creature images ready, @ and r. There's only health potions. And the rats drink the potions just as readily as the goblins. So the next update is going to fix that some. I'm putting in a Body Part system. In fact, if you look at the code, you can see that I've partway implemented it already. Basically, instead of saying "You're a rat, you can't drink potions", I can say "You can't drink potions because 1 - you're too dumb to figure it out and 2 - you need a body part capable of using items." This will be much more realistic. And it leads right into the second major thing I'm doing, an AI update. Right now, all creatures act the same because the AI code is in the Update code. But that's silly, it should be somewhere in the Creature code. So I'm getting around to implementing that Sentience object I set up earlier. Every creature will have one (possibly more in the future), called 'mind'. The mind will have a function for figuring out what the creature wants to do next. So then, all I have to do is say something like "action = thisCreature.mind.thinkOfAction();". It will then figure out what it can do, and what it should do. All this is planned for 0.0.0.6, which shouldn't take as long as this update to get around.
And finally, a retrospective on Month 1 - July. I have taken the game from a rough, weak concept to something that is starting to take shape. I've got some rather impressive systems in already, though sparsely populated. And I'm just bringing in more, now that the hard stuff is going by. Overall, I would say the work on this project is a huge success so far.
On the other hand, the project has almost no one watching it or downloading it. I have a whopping total of 16 downloads, most of those from people I already know. I have zero comments, except for a brief bit of interest on the Dwarf Fortress forums. I've only had one person contact me directly. I have 133 page views, most of those I bet come from myself.
Ah well, I'm doing it for the Fun and XP, not the Fame.
Adventurer gains +1 Months of Maturity Points.
Adventurer gains +1 Level of Awesome.
Kala gains +5 Update points.
Kala gains +4 Weeks of College.
Kala gains +1 Level of Game Programmer.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Friday, July 16, 2010
Version 0.0.0.4 - Work in Progress
WWWWWWWWWWWW
WW....@....W
WW........@W
.@.........W
WW......@..W
WW.........W
WWWWWWWWWWWW
So I'm working on version 0.0.0.4 of Adventurer, and I know it's been just two days since my last update. But I just had to share some of the cool things I'm doing, and have already got done. If you want to, check it out at the http://code.google.com/p/adventurerroguelike page, I've got a little mid-progress file up. Some of the new things I've got done already are: potions are working correctly, multiple monsters, monsters respawn, a scent trail system, a message system, and some optimization code. Next up is a sound system, and the aforementioned importing of libraries of creatures and items. I'll throw in whatever else I can. I want to keep a weekly major update schedule.
Let's go over this.
Potions work. You can [e]at them, which refills your health by 5. Monsters pick them up and know how to use them too. If you manage to kill one before they can drink what they've got, they'll drop everything in their inventory.
There's multiple monsters that respawn now. The level starts with five, and after a mystery number of turns, there's a random one out of the number of creatures on the level chance of spawning a new creature. The creature AI got some updating so that they can handle having others on the board with them. There's still a couple oddities, the most major being that they get a little confused if they bump elbows, take a 'wander' step, then are back at chasing the player next turn. They may also whack each other if they're both adjacent to the player and another creature. But overall, they play nice. That'll get a lot more work when I get around to working in individual personalities.
The scent trail system is an interesting and simple system that does a surprisingly good job. Put simply, every creature gives off its own distinct scent onto the tile it's on. Every cycle, the scent spreads. It does this by checking all tiles on the board, and setting each tile to the average of itself and its neighbors, minus some scent degrade. If a creature is on a tile where the scent is higher than their scent sensitivity, they'll know it's there and what it smells like.
I've got a message system working. You know that box in the bottom right that used to say only "Welcome to Adventurer"? Well, that's now your message box. Whenever your character notices an event that triggers a message, it ends up there. Later I'll put in an optional full message menu. Ignore the "You smell a goblin" spam in this one. Later, I'll code it to not bother with the obvious messages.
And finally, some optimization code that will be really useful in the future. See, there's multiple places it can process code. From the moment the player pushes a button, it heads down code paths. As it was before, it would have to complete absolutely everything before giving the controls back to the player. I figured it would start getting sticky feeling at some point. So I looked at the other place it can process: When the player isn't pushing anything, and it's waiting on a button press. So I put in another place in the code where I can put some processing, that will only activate if it has time for it. And it won't just throw it out if it doesn't have time; it'll queue up the cycles. That way, when it does have time, it catches up to where it would normally be. This should have almost nil effect on internal physics, and only when the player is rapid-firing button presses like move. But it should have a huge performance boost whenever it needs by putting off stuff for later.
And that's it. Expect the full 0.0.0.4 in a couple days.
WW....@....W
WW........@W
.@.........W
WW......@..W
WW.........W
WWWWWWWWWWWW
So I'm working on version 0.0.0.4 of Adventurer, and I know it's been just two days since my last update. But I just had to share some of the cool things I'm doing, and have already got done. If you want to, check it out at the http://code.google.com/p/adventurerroguelike page, I've got a little mid-progress file up. Some of the new things I've got done already are: potions are working correctly, multiple monsters, monsters respawn, a scent trail system, a message system, and some optimization code. Next up is a sound system, and the aforementioned importing of libraries of creatures and items. I'll throw in whatever else I can. I want to keep a weekly major update schedule.
Let's go over this.
Potions work. You can [e]at them, which refills your health by 5. Monsters pick them up and know how to use them too. If you manage to kill one before they can drink what they've got, they'll drop everything in their inventory.
There's multiple monsters that respawn now. The level starts with five, and after a mystery number of turns, there's a random one out of the number of creatures on the level chance of spawning a new creature. The creature AI got some updating so that they can handle having others on the board with them. There's still a couple oddities, the most major being that they get a little confused if they bump elbows, take a 'wander' step, then are back at chasing the player next turn. They may also whack each other if they're both adjacent to the player and another creature. But overall, they play nice. That'll get a lot more work when I get around to working in individual personalities.
The scent trail system is an interesting and simple system that does a surprisingly good job. Put simply, every creature gives off its own distinct scent onto the tile it's on. Every cycle, the scent spreads. It does this by checking all tiles on the board, and setting each tile to the average of itself and its neighbors, minus some scent degrade. If a creature is on a tile where the scent is higher than their scent sensitivity, they'll know it's there and what it smells like.
I've got a message system working. You know that box in the bottom right that used to say only "Welcome to Adventurer"? Well, that's now your message box. Whenever your character notices an event that triggers a message, it ends up there. Later I'll put in an optional full message menu. Ignore the "You smell a goblin" spam in this one. Later, I'll code it to not bother with the obvious messages.
And finally, some optimization code that will be really useful in the future. See, there's multiple places it can process code. From the moment the player pushes a button, it heads down code paths. As it was before, it would have to complete absolutely everything before giving the controls back to the player. I figured it would start getting sticky feeling at some point. So I looked at the other place it can process: When the player isn't pushing anything, and it's waiting on a button press. So I put in another place in the code where I can put some processing, that will only activate if it has time for it. And it won't just throw it out if it doesn't have time; it'll queue up the cycles. That way, when it does have time, it catches up to where it would normally be. This should have almost nil effect on internal physics, and only when the player is rapid-firing button presses like move. But it should have a huge performance boost whenever it needs by putting off stuff for later.
And that's it. Expect the full 0.0.0.4 in a couple days.
Tuesday, July 13, 2010
V 0.0.0.3 - Items and Optimization
What's that I hear? Is that an update? Why yes it is. Version 0.0.0.3 is up. I basically ripped the guts out of the game and stuffed them back in, in different places. I put things like Move where they belong, and simplified my 8 or 27 or so direction command sections into two simple sections. One lists those 8 directions, the second does a short loop and catches them all. 1/4th the size of before.
I've got items working now, too. Now, it's nothing too major at the moment. But it's a new toy you can play around with. The level generation creates five health potions, and puts them randomly around the dungeon. You can [,] pick them up and [d]rop them down elsewhere. You can even try to [e]at them. (I see eat and quaff as the same thing - one's solid, the other's liquid. So my [e]at command will do either.) There is a little bug though that's keeping potions from working perfectly. When I call the Eat command, it calls the Item object's Eat command, instead of Potion's Eat command. I need to look more into having Potion's Eat command override that, if the Item in question is a Potion.
0.0.0.4 should see that fixed, as well as a true inventory menu. Also, monster spawning. The most major thing I want to implement, though, is to have the game load in its libraries of default items and creatures from text files. That way, anyone outside the code can mod those text files, and mod in/out creatures and items. That should really increase the variety in the game. And you know what? I have some ideas for neat tricks I can get going without much work, I'll try to throw those in too.
I've got items working now, too. Now, it's nothing too major at the moment. But it's a new toy you can play around with. The level generation creates five health potions, and puts them randomly around the dungeon. You can [,] pick them up and [d]rop them down elsewhere. You can even try to [e]at them. (I see eat and quaff as the same thing - one's solid, the other's liquid. So my [e]at command will do either.) There is a little bug though that's keeping potions from working perfectly. When I call the Eat command, it calls the Item object's Eat command, instead of Potion's Eat command. I need to look more into having Potion's Eat command override that, if the Item in question is a Potion.
0.0.0.4 should see that fixed, as well as a true inventory menu. Also, monster spawning. The most major thing I want to implement, though, is to have the game load in its libraries of default items and creatures from text files. That way, anyone outside the code can mod those text files, and mod in/out creatures and items. That should really increase the variety in the game. And you know what? I have some ideas for neat tricks I can get going without much work, I'll try to throw those in too.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Thursday, July 8, 2010
Items and Organization
WWWWWWWWWWWW
W.......@..W
W..........W
....@......W
W........!.W
W..........W
WWWWWWWWWWWW
*****
Items
*****
So it turns out it wasn't that hard to get the implementation of items underway. In fact, I've already defined the potion class, which is a specific type of item, so I'm learning more about inheritance. The level defines a Potion, a health potion, and starts to spawn these randomly around the dungeon. This is all fine and dandy, and it works perfectly, except for one bug: All those potions end up on the same tile.
I don't know whether it's a problem with the Random function, or something I'm doing with determining item placement, but I'll figure that out.
************
Organization
************
Another thing I'd like to smooth out, that won't really have an in-game effect, is how I'm organizing what goes where. For instance, the Move Creature function is sitting up in the main update code, instead of belonging to the Creature class. The Creatures and Items are created as part of the Level, instead of being a list of them on the individual Tiles.
0.0.0.3 should see these properly organized, and proof of concept Items should be up.
W.......@..W
W..........W
....@......W
W........!.W
W..........W
WWWWWWWWWWWW
*****
Items
*****
So it turns out it wasn't that hard to get the implementation of items underway. In fact, I've already defined the potion class, which is a specific type of item, so I'm learning more about inheritance. The level defines a Potion, a health potion, and starts to spawn these randomly around the dungeon. This is all fine and dandy, and it works perfectly, except for one bug: All those potions end up on the same tile.
I don't know whether it's a problem with the Random function, or something I'm doing with determining item placement, but I'll figure that out.
************
Organization
************
Another thing I'd like to smooth out, that won't really have an in-game effect, is how I'm organizing what goes where. For instance, the Move Creature function is sitting up in the main update code, instead of belonging to the Creature class. The Creatures and Items are created as part of the Level, instead of being a list of them on the individual Tiles.
0.0.0.3 should see these properly organized, and proof of concept Items should be up.
Labels:
adventurer,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Tuesday, July 6, 2010
Version 0.0.0.2 is up!
**************
Version 0.0.0.2
**************
After nearly three weeks of work on pathfinding, version 0.0.0.2 is up. It really shouldn't have taken that long, I was moving onto a project that is now a core system within the game, when I should have just thrown something quick up and work on other things. But no matter. It's done now, and now I can focus on the quicker-to-implement things. In fact, I went ahead and threw in a little bit of code already in 0.0.0.2. If a creature doesn't see the player, it'll path to where it last saw the player. If still nothing, it will go back to wandering around. It sounds simple, it wasn't that hard to put in. But it greatly enhances the overall effect and realism.
That's the kind of things I'm going to be working on for 0.0.0.3. Quick, easy to implement things, as well as some general code improvement. After all, Move Creature is still the Level object's job, when it should be the job of the creature itself. Another rough edge is that creatures are stored in an array, when they should really be a list. Switching from an array to a list should speed things up, as well as allow a limitless number of creatures. I think I can put in creature spawning for 0.0.0.3.
I hope to have 0.0.0.3 ready within the next few days, and again, the project can be found at code.google.com/p/adventurerroguelike.
Version 0.0.0.2
**************
After nearly three weeks of work on pathfinding, version 0.0.0.2 is up. It really shouldn't have taken that long, I was moving onto a project that is now a core system within the game, when I should have just thrown something quick up and work on other things. But no matter. It's done now, and now I can focus on the quicker-to-implement things. In fact, I went ahead and threw in a little bit of code already in 0.0.0.2. If a creature doesn't see the player, it'll path to where it last saw the player. If still nothing, it will go back to wandering around. It sounds simple, it wasn't that hard to put in. But it greatly enhances the overall effect and realism.
That's the kind of things I'm going to be working on for 0.0.0.3. Quick, easy to implement things, as well as some general code improvement. After all, Move Creature is still the Level object's job, when it should be the job of the creature itself. Another rough edge is that creatures are stored in an array, when they should really be a list. Switching from an array to a list should speed things up, as well as allow a limitless number of creatures. I think I can put in creature spawning for 0.0.0.3.
I hope to have 0.0.0.3 ready within the next few days, and again, the project can be found at code.google.com/p/adventurerroguelike.
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
pathfinding,
project,
roguelike,
rpg
Sunday, July 4, 2010
Pathfinding and Binary Search
.........
.........
....W....
.@..W..O.
..xxWxx..
....x....
.........
*************
Pathfinding
*************
I'm in the process of coding the main pathfinding code of Adventurer. You may be interested to know that it isn't as simple as "go here", or "move towards here". No, pathfinding is a problem that has plagued and intrigued coders for years. It handles the problem of figuring out how to get from point A to point B. I've looked at the Bresenham Line Algorithm before, and I use it for my line of sight calculations. But if I used a pure line for deciding where to go, creatures would endlessly bump into walls if it was the most direct route in a wall-less environment. That's unrealistic and not very fun.
So I'm looking into what is known as the A* pathfinding algorithm. What is this, you might ask? Put simply, it looks at all adjacent tiles, guesses which one brings it closer to the target, and looks at all adjacent tiles to that one. It keeps looking at the shortest paths it's found, combined with its guess at which is next. This bit of code is very efficient, and only rarely wrong, and only by a little even then. It's perfect for what promises to be the processing-heavy Adventurer.
Now, one crucial part of this is finding the lowest number in a list of numbers. I've found it's easiest for my purposes to keep the list in order, and just pluck from the bottom. The only problem comes when it comes time to put a new number into the list, i.e. the best path estimate of a tile. I have to find where it goes. Now, I could look each and every spot, and figure out where the number I'm putting in is greater than the number to the left of it, and less than the number to the right of it. This is known as a sequential search, and it's fine if you just have a few numbers in your list.
But this list is tracking all tiles adjacent to the ones it's looked at. this could be hundreds of tiles. But there's a nifty trick that works perfectly. It's known as a binary search. It works like this: Look at the number in the middle. If yours is higher, look only in the numbers to the right and look halfway there. Same if it is lower, but for the left side. Eventually, you'll find the spot where your number is right between two. Suddenly, 2 million items takes at most 20 cycles of this pattern.
So that's what I'm implementing in my code: an A* pathfinding algorithm, saving its values in a list with binary search. It might not be the absolute most efficient thing out there, nor the easiest, but it combines the two worlds in the best way I can think of. I can expand and fine tune it later if I need to.
I expect to have this implemented within a couple days in Adventurer, and have a new download up. Then that test critter can hunt you down much more intelligently. >:D
The game can be found at code.google.com/p/adventurerroguelike
.........
....W....
.@..W..O.
..xxWxx..
....x....
.........
*************
Pathfinding
*************
I'm in the process of coding the main pathfinding code of Adventurer. You may be interested to know that it isn't as simple as "go here", or "move towards here". No, pathfinding is a problem that has plagued and intrigued coders for years. It handles the problem of figuring out how to get from point A to point B. I've looked at the Bresenham Line Algorithm before, and I use it for my line of sight calculations. But if I used a pure line for deciding where to go, creatures would endlessly bump into walls if it was the most direct route in a wall-less environment. That's unrealistic and not very fun.
So I'm looking into what is known as the A* pathfinding algorithm. What is this, you might ask? Put simply, it looks at all adjacent tiles, guesses which one brings it closer to the target, and looks at all adjacent tiles to that one. It keeps looking at the shortest paths it's found, combined with its guess at which is next. This bit of code is very efficient, and only rarely wrong, and only by a little even then. It's perfect for what promises to be the processing-heavy Adventurer.
Now, one crucial part of this is finding the lowest number in a list of numbers. I've found it's easiest for my purposes to keep the list in order, and just pluck from the bottom. The only problem comes when it comes time to put a new number into the list, i.e. the best path estimate of a tile. I have to find where it goes. Now, I could look each and every spot, and figure out where the number I'm putting in is greater than the number to the left of it, and less than the number to the right of it. This is known as a sequential search, and it's fine if you just have a few numbers in your list.
But this list is tracking all tiles adjacent to the ones it's looked at. this could be hundreds of tiles. But there's a nifty trick that works perfectly. It's known as a binary search. It works like this: Look at the number in the middle. If yours is higher, look only in the numbers to the right and look halfway there. Same if it is lower, but for the left side. Eventually, you'll find the spot where your number is right between two. Suddenly, 2 million items takes at most 20 cycles of this pattern.
So that's what I'm implementing in my code: an A* pathfinding algorithm, saving its values in a list with binary search. It might not be the absolute most efficient thing out there, nor the easiest, but it combines the two worlds in the best way I can think of. I can expand and fine tune it later if I need to.
I expect to have this implemented within a couple days in Adventurer, and have a new download up. Then that test critter can hunt you down much more intelligently. >:D
The game can be found at code.google.com/p/adventurerroguelike
Labels:
adventurer,
algorithm,
c#,
code,
donationware,
free,
freeware,
game,
project,
roguelike,
rpg
Friday, July 2, 2010
Blog Launch for Adventurer
**************************
An introduction to Roguelikes
**************************
Roguelikes. They're one of the most amazing experiences in gaming you can have. They're often free, in both terms of software. Free as in freeware, and free as in open source. They're amazingly deep and complex, attaining quality of gameplay that is rarely seen even in commercial games of today. How do they do this? They dump the sound department, music department, texture department, model department. The entire world is rendered in ASCII tiles, also known as letters. But don't let this throw you off.
First, plenty of Roguelikes offer graphical tilesets. Some mods even offer isometric or 3D views. Second, the ASCII can be surprisingly beautiful when pulled off right. Third, ASCII is raw utility incarnate, letting you see at a glance what you're up against. Fourth, ASCII has its own charm in letting you visualize the various creatures, items, rooms, or whatever else you'd like, much like a book, instead of having the game's artists visualize it for you, with less than perfect results.
************************
The Launch of Adventurer
************************
These are the chronicles of one coder's journey into the making of a Roguelike. He has big plans for his pet project, venturing to recreate the very structure of the universe in a computer's algorithms. This is no ordinary attempt at simulation, for this is a game, a glourious experiment into what it would be like to be an adventurer. No restraints beyond the world's laws. And some things can bend even those. No string parser telling you that you can't take ye flask. This is your quest, and ye can do what ye like, well-advised or not.
So go forth and Adventure!
******************************
Where's the Development at Now?
******************************
It's not finished yet, but it does have and will continue to have working updates that you can download and try out. It's an open source project done in C#, but you can just run the .exe file after extracting. Right now, I'm on version 0.0.0.1, the initial release of what I have done so far. Don't expect it to be a complete game at this point, but it's definitely a start, and I'm continually working on it.
Dev team? What dev team? I'm just the one coder, and I have high hopes and plans, that I am constantly working towards. Any help is appreciated. Especially donations. If I get enough coming in, I can host it on its own site. Or do anything else the donors suggest, really. If you do donate, tell me what name you'd like to be called as and a simple message or shout out, and I'll post Blog updates of who donated, how much, and what they'd like to say. I suggest $5.00 donations, but don't go below $0.30, PayPal fees exceed the donation then. Donate to me at PayPal at zahru.tesla@hotmail.com. It'll be much appreciated.
***********************
How do I Get This Game?
***********************
It's not finished yet, but you can keep up with the development and download the working game files as they come at Google Code. The project has its own page at code.google.com/p/adventurerroguelike. As of now, version 0.0.0.1 is out. It generates levels and has line of sight and fog of war. It has a foe you can fight. Soon, pathfinding will be implemented better and hostile opponents will actively pursue you.
*************
In Summary...
*************
It's a Roguelike. Get it.
Google Code:
code.google.com/p/adventurerroguelike
Donate to:
zahru.tesla@hotmail.com, at PayPal. You'll get your name recorded in the Blog if you like.
Feel free to give comments and suggestions, or even do some work of your own on the files. Show me, and I may just include your code and give special thanks.
Subscribe to:
Posts (Atom)