Monday, January 24, 2011

Adjusting to MonoDevelop

I was thinking that I should add some more posts between the main game-update posts, particularly if they might be useful to others out there. Well, I think this might be one of those. Last week, I switched to Ubuntu and MonoDevelop. MonoDevelop is to any platform what Visual Studio is to Windows. Overall, it's very similar and I'm getting along pretty well with it. But then I hit a problem of the sort I've encountered before - something I've done is causing every creature except to player to hit with a damage of 1. My normal process is to run up to a point where creatures exist, pause, and check what's in currentLevel.creatureList, which is of type List, and holds all the creatures in the level.

So I do that in Mono. I set a breakpoint, and stop it in a good spot to check what's going on with creatures. I hover over "currentLevel", that comes up with some info on the level, and a plus sign. I hit the plus sign, and expand it open. In there is a lot of information about the level - including creatureList. There's a plus next to it, so I push it to expand and... nothing. The plus just disappears, nothing changes. I use Expression Evaluator on it - "Expression not supported". So apparently the MonoDevelop version I have doesn't handle Lists too well. I did, however, learn that I'm a little old on the version I have, and that newer versions have done some work on debugging and tools, even specifically mentioning that the "Expression not supported" shouldn't be appearing anymore. So I'm updating to the new version at the moment, where hopefully I'll be able to check what's in a List.

I also learned about this program called Gendarme. Apparently, it can analyze a .NET/Mono program and help ensure you're following best practices, by pointing out common inefficiencies and usually poor practices. Of course, you're free to disregard any of the advice it gives. But I think it is a good second opinion that I'll be running through my code once it gets downloaded.

Overall, I'm focusing my efforts elsewhere while that all downloads. I'm adding items to the item library, and updating the code that loads in items. I'll be adding in new capabilities, new branches of code logic to handle all the new effects and quirks the new items are bringing in. I probably won't finish all of their special abilities in one go - I'm focusing more on just getting them in. But I will get all of them, and I will try to get as many specials in for the items as possible. I'm also building on and refining things like the material system; when I work more on things like crafting, magic, chemistry, and physics arcs, it will become quite important. Things like letting acidic creatures corrode iron items, or having things rust over time, or self-perpetuating fire reactions. Making innovative things like chlorine gas traps - which would of course interact with the H2O part of most living things, turning into an acid coating. But for now, just improving on the bare bones items that were in before.

Friday, January 21, 2011

Adventurer 0.0.2.5 - Cross-Platform with Mono

At long, long last, I can honestly call Adventurer cross-platform. It definitely runs on Windows and Ubuntu (Linux), and should run on Macintosh. Someone tell me if it does, if you've got a Mac. So if you've been following me the past week, I got almost nothing done with items. I did, however, go through a major operating system shift that took up most of my time. I am now primarily a Ubuntu user. Yay! I like it.

I am now using MonoDevelop to work on Adventurer, rather than Visual Studio. It seems largely the same, and it shouldn't be much of a leap for me. It also helps ensure that anything I do will be compatible with Mono, and so Adventurer should remain from now on fully cross-platform. Realize that I'm still doing this in C#: I've had a lot of debate in my web classes (which primarily use C++) about whether C++ or C# is better. While C++ has been around longer, I've found that I can get to anything C++ can do whenever I like, but usual programming is much more intuitive and faster. The main complaint is that C# isn't cross-platform. To that I say: Look at this right here. You may not have believed me, but right here is proof. I have run a C# program on something other than Windows.

Okay, so I didn't get much done with items. Like, frankly anything. Well, I got sidetracked on last week's bit of awesomeness. By the time I finished, it was already seven days, and time for an update. So here you all are. Windows users are going to be a little disappointed, but Linux and Mac users should at long last be able to play this thing without having to go to extreme emulation measures.

Next week will be back to work on items and other ideas I've had building up. Also an interesting note: It is 1/21/11 as of me posting this. Next week exactly, 1/28, is my birthday. I'll be 20. Wow, that feels really major when I write it like that. So what do I want? Well, I'm hoping that I would get a donation. Any donation. I've been working on Adventurer for several months, and I have almost $7 built up from ads. And if you aren't able or feeling up to giving me a monetary vote of confidence, then how about a textual one? Comment, tell me what you think, offer constructive criticism and suggestions. You may not think it, but seeing a new comment in my inbox really does lift my spirits.

