Development Update - January 15, 2013

Mycal

Staff member
Laziness will be the end of me. Since the last post, I've finished up the login stuff for the most part. There's still some tweaks and features I haven't bothered implementing (reset password for example), but those can wait. I've moved over the socket connections and have been adding in game logic from the old code. However, I've hit a snag. I'm not sure if it's my development environment, the binary I am using, or some other issue, but the database stuff is slow. I've converted the old database to SQLite from an Access '95 (or maybe earlier, I can't remember off the top of my head, but it's old) format. This should improve speed and ease of accessing the data by a large margin and gives me framework to easily addin other database support in the future since it's SQL. However, for some reason, it's even slower than before.

I've loaded a blank database file and it takes approximately 1 minute for the server to finish loading from it. There's nothing in the database but the tables so it should be near instant. I've tried a totally blank database without tables, so that it would create them at runtime, and that takes upwards of 5 minutes to follow load. I've tried a converted database from the old format with approximately 400 maps and it takes around 10-15 minutes. This is unnaturally slow.

I spent a good week trying to figure it out and couldn't figure out anything. I then stopped working on it and just took a break, but I came back to where I was last week and decided to try something different. As a test, I swapped out the database connector to a SQLServer LocalDB and that worked just as I expected. Load times in all instances were less than a minute for every test. So I'm now positive that it's something wrong with SQLite or the implementation of it that I'm using. I'm going to weigh my options here and maybe try to find some help before I decide anything, but this is kind of a bummer. I choose SQLite since it's an inprocess database and you, the user, wouldn't have to install anything extra. I've been trying to avoid any installation requirements for the server, but that may not be an option.

While I'm on that subject, there is one installation requirement for the client. That's the XNA framework. I will make a few different packages when the time comes, and maybe eventually build the XNA install into the updater (not sure that will be possible though since the updater will be built into the client). Although, another route I've been considering, since Monogame is supposedly source compatible (swap out reference and possibly namespaces), I could just replace it and use that. Hm, I could also likely replace the .NET framework with Mono and (since I don't think I made any Microsoft depended references) then we'd have a platform independent version of this game. That's an interesting idea...

Anyway, maybe I'll dust off an older PC or install a new virtual machine and see if the SQLite problem has something to do with Windows 8 first. Then I'll worry about the random thoughts in my head.
 

Mycal

Staff member
I'm a dummy. I had tried upgrading the SQLite binary and somehow overlooked updating the reference. The project was pointing to a really old version of SQLite and not the newest one I had downloaded. Upgrading SQLite fixed my slowness issues.
 
Top