One might recall a previous post I made about upgrading to KDE4. One might also recall certain problems I had with KDE4. I didn’t mention then the full extent of it, but rest assured there were many problems, including my idle cpu usage being at around 90% for one core and 60% for the other core. I finally figured out what was causing the majority of the problems: A ridiculously poorly made little widget that checks for new messages in a few different applications. I thought it would be handy. Instead it made my desktop unusable. Now KDE4 is running quite nicely, with my idle processor usage being at around 5-10% per core.
On another note, development of my game is going quite well. For those interested, I intend to release the game engine under the Gnu General Public License version three. The game content itself will not be so freely available, for which I apologize. I am torn between my want to give developers the ability to use my code and the need to make some sort of profit off my software. This is the compromise I have reached. I hope it is satisfactory to all. You will have free access to the code, to do with as you please (even make your own commercial game if you so choose) as long as you release your own code. I ask nothing in return except that you please not attempt to copy my own game content. It would be unethical.
The project is moving along on schedule. In the past few days I have put together several hundred lines of Python code which includes the database description (models in Django which are translated into tables by Django’s code), a script to add test content to all the fields in the database, and several functions within the ticking engine. I am currently at work on the combat system. It is, even more so than I would have imagined, a very tricky process. So many comparisons to do, so many choices to make. Who does each ship attack? A random target within its weapon class match? Do ships alternate between opponents? Should I take an event percentage of ships from each adversary? What about possible bonuses to attack damage and defense from each opponent ship? Should I take a lower percentage from those better defended? Or should I send more attacks against those more heavily armed? And most importantly, how do I decide all this in an efficient manner?
I’ll be honest. It is giving me headaches. I could easily program a brute force method for any of the above. What I need is an efficient way to do any of them. I believe I shall settle on taking an even percentage of ships from each adversary. This is after almost two days of considering the ups and downs of each aspect of the problem. I think I can code that in a relatively efficient way: Which is to say, I think I can code that in a way that does not require O(n) loops, where n is the number of ships involved in the combat. I can instead perform generalizations about the groups, and have less calculations and comparisons required. This pleases me.
Well I’ve rambled enough for one day. Adios my friends.
After much thought, I have decided to write my ticking engine in Python instead of C++. I will have performance worries, true. Yet there is no reason I can’t redo certain areas in C++ later if they prove to be a concern. Besides that, I will also use the Psycho JIT compiler on the main algorithms and try to offload a lot of the processing to the SQL server which is optimized much better than I could hope to do for myself. If, on the other hand, I don’t get enough users for performance to be a problem, I won’t have wasted my time writing the engine in C++ when Python would be so much less work. The rest of my project is going to be designed in Python also (the UI with Pyjamas, the back end with Django), so it simplifies things. I would like to complete the game as soon as possible (without taking any design shortcuts that will hurt my ability to upgrade it later), and this seems to be the best way to accomplish that.
Oh, and in case you hadn’t noticed, I like Python.
Tonight I went through the painstaking effort of upgrading to KDE 4 and trying to make it do things the way I want. After spending hours trying to make it look the way I wanted it to and failing, I then settled upon a fallback look that suits me well enough. KDE 4 seems like a lovely piece of work, but it also shows many signs of how new it is. Erratic behavior with the panels, settings that can’t be changed, bars that can’t be resized, etc. Still, all in all it was worth getting the install over with.
I’ve also been redoing my articles bit by bit, fixing up the HTML (it was originally copied quickly from the sites where it was published with no regard for syntax or readability) and adding them as WordPress pages. They aren’t all done yet, but I’m working on them. When I’ve converted the ones which are currently listed I’ll start doing some searching and see if I can locate any more articles out there. No, I didn’t save them all. I should have. Now I have to track them down.
I was having a hard time deciding between simply not allowing comments, requiring an e-mail address and needing approval, or requiring registration on my site. I didn’t like these options. The first seemed a bit anti-social, so I didn’t want that. The second seemed to require effort on my part, and I don’t want that. The third seemed to require too much of an investment from anyone who wished to leave a comment. I’m not quite so conceited as to think that most people will think my blog is worth reading, let alone registering for.
Yet I found a solution. I installed the OpenID plugin for WordPress, the code which powers my blog (as I’m sure you can tell). Now anyone who wishes to login to my blog using their own OpenID provider they can do so, and it will automatically approve your comments. Users who don’t have an OpenID can still register normally, or comment by putting in an e-mail address, but will require approval on their comments. It is the best solution I can find that is fair to both (potential) commenters and myself.
I see now, as I checked while writing this, that my friend Denver over at OSS Guy has this plug-in installed already. I should have known. He always seems to be on the ball with that sort of thing.
As mentioned in my prior post, I have been looking into Django, the “Web framework for perfectionists with deadlines.” It appears to be a very handy way to ease the creation of the back end of my web interface. I haven’t checked out the performance, but I’m not really concerned overly much with how fast the web requests are handled. My real concern with performance has always been the ticker, which needs to get its job done as quickly as possible so the players can continue using the web interface.
In any case, for those of you who haven’t heard of it, Django is a python based web framework that attempts to speed up development (and simplify it). From what I’ve seen so far today, it certainly has that potential. It makes working with data from a database simplistic, as well as providing management tools for whoever will be administrating the data. Plus, I get to learn something new.
Hoo-rah. The developer said, “Let there be a devlog.” And then there was a devlog. Far stretching is the developer’s power.
Ok, enough of the nonsense (for now). People are constantly telling me to sign up for Facebook, Twitter, etc etc ad infinitum. This blog is my response to that.
As of today, I am nearing completion of the database design and the ticker’s functional specifications for my browser-based MMORPG. I should be able to start coding tonight or tomorrow, which is an exciting step. I’m sure all you developers can relate: Planning isn’t as fun as coding. I am starting to have it sink in now exactly how many details complex programs need to keep track of and control. I’m planning to write the ticking engine in C++, whereas the user interface will be AJAX created with Pyjamas. I am also considering using Django as the back end for the web content, though I have not used it before and will have to look further into it.
Well, back to planning.