Tuesday, January 18, 2011

Rant - Ubuntu 10.04 (Lucid Lynx) Installed


Greetings from LinuxLand. I've just installed Ubuntu 10.04 (Lucid Lynx) and got dial up working. It took at least eight hours of solid work. First, I got the ISO file. Then, I run it through DaemonTools and see that to do the fullest install, I have to boot from CD. And since I was using a virtual drive, I obviously can't boot from it. Luckily, my cousin bought and forgot a pack of music CD-Rs last time she was here. I grab one of those and try to burn the ISO. Nero spits out the disc and says the drive was empty. I put in another. Nero spits it out and says the drive is empty. I research the problem for a long time, figure out that Nero's just being oversensitive about not wanting to turn a disc into a frisbee. So I download another CD burner, and actually manage to successfully burn the ISO. So I restart, trying to boot from disc.

I then discover that USB keyboards do not work during the critical part of BIOS where I get to choose what system to boot to. I end up booting to Windows by default. I research how to fix that little problem, because I don't want to have to use an old-style keyboard all the time just to select something to boot to. For future reference, there's a BIOS setting you can get to early on with an old-style keyboard. You know that stuff that appears right when you turn on your computer, that says something like "Push DEL for Setup"? Whatever key it says is what you should push. So I go in there, toggle the setting that was for some stupid reason defaulted to disable USB keyboards and mice. I reboot again.

I get to select Ubuntu this time. It starts up the purple Ubuntu load screen and... kicks me out to the BusyBox prompt with an error "Unable to find a medium containing a live file system". Which is dumb, because the installer it should be running from disc will go about making a partition, aka a file system space for Ubuntu to work in. I reboot in Windows, and research some more. There isn't a good answer. The problem is rare. People make dumb suggestions like "maybe your Live Disc is corrupt", when the thing runs just fine in Windows, not to mention the load screen works, etc. So instead of doing a full install, I give up on that train of thought and just install through Windows. Surprisingly, it works. I reboot into Ubuntu, and it successfully loads up the graphical interface. Everything seems to work just fine.

I go into Administration->Network Connections. There's options to set up all sorts of internet connections - except dial up. I reboot in Windows and research how to do it. It says there's an Administration->Network menu with a tab that has what I need. I reboot in Ubuntu and check - nope. I reboot in Windows and see why it isn't there. I need to download a package to get it. Notice the Catch-22 here - to get internet, you need internet. If it wasn't for me having a dual-boot setup for Windows, I would be fried here. I find how to get to files on the Windows C drive, so I can transfer it. I download that package. Reboot in Ubuntu. Transfer it over. Install it. Administration->Network exists then, except... the tab I need is completely missing. Everything else I need is there, but that one tab isn't. I reboot in Windows. Turns out that tab may not be the best way to go about things. Being open source, there's many different files and packages to do the same thing, and you get to pick and choose which you download. GNOME PPP Dialer is what I go with. I download it and its dependencies. Reboot in Ubuntu, and install them. I open up PPP Dialer.

I put in the username, password, and dial number. I dial an- wait, no I don't. The default modem doesn't exist. I go to that tab and autodetect modem. It can't detect a modem at all on my machine. I reboot in Windows and research. It may be skipping over a modem that actually exists. I check what my modem is, an Agere Softmodem, installed in PCI slot 2. I reboot in Ubuntu and select PCI slot 2, and dia- nope. It is a different error though. "Input/Output Error". I reboot in Windows and research.

