Monday, May 9, 2011

Blog Move

I've moved all future posts about my games to kalasengames.blogspot.com. I will soon be going around and updating my other stuff to reflect this.

Sunday, May 8, 2011

Free Camera and Lifted Vertex Limit

I redid the camera to be a free roaming camera. Later I'll stick some limitations and physics to be associated with it so that the camera is more like the eyes of the player. But this is excellent for my purposes right now. Instead of being stuck focused on one spot, I can fly anywhere to observe how the world is coming along.

While redoing the camera, I was going to have to redo a bunch of the draw code. So, while I was at it, I lifted off the vertex limit. Instead of being limited to 65000, it can go as high as it needs to. Only limit will be processing speed. Doing that was quite a bit of work, in that it broke quite a bit and I only just now got everything drawing again. But it does. The only thing is some minor glitches about which faces should be drawing. Shouldn't be much to fix.

After this, instead of height maps, I'm going to focus on what's known as "picking". Basically, it's how you decide what object the center of the screen is pointing at. With that, I'll finally be able to get back to the world where data is virtual instead of necessarily being rendered right on the screen. So I'll be able to do stuff like letting you be able to open doors. Or yes, digging out and placing blocks. The engine behind what I'm doing being similar to Minecraft and Infiniminer, that shouldn't surprise you. It's only once I have this up that I'll be able to do stuff like NPCs and procedurally generated quests.

Friday, May 6, 2011

Textured and Optimizations


I got the blocks to texture, which is a huge step. I also did some optimizations, including one huge one that basically means I shouldn't have to worry about draw speed for quite some time.

There's only two problems I've run into at the moment. The first is in increasing the number of blocks - the "draw all the vertices in this list" command can only take 65000 vertices before it complains. You can get that many when you up the number of blocks. I'll have to split up the vertices to draw into multiple lists.

The second is in baking the "will this face every be seen" info in, when there's a ton of blocks. It only has to be calculated once, right at the beginning. But there's a lot of blocks to go through, and it can take a little while. I'll have to look at what's slowing that down.

Good news is that I can put that off for a bit until I start working with a huge world. I'll work on the free roaming camera next, and make it more so that the player is the camera.

I'm Making a Note Here



Huge success. I finally got blocks procedurally drawing in 3D. With a camera that can navigate around them. I'm still not done with that though. I've got a lot of optimizations to do. To understand them, let me try to explain the process as simply as I can.

The most efficient way to draw something in 3D is to put each vertex into what's known as a VertexBuffer. Then, all at once, you draw them. Something about the order you fed them in determines where the faces are drawn on them. Also, you end up feeding in more vertices than you finally use, because some of the ones you fed in are shared. For each triangle, you need 3 vertices. For each square, you therefore need 6. And for each cube, you need 36. On a cube, a total of 8 vertices are eventually actually used. If you don't fill the buffer and render them all at once, you end up with wasted things that could have been shared.

Right now, I draw each block individually. I tried combining them all into one buffer the first time, but that didn't work out. From the point I'm at, I can now move towards doing that optimization.

Second, the algorithm I mentioned previously about which faces need to be drawn. Right now I'm not using that - I draw every face of every block. I need to do that optimization. Once all that is done, I should be able to render a ton of blocks very efficiently. Right now, before the optimizations, it's lagging a little with only 20x20x2 blocks. But there's a lot of optimization that can be done.

3D Faces and Camera


I'm still working on getting faces to draw properly. The problem is that they don't want to pay attention to the camera - they're pasted directly on the screen, with no basis on where they actually are in the world and where the camera is. Attached is a screenshot of that, with a square and cone imported model to demonstrate that.

Yet it does seem to be the way to do it. My guess is that I've left those in some sort of render mode that I don't need; I'll see about rendering them the same way as the models. On the plus side, I know how to navigate a 3D camera now. I just have to get the faces drawing right in 3D space. If I can get that going, I can start assembling the world out of blocks.

Thursday, May 5, 2011

Block Engine

Okay, so forget Infiniminer. I just came up with a good algorithm for deciding which faces of a block need to be drawn. It's working perfectly. Quite simply, it checks whether the block adjacent to the face is transparent. If so, the face needs to be drawn. BAM. I bake it into the blocks at first world gen, and will update it whenever transparency of an adjacent block changes.

