Holy Cow Batman, Is OneWorld done yet?!?!?!?!?
by Vince Gee · 01/30/2013 (9:57 am) · 3 comments
It feels like I have been working on this project forever. For those that follow my blogs you might have noticed I haven`t been blogging as much. Well, it is simply because I have been up to my ears in coding. But, of course, good things come to those that wait!
I started writing OneWorld about 3 months ago on T3D 1.2. Back then I was using TorqueScript/CSharp and pretty close to a stock engine with DNT. I then started modifying the engine just as I needed to, with most of the logic implemented in TorqueScript or CSharp. Slowly I moved more and more client and server logic into the CSharp, but I had decided to leave the tools folder in TorqueScript.
Then last weekend when I thought I saw a light at the end of the tunnel, instead I got run down by a corrupted network stack. I spent all weekend going over all the code; looking for what I could have possibly done wrong that was causing the engine to crash. Sunday night I was defeated, I had no idea where I had gone wrong.
Just as an FYI, I`m not one to take defeat easily.
So Monday I decided to take a new approach to the code base. I decided I would port each piece of OneWorld into a MIT build, this way I could unit test each section as it was implemented. Since I wanted the least amount of possible variables I also decided to convert all the CSharp into C++. So slowly, I started re-integrating the code changes into MIT.
The first few commandToServer/CommandToClient rewrites as SimEvents went quite easy, I will be honest there was a few times I was left scratching my head. I would port the code, unit test Standalone/Client/Server/Dedicated Server. Each major section introduced into the MIT build went through this process.
Finally, I did find what was corrupting the network stack and it was definitely a DOH moment. After finding it, I quickly recompiled and started testing the codebase again.
After a couple hours of bug fixes here and there, I got myself back to where I was on Sunday. There was one caveat though.
I was running a standard TorqueScript project and all the heavy lifting was now being done inside of the engine using C++. Beyond the tools folder, there was no need to change more than 5 lines of TorqueScript code to make the stock game template work! (You do need to copy the modified tools folder in though)
So, right now, I have OneWorld working without DNT, mind you I would have never been able to make the jump from TorqueScript to CPP without having DNT in the middle. DNT allowed me to prototype the C++, which proved immensely beneficial.
I am still shooting for a release this quarter, and I think most people will be simply amazed by how smooth the editor is considering that you are transmitting stuff over the wire.
Currently, OneWorld allows players to edit all Static`s in the world and there properties, you can create any object you could normally create in the tools. You can modify objects, terrain, Forest, road, decal roads, meshroads, etc. I even added in a bit of black magic to allow each person to set their own camera speeds. I removed the buttons and menu options to the things I couldn`t network. (Really, it wasn`t so much I couldn`t network, I just didn`t have the time to give them the time it would of taken. I always have version 2!)
I currently have to finish up networking the DecalManager and integrate a FTP server/client code so that when clients connect to the server, the server sends them any missing assets/mission files. I already have prototyped the functionality out, I just need to now roll it into the engine.
The jury is still out if OneWorld will work on Linux, I know I do load up materials, since I need them for painting the terrain or the mission will not save correctly.
Well folks, be on the lookout for a public beta, it will be soon!
Vince
Winterleaf Entertainment.
I started writing OneWorld about 3 months ago on T3D 1.2. Back then I was using TorqueScript/CSharp and pretty close to a stock engine with DNT. I then started modifying the engine just as I needed to, with most of the logic implemented in TorqueScript or CSharp. Slowly I moved more and more client and server logic into the CSharp, but I had decided to leave the tools folder in TorqueScript.
Then last weekend when I thought I saw a light at the end of the tunnel, instead I got run down by a corrupted network stack. I spent all weekend going over all the code; looking for what I could have possibly done wrong that was causing the engine to crash. Sunday night I was defeated, I had no idea where I had gone wrong.
Just as an FYI, I`m not one to take defeat easily.
So Monday I decided to take a new approach to the code base. I decided I would port each piece of OneWorld into a MIT build, this way I could unit test each section as it was implemented. Since I wanted the least amount of possible variables I also decided to convert all the CSharp into C++. So slowly, I started re-integrating the code changes into MIT.
The first few commandToServer/CommandToClient rewrites as SimEvents went quite easy, I will be honest there was a few times I was left scratching my head. I would port the code, unit test Standalone/Client/Server/Dedicated Server. Each major section introduced into the MIT build went through this process.
Finally, I did find what was corrupting the network stack and it was definitely a DOH moment. After finding it, I quickly recompiled and started testing the codebase again.
After a couple hours of bug fixes here and there, I got myself back to where I was on Sunday. There was one caveat though.
I was running a standard TorqueScript project and all the heavy lifting was now being done inside of the engine using C++. Beyond the tools folder, there was no need to change more than 5 lines of TorqueScript code to make the stock game template work! (You do need to copy the modified tools folder in though)
So, right now, I have OneWorld working without DNT, mind you I would have never been able to make the jump from TorqueScript to CPP without having DNT in the middle. DNT allowed me to prototype the C++, which proved immensely beneficial.
I am still shooting for a release this quarter, and I think most people will be simply amazed by how smooth the editor is considering that you are transmitting stuff over the wire.
Currently, OneWorld allows players to edit all Static`s in the world and there properties, you can create any object you could normally create in the tools. You can modify objects, terrain, Forest, road, decal roads, meshroads, etc. I even added in a bit of black magic to allow each person to set their own camera speeds. I removed the buttons and menu options to the things I couldn`t network. (Really, it wasn`t so much I couldn`t network, I just didn`t have the time to give them the time it would of taken. I always have version 2!)
I currently have to finish up networking the DecalManager and integrate a FTP server/client code so that when clients connect to the server, the server sends them any missing assets/mission files. I already have prototyped the functionality out, I just need to now roll it into the engine.
The jury is still out if OneWorld will work on Linux, I know I do load up materials, since I need them for painting the terrain or the mission will not save correctly.
Well folks, be on the lookout for a public beta, it will be soon!
Vince
Winterleaf Entertainment.
About the author
www.winterleafentertainment.com
#2
01/30/2013 (1:52 pm)
Quote:Most people overestimate what they can do in one year and underestimate what they can do in ten years.- Bill Gates
#3
Great quote Frank. Too true!
01/31/2013 (12:40 pm)
I can't tell you how anxious I am to get this in my hot little hands! Been waiting for this ability since I decided on Torque so many years ago. In fact the original collaboration tool that was available for TGEA at the time was one of the deciding factors in going with Torque vs other engines. Then T3D came out at about that same time and I never did get to put that other collab tool to use. Never even bought it. So many cool things coming down the pike now that we can barely keep up adding them to our build!Great quote Frank. Too true!

Associate Chris Calef
BrokeAss Games