Softmodems, also known as Winmodems, do not play well with Linux. There is a way to deal with the problem, but it will be hard. Hard enough that most people recommend paying $20 for a hardmodem and waiting a month for it to arrive, and then to go through the trouble of physically installing the thing. But no, I'm willing to wrestle with it. There is a website, http://www.linmodems.org, that is all about handling the issue. I have to download scanModem for Ubuntu to find out what chipset I'm using. So I do. I reboot in Ubuntu, install, and run the thing. It puts out a very technical and complicated file (has hex codes and such), but it tells me what chipset I'm using. I reboot in Windows. From what the file tells me, I download a precompiled driver. I reboot in Ubuntu. I install the file. I follow what the instructions, including Terminal instructions and... wait, error during one of the commands. What does "-e requires -E" even mean? I reboot in Windows and research. I need to compile the raw C files using Terminal. I download them, and reboot in Ubuntu.

I follow the instructions and compile the raw files in Terminal, and actually get the .ko files. I follow the instructions, and finally get a new driver file to point PPP Dialer to. I do that, dial, and it actually starts working... and then, right when it should have connected, it stops and says it failed. I check the log file. The modem is working. It dials. It gets a carrier... and then immediately drops it, right as the "Welcome to [provider].net!" message comes through. Apparently there's a timeout problem or something. I reboot in Windows and research. Well, that problem is rare. But there's some things I can try to modify in wvdial.config. I reboot in Ubuntu and open the file and start typin- wait, "Read-Only"? What's up with that? I go to the properties. "Settings cannot be modified because you are not the owner". What the heck, Ubuntu. I came to you partially because Windows was doing pretty much the same thing. I reboot in Windows and research.

I can apparently get at it from Terminal with the "sudo" command to run it as a super user. I reboot in Ubuntu and... discover that I have no clue how to get into the directory containing it from Terminal. And I can't move it because it's in the root level space. I look for a graphical "run as super user" thing. None exists. I reboot in Windows and research. People say stuff like "You really shouldn't need to, you can do it through Terminal with 'sudo'." without saying how to do it graphically. But eventually, eventually, I find the Terminal commands that will unlock user "Root", who has god powers over the system. I do it, and run as user Root. It works. I am RootKala. I tweak the wvdial settings. Dial. Fail. Tweak. Dial. Fail. Enable Stupid Mode and disable check for carrier, and add a ton of delay before disconnecting. Dial. And finally, a full day after I started the whole process, it connects. I am online.

I am probably going to use Ubuntu for anything that I don't specifically need Windows for. From a principle standpoint, I love free, open source things. From a practical standpoint, it is very reactive and very moddable. Having a dual-boot system is also a huge security boost. If a virus affects one system, or something brings down my internet somehow (like I had happen on Windows once when a new add-on brought down Firefox's ability to start up), I have the other system to work through the trouble.

Tl:dr -- Ubuntu was easy to set up through Windows, when I did exactly that. Dial up with a softmodem was probably the hardest computer thing I have ever had the displeasure of attempting, that actually succeeded.

Thursday, January 13, 2011

Adventurer 0.0.2.4 - Lowercase Creatures and Timing System


The bestiary file was what, 2 kb before? 82kb now. I spent a good deal of time for this update on filling out the bestiary, referencing Nethack data. I got all the lowercase creatures. If I'd done the rest, it would be well into next week before the update would be out.

I also worked on the timing system. Before, it progressed by having the player move, then all the other creatures would move, then the world would update. IT was very quirky and I ended up breaking a lot of things that way. Doing any sort of nonstandard timing was near impossible. So I just rewrote all that to be a tick/energy based system. Basically, it simulates the flow of time and only then does it start assigning who's turn it is, based on said flow of time.

This did and enables many things. First and foremost, creatures have varying speeds and it all seems to be working perfectly. If you're a jelly, you're not going to be moving very quickly. If you're a warhorse, you're going to be racing circles around opponents. Another thing this enabled is the easy resolution of the tripwire issue - yes, tripwires finally work. I also reduced the number of them on any given level. There were really just way too many, especially since there isn't variety in traps yet.

Next week, I'm working on some new features, rather than just filling out the ones that are already there. Mostly, I'm going to try to add new types, and more items of types that are already in. Items with different uses, more items to implement in crafting, more varieties of potions, scrolls for one-use effects... heck, I may even get some magic working. Creatures got their week of targeted development, now I'm going to give items theirs.

Sunday, January 2, 2011

