Wednesday, November 2, 2011

Enigma Ogre Client


Those of you keeping tabs on the SVN commits may have noticed I recently added a new project called EnigmaClient-Ogre to source control. It's exactly what it looks like I have finally added a new graphical client which will take the place of the old Irrlicht based client that used the old architecture. Several of the problems I was having before are addressed by this move. One issue was the lack of flexibility in the Irrlicht GUI system. I'm now using CEGUI which thus far has proved to be much more flexible and powerful than anything I could have thrown together. Also although not used yet Ogre has a paging scene manager which is what I was trying to achieve with the land blocks in Irrlicht accept it is better.

Part of the reason for starting the new graphical client now is simply that the features I'm working on are getting harder and harder to implement using a console interface. At some point it will surpass the effort to just implement it graphically. Fortunately for me CEGUI uses an event driven model as well so wiring up new controls is relatively painless. On top of that it integrates flawlessly with Ogre so I don't even have to call rendering events for the GUI it just does it when I tell Ogre to render.

As of this writing the new client is on 0.2.0 on the roadmap. Users are able to connect to the server, login, and exit. Although once you login you get an error because there is no character select screen yet. The other nice thing about using a graphical client again is I have something to show so I will.

Tuesday, October 25, 2011

Enigma's New Home

Beyond the Enigma coding effort there is a separate but related effort to to actually make a game out of this thing. Previously this had been hosted on a site called Enigma RPG however Brandon and I need a site where we and those to work with us can post all of our game projects big and small. We also needed a name for all of these little projects to fall under. With all of that in mind the Enigma game information is now hosted on www.solemnsoftware.com don't worry we didn't sell out to the man I own the domain and it is merely a place for those of us working on these neat little projects to post our work. We are still working on building the team though.

That is all for tonight I have a cabling job in the morning, thanks for reading.

Saturday, October 22, 2011

Can You Hear Me Now?

I recently completed the addition of Guilds to Enigma and I just moved on to re-implementing the voice chat. However there were some problems with the previous version which I will have to address while I'm working on that section. All of the audio functionality has been moved to the new EnigmaAudio library. This will handle audio input and output. Right now it has the ability to play audio from any format supported by sndfile from a filename. At some point I'll probably add the ability to play by id like with maps and other resources. For now however it is working pretty well and gives me a good base for working on the new voice chat.

One of the voice chat issues I previously mentioned is that before I was actually just sending raw PCM data over the network which is obviously not going to work over the internet it did however allow me to test the mechanics of OpenAL. I've been doing some reading and my intention at this point is to use speex to encode the audio and then send it like I was doing before. The speex library I believe has stuff built in for packet loss so I'll probably work reliable off for voice chat messages after I finish. That will improve the performance and allow speex's polished logic to shine.

All of this will probably have to wait until next weekend unless this week is super slow in terms of work. I sure hope not though I need the money. Alright that's enough for tonight thanks for reading.

Saturday, October 8, 2011

fatal error C1001: INTERNAL COMPILER ERROR

MSVC is just about working my last nerve with this one. In the past I've had strange issues here and there like the compiler ignoring things it shouldn't however this one takes the cake. Right now I don't have any lock on the id of my entities because if I add the mutex to the base object class or even a different class such as storableobject then the compiler crashes with an error code of C1001.

Now for those of you who don't know basically a C1001 means the compiler got confused and gave up more or less. If you Google it you'll get allot of listings of other people having the same issue under different circumstances. The thing I'm struggling with is the fact that this is still an issue even though I have all the service packs and other updates for visual studio 2008. I've contemplated trying 2010 but I really doubt it will work any better. C++ is kinda getting ignored these days because it isn't trendy.


I guess at this point this is more of a rant but here is some information I have found. One thing that can cause this issue is multiple explicit templates there is even a Microsoft KB article about it no fix though their solution is don't do it. No suggestion for using 3rd party libraries that do. Also just general complexity tends to cause this issue. I don't have much of a choice given I'm creating an MMORPG but if you can help it keeping it simple may just same you some pain and suffering. Sometimes moving stuff around will clear it up but problems that magically go away have a way of magically coming back.

That is all for now thanks for reading.

Monday, October 3, 2011

Login restored

This morning I finally added the command parser to the session manager. Although it seems like a strange place for it putting it there seems to work rather nicely thus far. For example some commands are simply chat message so I simple push a chat event unto the event queue and I'm done. I have access to the transmission manager through an interface so sending messages to the server isn't an issue either.

After getting the command parser in place I tested a couple simple commands then added a brand new login command. although mostly useful for the console client I'm thinking it could also be useful for a voice based client if one were ever created. At any rate I tested it and it worked after a couple bug fixes. I'm one step closer to getting Enigma back up to the functional level it was at before I started the rewrite. I want to have community features restored before Enigma's 3rd birthday but we shall see I'm getting pretty close and I have allot of ground to cover.

