Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Well, I had been planning on spending this whole weekend programming, however my aunt came into town on thursday and I ended up doing family activities both thursday evening and friday. So I didn't get done near as much as I wanted.

Today however, I got to work pretty much the whole day.

I had some extra money this paycheck, so I went ahead and purchased a license for Torque2d. Thinking maybe I could use it to hack together a client for my server. I read on their public forums that they really didn't have much in the way of network capability in it yet, so I figured I could hack my socket library in somehow and use it to communicate.

I was right. First I'd like to say that it was a huge pain in the ass, and it took me about 6 hours to get my library to compile inside their engine. I couldn't get their engine to compile under Dev-Cpp which is what I am using to code the server, so I had to compile it with the Visual Studio 2005 beta. The Torque2d application compiled pretty easily under VS2005 with a couple little gotchas that were easy to fix.

The pain came when I implemented a scriptable object from C++ to wrap my socket library in. My library includes winsock, which apparently conflicts with the engine, because they have a source file in the engine that reimplements the new operator. For no reason that I can tell.

I tried about everything I could think of to resolve the name conflict. Finally I ended up just commenting out portions of their redefined operators and crossed my fingers. As far as I can tell the executable is running fine without them, so they are going to stay that way.

Tommorow after I get up ill implement my protocol on the T2d side and see if I can get the scripting engine to create objects on the fly over the network. The objects support callbacks from c++ to the scripting side, so I don't see this as a problem. I just have to get familiar with their scripting a little more. If I can create a "datablock" (their script based idea of a structure) in c++ and pass it to a script side callback function from the network object I won't have any problem from there.

I'm actually kind of excited about using T2d to do the client. Their scripting language is really flexible. I went through the tutorials that came with the engine. You really can do a basic side scrolling shooter like the one they have up for download in about an hour.

So now that I have my network library crammed in there I am going to bed, I'll post again tommorow.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!