Adventurer 0.0.2.3 - Fan Fixes and More Creatures

So I promised a full library of creatures in yesterday's post. Well, that was stupid of me. Two problems kept me from keeping that promise. The first, is that there is a lot of reference material for creatures I'm using. A loooot of creatures. I only finished 'd' before I noticed the second problem. The creature select menu can't handle them all quite yet. You run out of letters.

So, I'm just going to finish that up and get a multi-page system working. I'm also going to add Effects, so that creatures can have special attacks, there can be more potions, and scrolls as well. Also, finishing up some fan suggestions I didn't quite get implemented yet.

What I did do is the aforementioned ton of fan-found bug fixes. Many, many of the bugs in the game have been fixed. Or at least I think they've been. Further research is always appreciated.I've also implemented creatures 'a' through most of 'd'. Okay, that's not that much. But it's still like triple of what was in already, and I'm going to be finishing filling it out next week.

So there's really not much to say that I didn't yesterday. Enjoy.

Saturday, January 1, 2011

End of Year One

I was going to post an update tonight. I really was. But there's a little more to do left before it's ready. I'd rather post the complete thing tomorrow, than leave you for a week with a bestiary disproportionately full of insects and blobs, but lacking in everything else. My resolution this year? Lose some weight. Write something. Make Adventurer popular enough to get Google to pay me something for the ad space. And I know I've just jinxed all three.

So it's 2011. Okay, only half a year of Adventurer. But it's a big milestone. So what have we accomplished so far? Well, Adventurer has gone from a small hobby project using the restrictive but simple XNA, to what is becoming a truly playable or even enjoyable roguelike using more sophisticated, easier to run techniques such as SDL. When I started, I had no idea what a List was. Now, I know how to do A* pathfinding with binary search.

I've learned a lot through the process, and I'm still learning more. Looking back, I can almost kick myself on some of the ways I stumbled through the process. But I was learning, I gave it my best, and darn it if I didn't just power through all the problems and turn out a working roguelike. Now that I know better, I'm going back and upgrading some of my old code. As well as developing more.

What am I doing for tomorrow's update? Well, a good deal of what I've done is fan-found fixes (fanciful alliteration there) and suggestions. Don't groan: it's part of establishing Dev Team Thinks Of Everything. More appropriately Anonymous Thinks of Everything and Dev Guy Makes it Happen. This week's major contributor towards making bug fixes happen was the forum-goer known as Archenon, who broke the game in ways I didn't even know were possible. I'm also adding a lot of creatures, so that next week I can focus on making them unique with status effects and such. You know, spiders that can web things up, wizards that can confuse you, gels that can hold you in place, poisons, etc. Also I'll be working on potions and possibly scrolls to do the same things. I'm afraid tripwires are going to be broken still until I next week add an effect to stun/paralyze you for a short duration.

The blog stats: December - 803 views +40% All time - 2292
The main page stats: December - 862 views +29% All time - 2462
Ads/Donations: December - $1.69; $0 All time - $6.32, $0

What does this tell me? Well, there's a linear growth rate of 30-40% on views, it's always seemed to be that way. Which still means the absolute increase in views is exponential. Notice that though Adventurer has been going for seven months, December had a third of the views. Exactly. Ad revenue has also been on the rise. Maybe if it keeps increasing, I'll be able to get some actual web hosting. If you think that is a good use of the money. Really, what do you think I should do with it? Also, it makes me a sad Kala that no one out of 2000+ people has donated anything. I thought I would get a rate more like 1%. Or 0.1%.

Some other interesting stats are from the scary amount of data Google Analytics offers. For example, I know most of you are browsing this blog with Firefox on a Windows operating system running in 24/32-bit color at 1280x1024 screen resolution, and you live in the United States in either Washington, California, Tennessee, Texas, or New York. Whoever that is near Bellavue, Washington: I'm on to you and your 48 visits. Admit it, you're obsessed. >:D Also, ha ha, I get it Finland: one of your towns is named Kalasen. Although I don't get YOU, Russia at third place. China still remains sadly unaware Adventurer exists.

So happy new year everybody. And remember: Both I and Google know what you did. Yes you.