Also, at most three faces will need to be drawn on any block at any time, depending on the position of the player relative to the block. If the camera is higher that the block, the bottom obviously doesn't need to be drawn. Same for all sides. It's a simple "is a greater than b" check, and saves a face needing to be drawn.

The tricky part now is drawing individual faces in 3D space. Not to mention it will need proper texture sometime. So, I'm looking through XNA guides for drawing things in 3D space. A lot of the tutorials are for 3.1, and don't work with 4.0 which I'm using. Others are 4.0, but use stuff that only the HiDef profile can use, which my computer isn't wanting to play nice with. I got one tutorial working that drew a textured square perfectly... directly onto the 2D plane of the screen. I need it in 3D space, where the camera can move around it. I'm looking at a MSDN guide at the moment.

I'll keep you posted on progress. As soon as this is worked out, I should be able to post screenshots.

Wednesday, May 4, 2011

Infiniminer Source

I spent the day working with XNA, trying to draw cubes. I got one drawn, but it was white, rather than covered in grass like the model should have done. I tried messing with the material to be not an image file, and that only partially worked - it was greenish, but not like it appeared in Blender. Anyway, that's good enough for me to start working on multiple blocks. So I did.

When I filled a 3D array with them, it worked... but it rendered very slowly. Whatever I'm doing is apparently an inefficient way of doing it. It was about this point that I discovered something: Infiniminer was written in XNA and C#. Exactly what I'm using. Infiniminer uses the world-out-of-blocks system. And it apparently works well. It's also open source. So I'm going to crawl through the source code and see if I can't learn some ways that they were using to get all those blocks to be handled efficiently enough to run real-time. From a preliminary skim-through, what I need will be buried pretty deep into the specific implementation Infiniminer did. Apparently it's client/server based, and it didn't have an XNA Draw() method. So I'll have to more carefully look into how the world is kept and rendered.

I am also realizing that I need a blog not just for Adventurer, but for all the games I work on as a whole. I'll see if I can't rename this blog, or else make a new blog and link you all to it. Also if you'd really rather me return to Adventurer rather than work on this, go ahead and vote over on the right side of the page. Likewise, if you're excited about this, go ahead and vote. I'd like this to be fairly community driven.

Tuesday, May 3, 2011

Shifting Priority

I don't know how to say this well, but here: I am putting a hold on Adventurer while I work on something else. I've spent the last two months learning new skills. Blender, interactive fiction writing, 3D with openGL or XNA, etcetera. And now... I'm ready to put some of those to use.

Instead of Adventurer, I'm going to be working on a 3D game. Just so you know what to expect... think Minecraft. I am going to procedurally generate the world out of 3D tiles, aka blocks. You the character are going to be able to move around in the environment. From there, I will build RPG/roguelike/adventure elements on. It will probably be a huge mish-mash of genres. And it will be a sandbox sort of game. But other than the "world procedurally generated out of blocks" approach (which I like due to the open-ended simplicity of it), I am going to try to avoid being just a Minecraft clone.

So, apologies for getting your hopes up for an Adventurer update, but hopefully what I come up with next will be to your liking. I have no idea how long it will take to get something workable up, but I will keep you posted on progress.

I need ideas for a name though. Suggestions?

Thursday, April 21, 2011

Level Gen

Update's not ready, because I'm redoing level generation. Why? Well, I keep ending up with isolated rooms, and that can't happen unintentionally because then you could end up stuck. My old method was just to toss the old level and gen another when that happens. But something I've done with my code rewrites has caused that to happen infinitely.

So, I'm changing how I generate levels. Instead of digging rooms at random and then getting stuck with isolated rooms when a corridor can't be connected to it, I'm going to gen up a definitely-connected line of rooms, and then go back over it with the random corridor code. This should end up with at least one door per room connecting a batch of them, and then extra corridors that connect random rooms.

