Jump to content
  • Advertisement
  • entries
  • comments
  • views

Finally, an update!

Sign in to follow this  


Well I've been working my ass off these last few weeks and sometimes it seems as if the game is still the same lol.

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)


//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
Sign in to follow this  


Recommended Comments

Are you using TCP or UDP for your communication protocol? This game looks so fun. I can't wait to see how it turns out.

Share this comment

Link to comment
Ah....well I guess I can't take all the credit for multiplayer. I use a 3rd party library called RakNet ( http://www.rakkarsoft.com ). It's free to use for commercial purposes if you're approved.

RakNet uses only UDP....but they added a reliability layer on top...as well as a bunch of other features to make life easier.

I've still got to design the packets, do all the lobby stuff, manage states, manage bandwidth, send the packets, and sync everything.....but it does provide a robust/reliable/fast way to get data from computer to computer.

I'd highly recommend it to anyone making a multiplayer game. It's saved me A LOT of headaches.

- Dan

Share this comment

Link to comment
I like the radial menu's, very nice addition. It looks like your contents coming a long nicely too. I know I keep nagging about the Beta testing, but hows that time frame looking?

Share this comment

Link to comment
Hey Dan, nice stuff. I've started work on my game. I'm building the collision test and response part. The character will be able to hang from edges, and most of the movements similar to Tomb Raider. I had a questionmto ask.
What is your game's frame rate? My frame rate is about 2500 polys per frame at 20 frames per second. I'm using the Opengl fixed function (Opengl 1.2). I'm targetting the lower end gamers that don't have graphics cards. Is this frame rate normal, from your experience. I've tried alot of optimisations including display lists, vertex array and this is as high as it gets. (P.C. specs: 1.7GHz Celeron, 512MB memory).

Share this comment

Link to comment
Ohhhh Yeah! California! You will definitely enjoy it out there! I'll be heading back that way (san diego) as soon as I finish up college. I can't wait!

Great job on the progress of the game! Everything is looking outstanding and I cant wait to get my hands on it!

Take care

Share this comment

Link to comment

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!