On a related note I will probably have to turn the polling length for enet down on the client. It seems like it is waiting too long for traffic to come in and it can't be polling and sending at the same time because both require a lock on the host object. with the server it isn't an issue right now because it is only reactive at this point but the client is sending stuff to the server all the time in theory which means it needs to be more responsive. That said having a multi-threaded client and server makes me feel warm and fuzzy inside plus no deadlocks yet. We shall see how long that lasts.

Alright that's enough for tonight thanks for reading.

Friday, September 23, 2011

Connection Established

It's been a long boring road to get to this point but tonight I got the new test client to connect to the server. Unfortunately that is all it is able to do at this point but that is still huge process in theory connecting the events to the new client should be relatively easy. In any case I should find out pretty quickly how fruitful all of my new architecture work has been. I'm excepting a few bugs here and there but hopefully nothing major.

After I get chat and such working again I'm going to start working on getting audio back in the game. Yes ... that's right audio in a console client. The reason is that the audio component should be fed from events so really it isn't tied to out the scene is presented and developing it with the test client should make it pretty easy to drop in once I have a new graphical client.

Also I'm thinking about completely recreating the RoadMap because the client is effectively below version 0.1.0. I should catch up to where it was but honestly I think this is a good chance to polish parts that were stubbed such as character creation.

Thats all for now I'm getting tired thanks for reading.

Tuesday, September 20, 2011

It's Almost Enigma's Birthday

I was looking over my old blog posts a little this morning while adjust Enigma's project road-map and I realized that Enigma will be turning 3 years old on October 5th. Obviously it was just an idea in my head at that point and the Phoenix Kit project is much older than that it is still in interesting thing.

If you want to see the original blog post a link is provided below.
http://techtinker.blogspot.com/2008/10/i-dream-of-mmorpg.html

Thursday, September 15, 2011

Enigma Events & Another Glorious Distraction

The Enigma events are now in place all of the events I have accounted for thus far anyway. All I have to do now is start in the client session manager and start adding code to generate events in the message processing functions. I hadn't finished the client session manager so it won't take too long to catch up to where I was and once I do it should be smooth sailing into the next phase which will be creating a test client that uses the new API. My test client will likely be a console application because that reduces the chances of errors in testing the session & transmission code so I can make sure it is solid before rebuilding the graphical client.

One potential difficulty is that on top of the fact I have been playing EQ2 again I have become interested in an operating system called Haiku which may distract me from my Enigma development effort. This isn't anything new though Enigma has been going on for years and there are occasional distractions and normally I come back new experiences that enable me to make Enigma even better. Haiku is heavily threaded so lets see what I learn.

Tuesday, August 23, 2011

Enigma Client Events

Work on the client portion of the session library has been slow mostly due to my crazy work schedule. It is hard to dig into code when you never know when your going to get called to do a service call. I finished a recent programming job for one of my actual clients and sub-contracted work has slowed down as of late so I made some decent progress today. For the record I would rather business pick back up though because slow weeks are tight budget weeks.

Anyway down to business although the current approach works just fine on the server side of things (mostly because it is basically single threaded still) the client side will need something a little different. The problem is that although the session manager will keep track of the state there are certain things that have to happen when some events happen. For example when the map is changed the session library just has to change the map Id in the user object and reset the map object(server sends new data). The problem is that the client will need to load the new map. The question becomes how will the client know to load the new map. I could keep an internal state and compare it on each frame but that is both expensive and inefficient because state will be stored in multiple locations. The obvious solution at least as far as I can tell is to go with an event driven architecture. That means having callback functions in game objects and have an event manager call them. At which point the objects can access game state and adjust scene-graph state to match.

Now that idea should work, however there is one notable catch. To prevent cross threading issues I will need to make sure the event queue is thread-safe and that the events are actually called from the graphics engine's thread. The reason is that some graphics engines have the requirement that some functions have to be called from the same thread that initialized the engine. So to make this work what I plan to do is call a "DoEvents" method from the main render loop which should work nicely. That model also still allow the rendering to be decoupled from the network latency because the network thread can be polling for updates while the game is rendering and just update the scene on the next pass.

If memory serves there is a inter-process queue in the boost libraries. I may use that or create methods that lock a mutex and modify the queue. I will also need to create event classes as well as event listener classes. If I do this correctly tying Enigma into a graphics engine should be a piece of cake by comparison at least.

Alright that's all thanks for reading.

Wednesday, July 13, 2011

Small Business

As of late things have changed dramatically with my work situation. By that I mean my place of employment was closed due to the death of the owner. I'm working on an as needed basis for the owners brother which is better than nothing but could definitely use more hours. At any rate I decided to start my own business to pick up some business on the side to supplement my income. The services I intend to provide are custom computer programming, cloud services, and online backup (through a partner). More services are like to be added later.

At anyrate my site for this new business is www.schaefersolutions.com


Thanks for reading folks.