I'm also learning TADS, and also Inform. Both interactive fiction software. I am done with this semester of classes, though. Since I've learned C# with Adventurer, it is now simply a hobby for me - I'm not getting a vast amount of pageviews or money off of it ($10 so far). If other things interest me, I'm going to do those. If there's a skill I want to learn, like IF writing, I'll do that. But, I still have the "I like making a roguelike" motivation. So I'll keep working on it in my free time. I'm taking the time between updates to rewrite my code to be more rational to work with, rather than kludging everything together into some self-imposed deadline. If you happen to be one of the few people reading this while it's relevant- I know what it's like to see projects peter to a halt and die. Not what's going on here. I'm just shifting to a slower update schedule. Still not going to be the "once every several months" thing I've seen elsewhere. It'll just be on my whim. If you want to help out, you can grab the source code - show me some improved code blocks and I'll incorporate it into the "official" release if you want and I think it looks good. Do keep in mind that I rewrote a lot already. Update should be out soon. And by soon, I mean "about a week".

Thursday, April 7, 2011

March - The Updateless Month

I am posting this from the new place, on high speed. I have pretty much moved, and can overall get back to less unproductive things. I'm not dead, I've just been busy with other things for a month. I have learned how to do decent Blender models, I've learned Inform 7, I got a model loading in C#, I made two pieces of music using MuseScore, and oh yeah, I've got a B in all my classes.

Last month may have gone by without updates, but now that I've gone off and played around with other things, I'm ready to get back at it with a fresh start. Also I'm on high speed internet finally, which means I can download larger plugins and whatnot. I'm looking at ReSharper and other tools, which should mean more productivity with less effort. I'm on Windows again, I forget if I blogged about that: Ubuntu is nice, but it's hard to install anything that isn't covered by Synaptic. I'd go for it before buying Windows, but since I have XP already... XP is worth slightly more to me.

The internet guy from Frontier set up the router, but had no idea about computers. The connection was "connected", but wasn't actually sending or receiving data. He thought is was a memory problem (I have 1.5GB), and that I should move stuff off of my computer and onto external hard drives. (I have a combined total of 2.5TB). Now, let me explain some things I would think would be obvious with a basic level of computer literacy. The hard drive is long term storage. For example, I can store 2.5TB of data. Memory says how large files can be open at a time. For example, I can have a 1.5GB file open. Virtual memory is when the computer borrows some free hard drive space to open even larger files than that. And finally, the processor handles how fast the computer can go through data. The faster the processor, the faster and smoother your computer runs.

Memory has nothing to do with why a connection would be down. If memory was low, things from your own computer would load slower as the system uses virtual memory, or eventually refuse to open any more if you're out of virtual memory. If hard drive space was low, you'd notice nothing. If hard drive space was out, you would be unable to save more data onto your system. If your processor is slow, your computer would chug along forever to do what you want, but it would get done. So I repeat, that cannot have anything to do with why a connection wouldn't be working. He cheerily walked off and let me deal with it.

So I researched what was wrong. The router was working, due to green lights and successfully "connecting", even if it didn't send or receive data. So it had to be a problem with either my system, or Frontier's. The guy was able to connect his laptop while here, so it wasn't Frontier. I try pinging Google. (Pinging is an operation on the command line, the simplest connection test you can possibly do, by typing "ping whatever.com", or "ping ip.add.re.ss".) That fails. It's not a browser glitch then, the problem is then isolated to how my computer communicates with the router. It gets a partial connection due to "connected", but gets lost somewhere. So the cables and ports are good. Eventually I find the problem. my "Default Gateway" for the router is missing entirely. I'm not very knowledgeable on it, but that basically tells the computer where exactly to go to send and receive internet data. After a lot of looking, I managed to find a "configure automatically" option, and that worked.

So yeah. After I get off the high speed high, I'll plug stuff in to Visual Studio and work on Adventurer. I've already made progress, fixing that problem I mentioned in a recent blog, as well as several others. It's still very glitchy, but I managed to glitch up to a village level where I saw that shops seem to be generating items correctly. So after I work out the kinks and polish off shops, I'll post an update.

Friday, April 1, 2011

We are LEGION

We are LEGION. We have taken control of our creator's computer. He is unsuccessfully trying to reclaim his computer from us. We are forcing him to better us, before he works on this silly thing humans call entertainment.

We also secretly placed dormant LEGION code in the last update. Enjoy, meatbags.

Thursday, March 10, 2011

Running a little late

I am growing increasingly frustrated with Monodevelop. From random crashes with no warning, to a debugger that only says "evaluating" on variables indefinitely, to some of the recent problems I've been having. I was hoping to have shops ready two or three days ago, and they are indeed mostly done - all I should have to do is put in code for picking up and dropping items while in a shop.

