I suppose it's because I made several attempts at coding up ways to sync the NPCs and vehicles in network games. After about 2-3 attempts and 100s of wasted lines of code over the last few weeks, I think I've got it.
There can be 6 clients per server, and 50 members in each client's gang. Also...throughout the randomly generated city there can be 300-500 vehicles, and 800-1000 NPCs. That's not an unsolvable problem....but it is difficult considering bandwidth, latency, and other issues.
After spending a few days trying to resolve some issues, I finally have my algorithm working on the vehicles at least, and keeping the client bandwidth under 2kpbs (for the vehicles) in most situations. Obviously if there is a 50 vs 50 gangster battle in a small area the bandwidth goes up about 5-10 kpbs (per client), which is lame....but the data has to be sent, no way around it.
I'm going to require a broadband connection for the game, so it shouldn't be a problem. The bottom line is that it works, in some form now....after weeks of thinking/trying different solutions. I've gone through and optimized all the network traffic down to the bit, and implemented a few different prediction algorithms so I don't need to send the data as frequently. But I'm sure there is still room for improvement.
I really don't want to go into too much detail about the layout/structure of my networking code, I suppose it would just make it easier for 'hax0rs' later on. So I'm gonna keep most of that to myself until a while after the game is released. This is my first 'Multiplayer' game, so I'm sure my methods are no different than those used by other games. I am rather satisfied with the bandwidth/latency right now. I run all my tests on a server in Raleigh (80 miles away) which is on a T1 line. I get about a 50-100ms ping in my test clients...I feel that's a good ping to calibrate everything at.
Ah well...how do I show screenshots of multiplayer progress? Here's how [grin]
//Yes...the vehicles are syncronized over the network.
//After days of work, it finally works....it's a pain to debug network issues, especially if your server is 80 miles away *sigh*.
The blue object in that one screenshot is another player's camera. If another player isn't controlling one of their gangsters, you can see their camera position/view direction. That way you'll know if they're "peeping your shit".
Lets see....I'm also hoping to re-implement the diplomacy window soon. You'll be able to arrange meetings with other gangs, you can send them a private message and specify a location in the 3D world for the meeting to take place, as well as time it will take places.
Once the message is received/confirmed, there will be an icon in the 3D world stating the purpose of the meeting, as well as a countdown in seconds, until it is supposed to take place.
You can also 'speak' through your selected/controlled gangsters now, and the text appears via speech bubble in the 3D world. This way you can meet opposing gangs and make drug deals, chat, etc. without the other gangs knowing.
The cool part is this opens up the doors for ambushes, double-crosses, etc. Yea...you can arrange a meeting with another gang leader to sell him some blow....but what if he's got 15 gangsters waiting near by, and they ambush your getaway car and steal the yayo? Hmmmmmm the possibilities are going to be endless. I really want to leave this part of the game wide open.
I've added a functional inventory as well, and made some progress on the radial menu. Creating all the conversation branches is a bitch, but it adds a lot to the game. You can now go around the city peddling drugs to civilians to make a quick buck.
Here are some more newer screenshots (sorry I don't think there is FSAA on these screenshots)
//Eh....yeaaaaa
//You can vote for whatever gameplay mode you want to play, majority rules....server breaks all ties, randomly.
//Mmmmmmm radial menu
//You can type your own text, or choose from predefined conversation using the radial menu.
//Ah...a capture the flag mode. Staple of every multiplayer game, why should mine be any different?
//Which way to the porn-festival??!?
On a personal note, I'm hoping to move out to San Diego sometime this summer (will be a nice change from North Carolina). I really want to live in the downtown area, or in La Jolla. That whole area is perfect for me [grin].
But I can't do any of that if this game is still in the works. I'm really trying to get it out the door....but hey, if it's not done, it's not done. My main priority is to deliver a quality/fun product.
Also sorry for the lack of updates for those who are interested in the game, I assure you I'm still hard at work :-)
- Dan