Showing posts from 2009

My other project

Anyone keeping tabs on the Enigma project may have noticed I haven't been making steady progress like I have been in the past. One reason for this is going back to school but another reason is that I have picked up another programming project.

This one is a completely different matter though. It is targeted at windows and is written in C#. What kind of application you may ask well a point of sale system. It will probably be a bit more advanced than your average point of sale system by the time I'm ready to use it. And by use it I mean there is talk of using it in a business or possibly selling licenses of it to small businesses.

It is still pretty early on though I don't have anything even worth doing a demo yet. Although I'm hopeful that by the time I graduate it will be production quality.

I want to point out that this does not mean that Enigma is dead. It simply means that I'm not working on it right now. I'm in part waiting for another Irrlicht release that fi…

adventures with an intel mac

Another quarter a college has begun. So for a couple weeks at least I'm back to school. My project management class is meeting in a conference room instead of a lab and naturally the class focuses on effective use of Microsoft Project. Ugh, well done administration well done. At any rate being the high performers we are all of us checked Microsoft Project out of the school library and planned to bring laptops in to work on. Those of us that have them anyway.

This is where my adventure began. For you see my laptop is an Intel Mac and Microsoft Project is Windows only. I thought no big deal I'll just use boot camp and everything will go smoothly. Reality set in when I realized that officially boot camp requires a full install disc for Windows XP service pack two or later. As someone who upgrades every version I don't have any full versions except for my old oem laptop that bit the dust. Just years and years of upgrades. And to top it off my Windows XP Pro disc which was the o…

0.7.0 Blockers

I got the embedded browser working on windows. I'm super excited about it. I do have one issue with it though and that is the return & backspace keys don't work properly. I have looked over my code and it should work but it doesn't. I'm still happy about the progress though. Anyway that bug is the first blocker I have to fix before I feel comfortable releasing 0.7.0.

The next blocker is that the latest version of Irrlicht introduced some sort of bug that makes gravity not work sometimes. And in the case of Enigma all the time. This is a pretty big deal. I posted on the forums and got a possible fix but it doesn't work inside enigma. It does however fix the issue in my sample code that exhibits the faulty behavior. Regardless I may have to wait for another release before I can get this working again. Or roll back but then I would lose all of the upgrades and bugfixes.

The final blocker is pretty fuzzy. The scripting seems like it needs a little something extra bef…

0.7.0 status

I decided to drop llmozlib. I found a gecko offscreen renderer SDK. It is based on the gecko SDK from Mozilla. Now there is only an SDK for Windows so I'll have to build it from source and possibly hack the code base to bring this support to Linux & Mac. So as a result in this release I'm not going to add browser support to Linux and Mac. Not because I value those platforms less or anything it is just easier to get this release out if I don't bite off so much in one go.

Also I broke the browser out into a static library. That should simplify things because there will be allot of effort into building that piece. So much so that I think it warrants it's own project. Perhaps if I get some volunteers I'll cut them lose on it. That will be one area where people will for sure want to use it later. They may even want to use it now if it is working. I haven't tested the code which means chances are good it doesn't work at all.

Also for some reason I was feeling a…


I just have to vent. I have been trying to get llmozlib to build in my spare time which to be honest I don't have all that much of right now. And I can't get the stupid thing to build. For one you have to download an old version of firefox then you apply their patches to the code. Then you have to get an old version of Microsoft's compiler and finally you need an old version of the Windows & Platform SDK. And after following the instructions to the best of my ability I got a compiler error. I'm not an angry person but I could explode with anger right now. If your going to make a library you really need to release an sdk with headers and binaries especially if it is that much of a pain to compile.

I think the project is dead though so I wouldn't be surprised if an sdk was on the someday list. *angry words*

0.7.0 a long way off?

I have been focused on school allot lately so I haven't made much progress on the 0.7.0 release. I could probably release what I have as 0.7.0 but I don't feel like I have added enough functionality to warrant a release. I guess that is because I chose "scripting" as the milestone which is meaningless without something to script. I have technically added the ability to run python scripts to the server. However right now there is no point in doing this except maybe doing some added value stuff on some server events. So long story short part of the delay is just because of poor milestone selection on my part.

On a more positive note I have made some good progress on adding a browser to the game. I'm now using llmozlib. Which basically allows me to embed firefox in my game. The main hangup right now is that they don't have binaries. It is source only. Not that I can say much I only release binaries once in a blue moon but it makes it hard to develop against a lib…

Another waste of "Time"

I was feeling ambitious again, well sorta. Anyway I implemented a time command that shows the user the server time. It isn't super useful in my opinion but it is pretty standard. I have to go back to school tomorrow so I won't be working on it for a while so it was nice to get some stuff out the door.

Alright I think I'm gonna get some food, watch the Voltron motion comic, and get around for bed. Good night everyone.

Another random distraction.

I just finished the roll or random command. So now players can roll for the loot that doesn't exist. Or you know gamble highest die wins. I'm kidding of course but I did add the roll command. I wanted to do it for a while but I was waiting to get more important functionality in place before adding fluff. Of course I'm super bored of working on the scripting stuff but there isn't enough script enabled functionality for me to call it a release. So while I'm working on that stuff you can probably count on a "random" bit of functionality here and there. After working on so much client stuff it is hard to work in server side never see the light of day business logic.