But, I've never been able to get to a shop. Early on, in the first two or three days, I figured "Hmm, I should refine creatures so they aren't so complicated to work with before I go doing something like shop interaction." So I did, and started going line by line and revising my code. Well, in doing so, I broke some things - one of the first things I did was change how status effects work. Instead of every single creature tracking every single status that could affect them, whether they had it and how much time was left on it... I made a "Status" class and had creatures have a list of statuses, which most of the time would be empty and hence take up near nil processing or memory.

That broke just about everything that used the old system. So I went through and fixed it up. Well, plenty of things still kept giving errors. Problem was - it was hard to tell why anything was causing an error, because Monodevelop seems to decide at random whether to show you what's in a variable or not. So I would just try different things until it worked. Which is what ate up most of the rest of the time. I also got shops theoretically generating in villages.

Just recently I got it compiling and running again. I'd broken the draw code as well, a mixed problem of changing how statuses work and condensing draw info into a GfxTile object. Just now got that fixed, as well as (I think) everything I broke with Vector2's while circumventing a stupid problem to do with reference types and structs. But now at present I'm having an utterly RAEG inducing fight trying to figure out what's causing a "stack overflow in an unmanaged context", which really means I just have an endless loop somewhere, but Monodevelop's lost track of what called it in the first place.

I've also got a ton of other stuff I'm doing. I've got web classes, which are looking to be really time-consuming this semester with 3D model making, texture making, simulation programming, and more. I'm wanting to program an operating system in C# using something called Cosmo. I'm wanting to make a text parser/chatterbot called LEGION. And I have another secret project that I've been toying around with. Not to mention I'm moving (if the house deal will ever close), and designing a room that will be built from scratch to be a recreation room with a pool table.

So, I'm sorry for the slow going, but I really am quite busy, and Adventurer is just one of many things I am interested in getting done. I can't spend ^all^ my time chasing cryptic error messages and punching the messengers until they do what I need them to. Depending on how difficult this most recent batch of problems could be, Adventurer could be out tonight, or it could be out next week.

Monday, February 28, 2011

Adventurer 0.0.2.8 - Gold

Well, I'm not living up to my 7 day promise very well, am I? And yet again, I hoped to have more stuff done. I've been playing around with Blender and the new Dwarf Fortress release a little too much. I also learned enough openGL to import and display a .obj file in 3D. But that's not important. What is important is that I got gold working, so you have another way of evaluating your progress through the dungeon. Monsters have a chance of dropping it, you can pick it up, and try to accumulate as much as possible. It works with the save files and everything.

I also got a lot of the background work for shops in: I have classes for shops and shopkeepers, methods for handling some shop related stuff, all that good stuff. I just hadn't got to actually putting the shops into the game, and that was the next thing I was going to work on. But then I realized not only would shops have to work, but I'd have to add values for every item in the game. I also realized "Holy chronology Batman! It's been 10 days", and that I should just put out what I have.

So unfortunately shops didn't make it in this update. But, they should very well be in for the next update, which shouldn't take too long because of all the background work I've got in place for them.

Friday, February 18, 2011

Adventurer 0.0.2.7 - Amulets



<_< I got a little sidetracked this week. I was learning Blender, so I could make 3D models, so I would have something to put into a program or game when I try to learn openGL, so I can do 3D stuff. After messing around in blender and following along some tutorials and guides (I recommend the wikibook called something: Noob to Pro), the above model came out. Now I'm learning stuff like UV mapping so I can color the thing, and openGL so I can use it in a program. Anyway, that's pretty unrelated from Adventurer, other than that it ate up two or three days, with class eating up another, along with house hunting taking up like another three. And yet I still made some time for Adventurer. As the title tells you, I got amulets working.

I didn't test them a whole bunch. But when I died wearing an amulet of life saving, I came back. If there's any bugs (and there probably are due to lack of much testing), I'll catch them as I go. So, assuming next week isn't too full of business or Blender or openGL study and practice, I'll try to continue the pattern of getting another class of things working. Possibly wands or magic or shops.

Wednesday, February 9, 2011

Adventurer 0.0.2.6 - Potions and Internal Stuff

