Showing posts from May, 2009

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…

Scene nodes

Alright so I over looked the obvious with the custom scene nodes. They don't have to be added to the scene by some method of the scene manager. They are added via their base class. So it looks like I was making things to complicated. I could have simply created and instance and been done. Assuming my code was all in working order of course. Which in the case of the camera related code it clearly wasn't.

Regardless I have made some nice progress related to custom scene nodes. I have a working openal sound node I constructed myself and a nice water scene node that I got from the irrlicht forums that I heavily modified. Both of which currently can be are created by my factory class.

I intended on creating a plugin for irredit to allow these to be placed using the editor. However it appears the plugin would only work if I compiled it with microsofts compiler. Something about a difference in the calling convention for dll import & stdcall decorated functions.

Basically I get a big…

bolstering forces.

A long time friend of mine has moved back into town. And on top of that has taken an interest in creating maps for my game. So with the two of us hammering away at this thing I hope to have some sort of tech demo available soon.

I have another possible team member however that is still largely unknown. I'll need the team to grow but I also need to make sure everyone that joins the team has a way they can apply their respective talents.

After all this is a for fun project and not being useful normally isn't much fun.

openal sigh

As I mentioned in my last post I have been working on getting sound working in the game.

Right now I have a working waterfall sound that is placed 0,0,0 on the map. I checked and looking away just change the how the sound is played. if you look to the left the sound will now come from the right etc. So it works. However I get several warnings that some of the functions I'm using are deprecated. So I have to find an up to date sample and fix that.

That is the main thing holding back sound in this game is the poor documentation I have been able to come across. I'm sure there is some out there but I'm used to doing a quick google search and find an example of exactly what I want to do.

Hopefully I can get this working with whatever the new method is and soon be able to transfer this functionality to a proper implementation of sound in the game.

Irrlicht frustration.

Alright, some of you may have guessed that this is by far the largest project I have attempted with irrlicht. Well as of late that has been showing. I was planning on creating a proxy class for the fps camera so I could automatically update the listener location in openal.

However I hit a snag when I realized that it was actually just a normal camera with a animator attached to it. I also hit another snag when I realized I couldn't just create my own contreat scene nodes and insert them into the scene.

For one the contreat types of the other classes aren't even accessable using the development headers. There aren't any for the C classes only the I classes with few exceptions. I also couldn't find an insert scene node function that actually took a scene node. I found one that takes the name of a type but again it wants to control every part of the scene nodes life cycle. And as my new type would be unknown to the engine this presents a bit of a problem.

So I was thinking h…

Client Updates

I have shifted my focus to the client for the time being. The reason for this is I need something to show for a technical demo. I have a friend that knows several multimedia people that he claims would love to work on my game. I'm sure they will be unlikely to be excited to work on something that won't see any results on for a long time.

So, for now I'm leaving the login and character selection stubs in place and I'm focusing on the graphics, sound, and such.

I plan to get to the point where the basic parts of the engine work so I can then complete the basics of networking and allow multiple users to run around in a test map. I would like to have this completed this year.