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.

No comments:

Post a Comment