Well anyway truth be told I probably wouldn't have worked on the project at all tonight but I ate late so I had to wait a bit before hitting the sack. However I'm probably gonna call it a night now.

Reading Python script from file.

I had issues at first loading my scripts from files. I based my original implementation off of the embedding example on the python wiki. This worked perfectly however when I tried to switch the run function for one that would run from a file I got less than acceptable results. So what I ended up doing is reading the scripts into memory and then passing the string to that function. This has at least one pitfall and that is memory usage. On larger files you may run into memory usage issues but other than that it seems to work ok. Below is a stripped down version for anyone else trying to work around similar issues.


1: void RunScript(constchar* filename)
2: {
3: FILE *file;
4: long fileSize=0;
5: char* buffer=NULL;
7: try
8: {
10: file = fopen(filename,"rb");
12: if(file!=NULL)
13: {
14: fseek(file,0,SEEK_END);
15: fileSize = ftell(file);

Basic Python Scripting

The server now has basic python scripting abilities. The first order of business is to make sure I have all the events I need. Then I need to see if I can do anything about how fickle the interpreter is right now. There have been a few cases when the server wouldn't run things that ran inside of the official python interpreter although in theory it should be the same code. I also need to figure out what I'm doing to do about reference variables. I have issues wrapping them.

But anyway those of you wishing to see what will be possible when scripting is finally released. Get latest and have at it. You should be able to do basically anything you can do in python. You will also have access to the current user object. That isn't much but it is a good start.

Alright night all.

The Literary cage that is Citation

I'm sure all of you understand citation. But basically it is where you give credit to someone when you quote them or summarize their work. And to that end it is a valid and important part of writing.

I have however come to the conclusion that citation is currently being used as a tool to devalue original thought. What I mean is literary works are said to be weak if they don't site anyone. Now if they are actually based off of another work that is plagiarism. But what about the ones that are actually original works. Should they be of less value because they are not backed by a body of existing work?

I have a strong background in IT as some of you may have guessed. And what I have found is it isn't uncommon for some details of software or hardware products to be undocumented. So there is actually a large body of knowledge held by technical professionals such as by self that you probably won't find in a book or scholarly work. You might be able to find that type of informat…

Death of Awesomium

So, some of you may have noticed that the Awesomium library is no longer available for download. At least not under a free license. Near as I can tell from the site the author created a company and intends to sell the library along with other products. While this may work for Him this makes it unusable for Enigma. The reason is of course one of my project goals is to use only open source software that is compatible with close source usage. This is just another example of the limitations this imposes. However my goal in all of this is to prove that it is indeed possible to construct a high quality product that leverages open source while still allowing closed source development.

Another side to this whole deal is that if I included Awesomium I would need to pass the licensing on to the people using the software. That's just not gonna fly. It is a shame because I had decided that Awesomium was the best available but now it looks like I may have to build my own interface. I guess it i…


Some of you may have noticed I haven't been posting nor updating the code base. However the project isn't dead it is just delayed. I started school and on top of that I have been playing EQ2 so as you can imagine I haven't had much time. The good news is I have canceled my EQ2 subscription so I might be able to get some development time in. No promises of course.

Also I have been thinking about the uses of browsers in games. I'm wondering how much could be offloaded to the web browser. Some people have said they are going to do most of their UI with a web browser but that seems silly to me. You might as well make a web based game at that point. However there are some cases I think where it would be better to let a tried and true layout engine handle the grunt work. Like for example anything with large chunks of text.

Alright I think I'm going to leave it at that I have a bunch of homework and a test tonight. Peace out y'all.

Antenna Break

Sorry folks I took a break from the server script work to build a TV antenna. I will be starting school sometime in September so I wanted to finish it while I still had time. Have to watch Heroes when it starts back up again you know. I want to see it in HD for some reason. I guess I could just wait till like the day after and watch it on Hulu but whatever. I want what I want lol. :-)

Tech Tinker must tinker with tech.


wrappers are boring.

So, as you know I'm working on the python wrappers. It is a good bit for work partly because I have had to make a few tweaks to make to my c++ code to make it wrapper friendly.

It is pretty boring stuff though. I don't get to see any results really until I get almost done with the wrapper code. I have some of the basic server objects wrapped but none that actually do anything.
Also wrapper code is kind of plain I mean your basically throwing duplicating your interface. I'm just glad boost's python stuff makes it so easy otherwise I would probably go crazy implementing this stuff.

Oh well I guess it will all pay off in the end. Once the server is scriptable I might be able to talk some people into some python development to ease the burden on me. At least as far as skills, NPC, and quests.

Well gonna go to bed earlyish tonight signing off.

Pace of things

So far It has been taking me a couple weeks to push out a release. As of now there are 23 more releases before the final release. So with that in mind I think I should be able to have 1.0.0 out by 2010 or 2011. Assuming the project doesn't get completely canceled once I'm back in school.

I plan on working on it even while in school however I should mention that I will have much less time than I do now. The flip side is I will likely be more focused than I am now.

Also If I'm lucky my studies will help me develop better project management skills and allow me to better manage this project.

Compiler Change Complete

I finally was able to switch over to Microsoft's Visual C compiler for the windows version. It was a big pain. I ran into issues with my string related functions. I was passing const char* around but MSC decided those needed to get cleaned up before they actually made it through the chain of calls.

So I switched to std:string which is probably safer anyway but I passed them by reference at first. That however caused more or less the same problem with a few extra issues here and there. So what I ended up doing is just passing them by value. So what that means is I'm copying them one or two times before they get to the function that uses them to load the related resource. This isn't that great from a performance standpoint but it works flawlessly and I know for sure they are getting cleaned up after they go out of scope.

But anyway the short version of the story is that after many hours of pain and suffering I was able to get it to compile & link with Microsoft's Visua…

You win this round Microsoft

As I have posted many times before I have run into many issues resulting from the fact I have been using MinGW instead of Microsoft's Visual C/C++ compiler. It isn't that there is anything wrong with MinGW but rather that linking with libraries made using MSC is a pain if not impossible in some cases.

The main reason I was using MinGW is that it is the windows port of gcc and as such I was basically using the same compiler on every platform. That was nice because it took very little work to make everything compile on every platform. Once the development environment was setup and all dependencies were in place that is.

Well the straw that broke the camels back was when I couldn't compile after adding boost python to the server. That is a deal breaker I need it for NPC scripting. I have also been unable to add a few cool extras I wanted to because the libraries they require don't support MinGW on Windows.

So, I bit the bullet and started switching the client & server ov…

Slacking Off

Sorry folks I have been slacking off since the last release. However I have started work again. Mostly research at this point because I don't know how I want to do the NPC stuff. I'm still thinking about the best way to do it.

The most flexible would be LUA scripts but I'm not sure that would exactly make people want to make NPCs for the game. I could make a GUI app to help make that work but I'm still not sure.

That is probably what I will end up going with though because that method will work for quests and such as well. So build pieces for speaking will get me on the road to adding quests which is coming up the release after this one.

0.6.0 Released

I have finally released 0.6.0. As promised players now have the ability to form guilds add ranks to those guilds & assign permissions to the ranks. I also fixed the security checks related to kicking, inviting, and modifying ranks.

There is no eye candy in this release. It is mostly just a technical update. There are still Allot to be done before this will be a playable game. Some of that is just interface improvements and some is back end functionality that is completely missing at this point.

As with the last release I was able to build for windows, Linux, and FreeBSD. However FreeBSD gives me a seg fault when I try to login to a server. This may have more to do with the state of my system but I don't want to let people think that it is working perfectly only to get a big fat error when they try to test it.

Also Linux is largely untested. I'm pretty sure it should work but I haven't run it for any notable amount of time. Also I haven't tested most of the features.


There's always a try catch.

I added some try catch statements to a few places. One reason for this is to prevent people from causing exceptions on purpose to produce undesirable results.

Each poll of the server is not in a try catch that way if a user sends a packet that somehow causes an exception no other users will be effected. I still plan to add validation to the manager classes but it is impossible for me to think of every single exploit before anyone else thinks of it. So I plan to monitor the exceptions once I have a server up and make fixes based on the exceptions.

After all I can't have one rouge user bringing down the server and causing everyone to get disconnected.

I also added a try catch to the execute command callback. I'm doing some tricky parsing stuff and any failure on the user's part to correctly form a command could cause an exception. So rather than have the game just die I'm spitting out a console message and give the user an invalid/unknown command message.

I don't want in…

Check my Checksum

I added three types of checksum to the message container class. This isn't a big deal really but it makes it easier for people to add anti tampering measures to their versions of the game. It also allows for message corruption protection. Although I don't really see that being an issue in most cases. The generic GetChecksum function currently just calls the GetSimpleChecksum function which sums the characters of the message.

I don't currently have any plans to take this any further but I may if there is demand for it or if I get a cool idea. I don't want to go an implement something unless I know it will be useful.

Also I hate flies and I could sware we have like over 9000 in the house. It's like a plague I have no idea what is going on but it is really annoying.

Story about the story

Last night after hours of unproductive gaming we decided to work on the story a bit. We got some of the story points worked out and added a few new clans. This is a change from what we have been doing. I have been focused on the technical parts of the game & Avery has been focused on trying to figure out how to make a human model.

So the short version of the story is that I didn't really code at all and unless I have a change of heart I don't make any real progress on it today either. And as all of you know I don't code on Sunday so it maybe Monday before anymore progress toward the next release happens.

Guilds are in the house

I took a break after the last release. Mostly because my friend Avery & I were a little burnt out on our normal routine. Also it is good to break things up now and again.

However tonight I hit the ground running and I'm happy to say that the version in the development branch is now able to create guilds. You can also now create a party as a separate step from inviting someone. Some games require this but I made it optional.

I still need to add guild management features and I also just realized that nothing happens when the leader of a guild or party leaves. That should actually cause the guild or party to break and return everyone to guild or party zero. Which of course means no guild or party.

I'm thinking about how I want the ranks and stuff to work I may allow the user to change the bitmask for now. later I will add a nice friendly GUI but I'm not very good at that stuff so I'm not sure if I will add it to this comming release. However I should probably add GUI stu…

0.5.0 Released

I finally got 0.5.0 out the door.

As promised this version sports a party system that allows players to form parties and use party chat. You can also leave & kick people from parties as you would expect. All of the above are done from commands though as there is now scene node interaction menu systems in place yet.

The pieces that are the same for guilds have been implemented as well so the next release should go smoothly for the most part. Although It may still need the same or more amount of time because of the extra stuff I will need to implement to get guilds working correctly.

I have also added a bonus feature. You can now get a list of all players in the world, your current map, your guild, or your party. This is done through the who or list command. They default to world but by adding "map", "guild", or "party" to the end it will modify the default behavior.

I also added some more cross platform fixes to the code base to help build this thing on mo…

party invite working

I finally got the party invite stuff working. The user that sent the invite doesn't get a message telling them yet but it does work and I'm super happy about it. I got so close last night but it wasn't working right and I finally gave up and went to bed.

Which is funny because I think the last fix I did fixed the problems I was having. Oh well I needed sleep anyway.

But in any case I'm happy about this working and I thought it was worth blogging about. I still need to implement leaving parties & give the users some sort of indication of people joining/leaving parties.

0.4.0 Released

Finally, 0.4.0 is ready to go. There is a nice list of improvements as well. As is my custom I slipped a few extras into this release making it the best release yet I hope.

As promised you can now switch between maps using warp scene nodes. There isn't any validation on the server yet but that will be hard to do until I start implementing the database code.

I also have greatly improved the camera. For one I moved the camera movement to the right click which seems to be more standard. Also you can look up and down now. I also added a collision response animator to the camera so it will collide with the floor and ceiling(if inside) which keeps it from going through things. It will automatically near in those cases proving much better camera angles without manual tweaking. That should make it easier to explore the game once we have something to explore.

Also there is a warp command which will allow you to warp to a map based on index. This functionality will be disabled at some point bu…

Working Mini-Map

I finally got the mini-map to work correctly today. It was more work than I thought. This is mostly due to how weird the position stuff works.

There is one gotcha with this though. The map has to start at {0,0,0} otherwise the math will be wrong and fail.

I'm really happy about this I have been working on it for a while and now it finally works. This is sorta like a mini milestone it doesn't add much to the game at this point but still I"m happy about it.

Ok, now to finish the 0.4.0 stuff I have also been working on.

0.4.0 progress

I was able to get the warp command working on the client & server. It allows a player to switch maps. Right now there isn't any validation as with many other features but it does prove that the functionality works. I'm planning on adding some warp locations later. I'm planning on adding the warp locations server side but I would need to stub them.

I don't code on Sunday though so further progress will have to wait until tomorrow.

BSD build

I woke up this morning and decided I would like to try to build on BSD. I had been planning on holding off so I could focus on features but I got lazy and decided to play with BSD.

However I have yet to get this think working the way I want. I keep having all of these build errors with the stuff in ports. It reminds me of using the unstable branch in Gentoo. Except I think it is a little worse than that.

This makes me kind of sad as bsd fans claim it is so great but it seems like it is still behind the curve in terms of packages management. I can't really judge it on the UI because it uses xorg and the standard collection of window managers and such you would use on Linux.

Oh, well I don't have to like it I'm just trying to get a build out for people that do like it. It may grow on me though. I thought Linux was a pain in I started using it. Of course back then the GUI was useless and you had to use command line stuff for everything important which was hard for a newbie.

On a …

Code Style

I published a short code style guide on my website.

It isn't in depth but people tend to stop reading after the first page or so anyway. That should be helpful if anyone wants to contribute to the project. I doubt it at this point but might as well be prepared.

On a side not I added some info about a few of the clans that will be in the game.


I added a mini-map window to the game. It pulls the mini-map image based on an attribute of a map entry in the map configuration file. I thought about auto generating the mini-map from a camera positioned above the map but this would be expensive performance wise. Also some maps probably shouldn't have mini-maps for example a maze. Also I wouldn't want monsters, players and such to render on the mini-map at least not their models. Maybe a red dot or something.

Anyway currently it doesn't track your current position or the position of anything else. So it isn't all that useful but it does give you an overview of the map your on if the mini-map image exists and is in the configuration file.

This isn't really required for 0.4.0 but it is one of those fun extras I throw in because it was fun to develop.

0.3.0 Released

Finally, the release that some have been waiting for a little bit. In truth I have probably been more excited about this release from a technical stand point because of all the advances required to accomplish the promised functionality.

The binaries aren't packaged fancy they are just in a 7zip archive but that should work. As mentioned in my previous post I didn't produce a Mac binary like I intended to because of issues with the tools. I may create a binary later from the 0.3.0 branch if the tools show signs of improved stability.

As always I created a branch for 0.3.0 however the branch doesn't include the license files that were added to the binary packages. These were and afterthought.

You can of course pull them from the development version at any time. Those are unlikely to change.

I meant to have this release out earlier but I decided to go see transformers with some friends instead. Oh well whats a couple extra hours of waiting.

Alright signing out now.

Mac attack

So, anyone checking the svn has noticed I have been making tweaks all over to allow the client & server to build on Mac & Linux.

Linux was pretty easy at least on Gentoo. I just had to emerge all of the dependencies and boom the headers were all where I needed them. Gentoo is my favorite.

I had to make a few small tweaks here and there but for the most part it was portable.

Mac on the other hand has been like pulling teeth the whole way.

I got a good chunk of the dependencies via fink. If memory serves I had to build all the rest from source which I hate doing manually. So already at that point I had more work invested in mac then I did for Windows & Linux build environments put together.

Then came the issues with the Mac version of codeblocks. It kept crashing on me so again modifying the project files was like pulling teeth. I actually used a text editor a few times because I was having so many crashes.

I finally got it to compile sometime around 4:00 AM this morning. However…

Few quick fixes.

I fixed a server bug that broke whisper again. It was basically just that I wasn't giving the character the user's name. Which is a hack anyway but required until the database stuff gets added.

Also I made whisper case insensitive so now it is better than ever. I like bonuses.

Alright I'm done for tonight I should be able to get another update out sometime Monday. No idea how long 0.3.0 will take though.

0.3.0 is near

I finally got the voice chat working as of this writing the code in SVN will now perform the promised 3d voice chat.

So what is left for 0.3.0 you ask. Well for starters I need to do all of my cross compiling and make sure this thing still builds on Linux. Also I need to make it build on Mac now that I have one to work with.

I'm sorry to say though that I'm not going to support BSD & Open Solaris. It isn't that I don't want to but I tinkered around with them in a VM and had troubles getting everything I needed installed. Some of the stuff I would probably end up building from source myself.

And also I know how to compile stuff from source (obviously) I don't want to have to go through building dependencies. Of course if someone is willing to go through all of that work be my guest.

I'm planning on building on Gentoo Linux for my Linux binary. I haven't decided if I will make an ebuild or not though. Depends entirely on how much work that would be. I wouldn&…

Random crash Frustration.

I have been working on getting the voice chat to work and I thought I was close before because I got garbage to come out of the speakers.

Well come to find out the data was getting big time corrupt. I have since fixed those issues however now I'm crashing when I use the voice chat feature. This is frustration because I get no error messages it just gives up the ghost. That is of course after one or two audio checksums have been taken. So it seems like it almost works twice and bites the dust.

This makes no sense to me right now. I guess I need to step back from it and take a break. I did take a bit of brake before posting this. I added some slash commands including but not limited to "camp" My buddy Avery informed me that is his favorite mmorpg command so I thought I should add it.

Slash commands are obiously not all that important at this point but it was a distraction I was hoping for an epiphany or something. Oh well I guess I need to just call it a night and dig in tomo…

Voice chat on the way.

I'm getting pretty close to getting the voice chat feature to work. That is a good thing as that is the functionality promised for 0.3.0.

Right now I'm getting sound when I should the problem is the sound is garbage. So I'm thinking that the message is corrupt somehow. The frequency, length, and such are fixed for voice streaming so I don't think it is a bad setting there.

I suppose I could be capturing from the wrong device or something. That could get interesting.

Anyway I'm probably gonna hit the sack and work on it tomorrow. I'm getting tired.

One more thing though I added buffer recycling functionality to sound sources. That will keep streaming from eating up all the xram for those that have it.

Also as usual I have added my standard set of bug fixes that I have already forgotten. I sure am glad I have source control lol.

Also I split the sound sources amongst voice chat & misc sounds. The sound sources don't seem to like being switched back and forth be…

Understand then fix.

So in programming there is kind of a rule something to the effect don't fix it if you don't understand the problem.

The idea being if you don't clearly understand the problem you may only make it worse. Breaking this rule can of course end up not fixing the problem, making the problem worse, or create new problems.

Well the bad news is tonight I broke that rule sorta. I was working on 0.3.0 like a good little programmer and noticed a huge regression. You couldn't see other players on the server. As a matter of fact the server was sending id 0 for all players.

This has worked fine since 0.1.0 so I was of course doing diffs like mad trying to figure out what I had changed that broke it. And naturally I didn't find it. If this was easy I wouldn't learn as much right lol.

So I did my normal thing and threw some cout calls in a few places. I know they have these things called debuggers but hey it's how I role. Plus I don't think the debugger in code blocks works…

0.2.0 Released

That's right 0.2.0 is now available.

This is another source release but I plan to make a binary release for 0.3.0. That is the plan anyway.

Now for the nuts & bolts. In 0.2.0 you can now use local chat to talk to all the users on the same map as you. Currently this means everyone. You can also broadcast to the whole server. Which for the time being is basically the same thing as local chat but I won't have to change the code later when that happens. The whisper feature I promised is also there. It even sends the user a message when the user they tried to whisper isn't online or does not exist.

There are a few other tweaks here and there that have gone into this release but I don't think there are any milestones that got slipped in there.

As is my custom I have made a branch for this release. I hope this release at least makes a good chat program for someone lol.

That's all for tonight time for sleep.

Fink on Mac OS X

After thought here. For those of you who don't know there is a piece of software called fink that installs all of your favorite open source Linux apps on Mac OS X. Or at least a good amount of them.

Of course there is more to the application than just downloading them. You can actually build them from source if you have apple's dev tools installed. Also it is downloading modified versions of some of the packages that work on Mac OS X. I'm not sure about all the changes they had to make to make all of this work but good job folks.

It kind of reminds me have gentoo's portage but for Mac OS X. So of course I instantly like it allot lol.

But anyway I may have some dependencies from fink in my project. I haven't found binary packages for some of my dependencies so I'm thinking I will need to compile them using fink and apple's version of GCC. I think it is basically regular GCC4 though so I should be good to go.

I'll also have to deal with bundles and all that f…

0.3.0 roll out plans

I have allot of work to do before I can release 0.3.0. After all I'm only on version 0.1.0 right now. So I'm working toward 0.2.0. Also I plan to put allot more spit and Polish into 0.3.0 because I plan to make binary releases to platforms other than windows. Part of the reason for this is that 0.3.0 will be able to be used as a chat system of sorts. That isn't the ultimate goal but it becomes useful at that point.

Also it will probably be a while before I do this again so I want to give people something to play with while I'm hard at work on newer versions. Or studying for college if I'm in college by that point. I may not even finish 0.3.0 before I start college although I would really like to.

I'm thinking about actually implementing the user logic on the server and database so people can actually use it in a live environment. I haven't made up my mind on that yet though because that would take longer.

Also my mapper is supposed to be back in town soon so t…


As much as I would like to announce ground breaking progress. I haven't been very productive. At least not in regards to the project.

I have been doing allot of PC repair type stuff. As a result I have also updated my cd case of tools & Operating systems. It now includes a couple flavors of BSD. BSD has always interested me since I heard about it a long time ago but I had never gotten it to install and work.

That changed recently as I got a PCBSD install to work and it was quite nice. Unfortunately I couldn't get it to use multiple hard disks so I ended up replacing it with open suse.

Next time I need to install an operating system on a single disk system though PCBSD is a definate possibility.

As for the project the last progress I almost got basic chat working the other night. I still need some work in the message classes though I think because they don't seem to be working quite right. There are probably some other bugs that I just haven't uncovered yet.

Also I got m…

0.1.0 Released

That's right 0.1.0 is now available. The main features of this release are the ability to fake login select a fake character and move around. Also you can see other players connected to the same server.

This may not sound like allot but it takes quite allot of effort.

This is a source only release so if your waiting on a binary release I may wait until 0.3.0. Because at that point it will at least make a good 3d chat program. As of now it isn't possible to communicate really.

The release is available in source control. I made a branch so this version can be downloaded at any time. I'm going to continue on toward 0.2.0 in the main branch.

Getting close to 0.1.0

I haven't gotten a whole lot done the last couple days I have been busy with some work unrelated to the project.

However I added a small hack to the server that gives characters a fake id. That will allow them to be identified by other clients. Unless I have forgotten something the server is ready for 0.1.0 with the exception of the character creation screen which I plan to drop from the release. Forcing users to create characters that are not stored at all seems like a bother.

So now the big thing left is creating models for other players that don't have them when the state change packet is received and delete them when said packet has the is leaving property set to true.

I feel this release is close. Maybe some time this weekend if all goes well.

Holy memory leak batman

I found a memory leak. Which is funny given my statement before about there being no known memory leaks.

Well anyway down to the nuts and bolts. The issue was that even though the API docs for enet say once you pass an enet packet to the api to send you don't need to worry about it. As a matter of fact it says you should not use destroy packet on it. However it would appear that it doesn't actually clean up the data in the packet.

This is unfortunate however now that I know this I can work around it. Right now I'm flushing after the send call and then calling a delete on the pointer in the message union. The flushing ensures it has actually sent it and should be done with it more or less. However at this point I'm kind of guessing it makes a copy of your data. Otherwise it makes no sense that it wouldn't be cleaned up except if it was keeping it in case of a packet loss. In which case it should clean it up after the other other system responds.

But anyway so that memo…

Sound Source management.

Alright, so guess what I got distracted by a sound source management.

See, I found out that you can only have a limited number of sound sources. It is limited because each one represents a hardware sound source unless of course your using a software device. But in any case they are a limited resource.

Now from what I was reading you could have anywhere from like 14 to hundreds. Fun times. Well anyway the general consensus among posts I saw on the topic was that the best way to handle it is to allocate all of your source up front. Basically create sources until you get an openal error and that is your max. It sounds like a big hack and it is but I see no way to query the api for the max number of supported sources.

Also if you allocate on demand there is always that chance you won't be able to get a source.
Another thing most of the people agreed on was that you have to create some sort of priority system to handle giving the sources out.

Well, my solution was to use a priority queue a…


Ok, for those of you who don't know Virtual Box is an open source virtual machine. Similar to VMware. One notable difference is that they have a free open source version that has 3d acceleration for OpenGL. What that means is for example you could actually play a game in a virtual machine as long as it uses OpenGL and not DirectX.

The down side is of course that most games these days seem to use DirectX.

However the game I'm working on can use DirectX or OpenGL via the irrlicht engine. And I'm currently using OpenGL. So what this means for the project is that when the time comes I can install various different operating systems inside different virtual machines and create builds for a wide selection of operating systems and actually test them.

If I tried to test them without hardware acceleration it would be painfully slow even running bare metal. So inside a virtual machine would be even worse.

The short version of the story is I can make releases for different operating syst…

Linkers hate me

I have been making pretty rapid progress as of late. And because I have been unable to install linux on my main computer I have been developing on windows.

It has been working just fine but today I decided to check to see if my project still builds on Linux. I mean one of my project goals is to have this thing build on as many platforms as possible and Linux happens to be my operating system of choice.

So, um guess what it didn't build at all both the client and server failed.

The first problem was that I included enet in the project instead of using a library. This was mostly because making the library on windows was a pain in the butt. However that requires a couple windows only libraries to be linked. And of course on the Linux side the linker would fail because it couldn't find either of those libraries.

So to solve that problem I build the library on the windows side and removed the enet sources from the project. I also modified the linker options. That solved that problem. …

Memory leak.

While showering the other night(aka other morning) I realized that I had a few memory leaks in the message code.

Before when process message was called it created a new message container of the correct type but it was never cleaned up. Now after it calls the next version of process message I call dispose on it.

There were a few other fix ups of the same kind I think. I'll have to look at my commit history I don't remember anymore.

Anyway as of now as far as I know there are no memory leaks. If anyone spots some in my code shoot me an email or something. Fixing such things will only get harder as the code base grows.

Fake Authentication.

I actually completed one of the goals needed for 0.1.0 gasp.

I Got fake authentication added to the client and server. There are of course a few gotchas.

1. The login screen doesn't force the user to wait for response.
2. The Server always allows it doesn't even look at password.
3. The Client's hash function does nothing right now so passwords are sent in clear text.
4. I'm only setting an is logged in flag. Later I will need the user id so I can poll the database for valid characters.

But that said implementing this was relatively pain free. That encourages me. I'm hoping that all of the remaining 0.1.0 features will be mostly pain free. I don't see that happening but hey a guy can dream.

The New Deal.

I'm changing the road map somewhat.

Chat will no longer be part of 0.1.0 as it will be in the next release.

I may still have that release and 0.1.0 out before I go back to school but really we are talking about two milestones which should really be in different releases. Plus I don't want to wait that long to make a release.

So the new road map is a follows.

Movement(Player can move around and see other players.)
Authentication(Player can login although credentials will not be validated.)
Character Creation(Actually make character creation work.)
Chat(Players can chat using world chat, broadcast, and whisper.)
Voice Chat(Players can talk to other players on the same map.)
Map Change(Players can actually move between maps.)
Party(Players can form parties and use party chat.)
Guilds(Players can form guilds and use guild chat.)
NPC(Players can see and talk to NPC.)
Quest(Players can pickup and complete quests from…

Client Config

While working out some details in my head regarding the movement logic needed for 0.1.0 I realized that having the server hard coded wasn't going to fly once I was in that phase.

So, my first thought was ok I'll just read it in from a plain text file. I mean all I need is a host name I don't need anything fancy.

Of course I realized that wasn't an elegant solution to the problem and before you know it I was coding a configuration class.

I used the irrlicht built in xml parser so it wasn't that hard to make a nice xml based configuration system. I created the logic for loading server information and for now I'm using the first one it finds as the default.

Now that worked so well in fact I decided to make the resolution and other display settings configurable. I remember someone else doing something like that on the forum but I think that was in .net and was tied to a GUI. I'm trying to make this in such a way that I can use it in a wxwidgets based Configuration …

Voice Chat

So, guess what I got distracted with. That's right voice chat. I was doing some reading on the OpenAL API and noticed it had support for both streaming and audio capture.

So of course first thing I think of is voice chat for the game. So in my excitement I pounded out a nice chunk of code related to voice chat.

The idea of it being that you would hear people within ear shot and OpenAL would take care of the direction modification & volume relative to distance.

The game's networking code is already designed to be relatively low latency so I should be able to pull this off. However there are a couple tricks.

One is Managing all of those OpenAL resources. I'm pretty sure there are a limit to the number of sources etc you can have. I'm not sure if those are just active ones aka ones playing or if it is a hard limit in the API. So I don't know if just creating them in the scene nodes will work like I want it too.

Second is making my messages efficient. I believe voip o…


Here I go again getting detracted.

I deciced to go with PostgreSQL for my database. This desision is in part because the license is commercial friendly but also because the database is very feature rich and capable of handling large amounts of data.

The general idea being that the game server acts as a state machine of sorts and it saves it's data back to the database on a regular interval. And of course when the player logs out thier data would be saved then as well.

I've only added some basic stubs for the data access class. I'm planning on just throwing all the database stuff in there. Normaly I would break it out into a class for each type of thing but in the past when I did that I ended up just creating instances of other data access classes in others to handle complex data structures containing other complex data structures.

The issue is just that there is no clean division because by nature all of the data is linked in one way or another. Now that said I would probably …

Enet progress

I was able to make some progress with enet. My client now connects to the server and I send packets to the server it receives them and responds to them. The movement message anyway.

I realized one flaw in my response packet though. I'm not currently passing the id of the mesh(player) to move on the screen.

I'm not actually moving the player based off of server authority yet but that will be the next step. I'm going to have to rethink a few details on the client side.

The server will need some changes as well so it populates the id when it sends the response.

I will probably use a set or map on the client with the id as the key and the mesh as the value. Of course all of them will need to be added to the scene but that should be the easy part.

I'm going to crash early tonight & shave.

Enet troubles

So I have enough of my networking code complete that I should be able to make sure it is connecting and report the movement data sent via cout.

However what actually happens is these events appear to never happen even though both the client and server are polling.

There was an issue with the port number but I fixed that and still no go.

The packet deal doesn't surprise me but the connection issue is troubling.

I need to get some sleep I'm clearly not getting anywhere this morning.

I hate it when I hit a brick wall with a new library.

Movement updates

I have now added more logic to the client & server for the movement code. for 0.1.0 I intend to bypass the login code and assume everyone is on the same map. That should be easy to do because I can just leave the map index at zero.

The biggest problem is going to be I have no idea if my networking code is correct. Once I get enough code to pass this message back and forth I will probably need allot of debug time to get this correct.

If it works the first go I'll be impressed.

Also I merged some of the data structures between the client & Server. This reduces maintenance but it also makes the project look like an include nightmare. Or at least the start of one.

I don't think I can avoid that though so I'm going to roll with it. I could just add all of that to a library but I don't want to do that. One for performance and another because I want to keep all of this logic in the actually projects were possible to keep from having library issues.

So basically what I'…

Request-response pattern.

I'm going ahead with a request-response pattern for my client server communication.

I guess that statement is somewhat generic though so I'll describe my implementation a bit more.

For each action to which I need to contact the server I'm creating a request and a response object. Those objects inherit from the message container class which is a container for the message union.

The message container has basic utility functions to aid the child classes in manipulating & reading message data. This allows safe access to data inside the message union. Direct access to the message union could get pretty tricky and although probably more efficient in the long run would produce difficult to diagnose bugs.

Anyway each child class of the message container will have named properties for each of the messages attributes so the rest of the application doesn't need to know how the data is stored in the message. This also allows from some measure of data sanitizing to be enforced acro…


So, I got distracted from the necessary tasks for 0.1.0 and created a new class called IWaterSceneNode.

Despite the name it isn't really an interface so much as a base class for water scene nodes with no drawing logic. (the cheesecake is a lie)

The plan is to at some point create a water scene node that handles the surface as well as the camera effects to make it look like your in water when the camera is inside the node. Also I added some stubbed logic to my custom scene node animator to modify gravity and movement speed when in water.

I have a feeling that when all is said and done my scene node animator will be monstrous in size. There needs to be allot of plumbing in that class.

I'm also going to need to construct another scene node animator for the other players. One that will need to be referenced and updated from inside the client class.

This is a long way off though because I still have no network functionality. Lots of stubs though lol.

Sad Day

So, a buddy of mine is going to be away for a while. I'm kind of bummed out about that. Plus he was doing modeling for the game so that will slow down progress.

This also points out a weakness in this projects structure there are no backup developers. We are running skeleton crew basically.

To be honest I'm not sure how to fix this. It will be interesting to see how this project unfolds in the coming months.

I'm kind of hoping that a side effect of getting a project management degree will be a refinement of my project management skills. Maybe I'll have a class on how to get people to work for free lol.


So, heads up to anyone actually reading this. I'm planning on going back to college for another degree in September. My guess is my progress on the project will greatly decrease at that point. I'm gonna have to get my butt in gear to get a demo out before then. My Goal for my first demo is to be able to see and talk to other characters on a map. Combat, map switching, environment interaction and other goodies will have to wait.

The primary blockers at this point are as follows.

1. Currently there is no actually network functionality.
2. There is no way to access the GUI elements because of the existing camera.
3. There is no clean way to report player movement to the server because of the existing camera.
4. The Chat window doesn't really do any thing yet.

So, based off of the above the first order of business will be to create a new camera that supports the above functionality.

Second I will need to actually build in some stubs in the chat window to make way for actual functiona…

Quick Patcher Update

I still don't have sync functionality nor an embedded browser. It can however load the client by click a play button near the center on the bottom. That seems more or less standard. I also have an exit & setup button. The setup button points to a currently non existent setup application for setting resolution & such.

I'm using wxShell to run the programs. I did notice that I created a shortcut on my desktop to the application and if I run it that way the play button crashes. If I click on it from inside the folder it works perfectly. I have no idea what the problem is I checked the working directory and it is correct. Also the client loads most if not all of the resources before crashing so I'm not sure what the deal is at all.

I think I'm gonna call that good for a while because wxmozilla & wxwebkits seem underdeveloped and not very windows developer friendly. And frankly I need the to be easy to get to build on all supported platforms. Also rsynclib seems l…

Plugin success well sort of.

I finally got the plugin to build with Microsoft's compiler after which irredit was happy to load it. I did notice that it just assumes you created icons an placed them in the resources folder. So naturally I got another error.

That was a simple fix though I just created some stuff and threw them in there and it worked. However there seems to be a flaw in my code somewhere because the nodes don't have a type.

Which as far as I know means they can't be loaded. Also when you exit irredit after adding one of my nice custom nodes it dies. The file will still write out ok though if you saved.

I'm not sure what is causing the crashing but now that I'm thinking about it I think I know why they don't have a type. I think there is a getType function I have to overload.

Sigh, I hate examples that are incomplete. It really makes it hard to tell what is needed. Well I guess the rest of you can save yourself some pain and suffering by looking at my code after I get it working.



I'm planning on making the patcher for the game using wxwidgets. It has an acceptable license and it is cross platform. Also there is a nice little designer included with codeblocks. Plus codeblocks itself is built with it.

If I can get this to work the way I want then this will work fantastic. Like most patchers I plan to embed a small browser panel in it that points to a predefined site. Which to begin with will probably be my site. I plan to use webkits if I can get it to work like that. That would be sweet.

I haven't decided what I will use for my patching protocol yet though. I'm thinking about rsync to be honest if I can find a library with an acceptable license.

That would be so awsome diferential transfers on a patcher. I wouldn't have to do anything really it would be able to figure out if the server had a newer version or not and push out the updated parts.

I'm getting excited just thinking about this. I may end up taking a short break from the client just lo…