Join! Login   Search
RaMtiGA - Raising a Middleworld to its Golden Age
RaMtiGA - Raising a Middleworld to its Golden Age: Blog
Jan 14

Written by: Jashan Chittesh

ARGH! I've just about half an hour because of the Mac OS keyboard layout and the way Firefox deals with it. I had a lengthy blog entry almost completed, with all the details of what's been happening during development during the last week, and there's been a LOT happening. Interestingly, while I was writing this, one time I almost hit "save". But then thought "well, I better finish this". Hm... really should have learned that by now, shouldn't I?

Then, I hit ctrl + left because I wanted to jump to the start of the line. In the "code view", this is just fine, but in the WYSIWYG view, what you get is a fucking "browser-back". I immediately hit "browser-forward", and there was... the blog entry, in its initial state, being almost completely emtpy. Too bad... I save now...

... and back I am (saving a blog entry, unfortunately, is not just hitting ctrl + s, or cmd + s, as we Mac users do - it's "click on the save link", wait for a reload, click on edit blah blah... it takes time, but less time than losing your work).

So, where did I start? Yeah, ok, I'll try to get back into my enthusiasm. The last week was pretty harsh, indeed, BUT:

I finally got the very first version of Jashan Chittesh's Unity Multiplayer TRaceON with networked multiplayer support online!!!

But, there were tough challenges to be met on the way. I'll share a little about this: About a week ago, I started with developing the network part of JCsUMTRON. Almost immediately, I had a little chat going, and everything seemed to be easy and smooth. Then, I did a complete rewrite of the GUI on the start screen (GUI is graphical user interface). The game now has four modes: Tutorial, Practice, Single Player and Multiplayer. Of those four, only Practice and Multiplayer do pretty much what they were designed for. I'll spend time on the tutorial later, that'll be fun, too, but not now. And the Single Player mode also will still get some time, design, tweaking and so on...

Just saved this blog entry... again...

One major part I was working on, was the team setup. You can now connect to the server, in multiplayer mode, create a team, join the team, rename the team if you're the first team-member. Leave the team, create other teams. You name it... And: This works completely "distributed", i.e. many people can do that at the same time. For testing this, I had my two old DELL Inspiron laptops sitting right and left of me, with my Mac keyboard and DELL display(s) which are connected to the Mac Pro sitting behind me (it creates too much heat to have it below the desk). All nicely connected via a network. All working just smoothly.

I also did a lot of tweaking on the GUI concerning efficiency. Thanks to OJ, who tested my game and one of the first things he asked "can I start this by pushing a key"? No, he could not. But now, he can. And you can do pretty much everything that you have to do many times when playing the game, simply by pushing the left ctrl-key (strg-key on German Windows keyboard) and the key in brackets, e.g. to [C]onfigure, you would press left ctrl + c.

I used that a lot during testing... So, everything went fine, until, on January, 9th 2008, from 11pm til 2am, I created the spawning part of the multiplayer session. "As usual", I tested this on my Mac with the two notebooks sitting next to me. One instance of the game on the Mac, and one on each of the Windows XP machines. Unfortunately, the game crashed almost every time on both the Windows PCs when the cycles were created and the actual game was about to start.

At first, I thought I must have done something obviously wrong. In fact, I had stumbled upon something just the day before where I used some part of the API (application programmers' interface) of Unity in a way it was not designed for giving me serious pain because I got the weirdest behavior. You can check out my posting about this in the Unity forums. That happened while I was doing the team configuration stuff. Just a little hurdle, no big deal.

So I fixed these issues. Did a lot of cleaning up. Did a lot of testing. That was very frustrating: Start up the network game session, hit play, see two Windows game instances crash. Start over. Every once in a while, it worked, but only rarely. The crash was one of the most evil sort: The game window simply disappeared. No log entry, no error message - just "gone". That's the most frustrating kind of problem you can ever have as a programmer, because it gives you no trace to follow, nothing to help you find out what the problem is.

So what you do is, you create a trace. By adding a lot of "this code was executed" logging statements. Ok, logging in Unity is not really that cool, so I added log4net. Another cool little sub-project. By doing that, you can find out approximately where the crash happens. Well, what I did find out that way: The crash happens about 30 milliseconds after the actual game has started. And it seems like it does not happen in any of my code. And, it seems to happen nowhere where the network is actually used. That should have gotten me thinking.

I was a bit lost. First doubts appeared. It's really interesting to watch myself in this situation. The whole networking part was kind of difficult and mind-twisting. I never did something like this before, but it's really where my passion is. And that's the good news. And there were many instances where I felt like I had an incredibly good intuition about how to do these things. It's quite impressive to watch yourself having this whole complex thing in your mind, and then just going right where you need to go, add a line of code, or two... or... maybe 10... and suddenly something works as you wish. Nice.

But then, those crashes. Not nice. Maybe networking is really as bad as many people think. Maybe it's really not for independent game developers. And that's just a small multiplayer game - RaMtiGA is massively multiplayer. Will I be able to pull this off, or will I fail? Will I get the multiplayer version of JCsUMTRON online at all? The server I'm using is a Windows server - if that crashes all the time, it won't be fun for anyone.

Very challenging.

So, I posted to the Unity forums, again:

Multiplayer Oddities: Windows Standalone Crashes...

You don't have to read this - but if you, you'll soon see the end of the story: I though that probably, it's a bug in the game engine, not in my game. When I file bug reports, I want to put as little burden as possible on the developers. And I know the problem I have here is something nasty to figure out and fix. So I did a lot more testing (probably, I've spent about a day just testing this in all kinds of variations). Just a moment before I sent out the bug report, I realized something very interesting: This crash occurs also when I'm not even in network mode.

OUCH! And interesting: Those people that think networking is a tough business got me into their trap. I simply didn't do enough testing on Windows to find out that this happens even without any networking at all. I only used those notebooks for testing the networking aspect, and so when that crashed, I thought the networking was the problem.

Well, there were a few more challenges to be met - but I feel I want to go to bed real soon. It's starting to become a little late... again...


Deja Vu... This is about where I was before the unfortunate "oops, activated browser-back even though I just wanted to go to the beginning of the line, and OOOOPS, that means I've lost about half an hour worth of writing what's been happening between JCsUMTRON V0.5 and V0.6.

Well - I'm done for now... The first multiplayer version is online, and if you wish to play, be sure to contact me via Skype at jashanchittesh - so we can play (it's most fun with online chat).

Argh, I almost forgot (in the original blog entry that was lost, that was how I started the blog entry): About 4 hours ago, I had the very first multiplayer session on JC's Unity Multiplayer TRaceON against Aiyanna, and wow, that was a LOT of fun!!!

Wanna join in - go here:

JCs Unity Multiplayer TRaceON V0.6

All versions of Jashan Chittesh's Unity (Multiplayer) TRaceON so far:


Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
Copyright 2007-2010 by Jashan Chittesh   Terms Of Use   Privacy Statement