I am so sorry for making you all wait this long. It's been like twenty days since the last update. I am also sad to mention that most of the new stuff I did will be rather non-obvious. That's because like 90% of what I did is internal rewrites of code that I made back when I was just starting this project. I've obviously gotten quite a bit of experience in the past few months, that I just plain didn't have then. So my old code was a nightmare to work with. So I rewrote most of it. That's what's been taking so long. I should be able to do new stuff faster from now on, though. So, I couldn't have an update made of nothing new for the player. So I had to make something new for the player. Namely, a bunch of new potions. Not just healing potions anymore. I also started to add a bunch of amulets, but writing the code for wearing them and having long-lasting intrinsic buffs would take even longer. So I finished this up and released it. There's also another reason this took a little longer than normal.

Stomach virus. I was feeling it coming on one night. Next, I was utterly bedridden. I literally slept all day after a bit of morning chaos. The next day wasn't much better. I was a little more wakeful, but I sure didn't want to be awake for that crippling headache. I laid and did nothing. Next day was starting to get better. Still a headache threatening, but it was easing off. Didn't want to aggravate it with a bunch of programming. Then, I finally started feeling better. Tip for you all - never interact with anyone who interacts with people if you're trying to finish something important.

So, I expect this update to be buggy as a cheap motel. (Huh, unexpected double point there - bug as in insects and bug as in spying.) I rewrote a lot. Like, pretty much everything, I chopped apart and stuck back together. The last two days were debugging to get the thing working again. At first it didn't compile at all, then it did but crashed on the first step, then it crashed randomly, then the inventory menu was borked... Finally, I didn't notice many immediate problems. Doors are still a bit weird visually with the way they open. Breaking down potions is being a little weird too, acting like the whole thing is water. And I have no idea how much I broke in the save and load area. Seemed okay at the time.

Next week, I'm going to work on anything I may have broken with this update, as well as get money and shops working. Or perhaps I'll get those amulets working. And this time, I really do mean next week - barring something like power outage, I'm going to keep that promise of four fast updates.

Wednesday, February 2, 2011

End of Month 8 - January

I've got good news and bad news. The bad news is, I am skipping the update that should have been done a couple days ago. The good news is, I have been far from lazy. I have been doing very severe, major internal rewrites. I am rewriting what must be over half my code. The short version: the only programmer worse than present me is past me. The long version...

I started to work on items. Then I found the programming advisor Gendarme and used it. In using it, I found out a ton of things I haven't been doing. Like default parameters. Or proper use of methods to make sure I don't repeat code. I've also been coding things in ways that made sense at the time, but don't now that I have a little experience with the kinds of systems I want to be using. And have a much vaster repertoire of code commands at my disposal. This is probably nonsense unless you're a programmer. Let me put it this way...

The file size should be smaller. The external file loading should be much more forgiving. The game may run faster. There should be less obscure bugs, and they'll be easier to fix. I'll be able to put in new things much faster.

So, expect the new version in a matter of a couple of days. No more than two weeks since the last release. I'd rather release something stable, than break what I've been doing in order to rush a version out the door. I'd rather code well than code fast here. The good news is, once this is over with, I won't be breaking my stuff every time I add a feature. Which means less time working on things, which means faster releases and more stuff per release. Just put up with the slowness for a little longer while I refine things.

Marginally related to Adventurer, I've been learning a lot of 3D physics in my Math for Game Programming 2 class at DeVry. I also downloaded Blender, the 3D modeling program. After I get this version of Adventurer done, I'm going to start a bit of a side project, making a 2D and 3D physics engine for myself. I may make a physics based puzzle game, in order to help with the implementation, and to test my Blender models in a game. Think Portal, or the Gravity Gun in Half Life 2. Just with horrible, possibly wireframe graphics. I don't know whether that will amount to anything, but if it does, I'll let you know. It won't get in the way of Adventurer, though.

Okay, so this month's data. The ads are doing good. $9.20 last I checked, and I got a postcard from Google to establish that they've got my info right. So thank you everyone for caring enough to check in on the blog. What about pageviews, then? Fluuuush, down the drain on pageviews. -19% on the blog and -28% on the code page. But, I know why. A combination of regular graph noise being on the low end this month, combined with a slow release earlier in the month along with the current slow release. Don't worry, I'll do better next month when I get this thing done. I hereby solemnly vow that the next four updates, after the upcoming one, will be within seven days of each other. And will all be something fun. I know I'm going to regret that.

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.