• entries
338
2045
• views
1166429

# Multiplayer

301 views

I'm making a bit of a design switch regarding the game. I'm going to make it centered around multiplay.

This is a bit of an ambitious move, but it's exactly what I've always wanted, and it's how the game has been designed from the start.

The player will still be able to play against the computer/bots in a offline mode.

I'm going to use RakNet for the networking library, it's not feasible for me to write my own, and there would be no point. RakNet has been used in a few commercial games and I've run some tests using their example programs and it looks like a very feasible option.

I ran it by my publisher and they're alright with it, and I havn't been this excited about my game in a very long time :-D

From the perspective of a lone-developer overcoming the challanges of implementing 6-player multiplay in a RTS game, is a lot easier than to create 25 stand alone single player missions with unique artwork, voiceovers, characters, etc.

Plus this will be a lot more fun :-D

I'm going to create a bunch of different gameplay modes to kep it fresh like capture the flag, command point control, serach and destroy, deathmatch, etc.

My concerns:
- Handling the physics over a network.
- Managing the 1000s of civilian/traffic cars.
- Nobody being around/online to play the multiplayer.

I've got a few solutions already lined up for the first two problems, and the last one is shared with every other indie multiplayer game, at least I'm not trying to make the next best MMORPG right?

I've got some clever ideas about how to solve the physics problem, and thankfully the way I designed the maps is very well suited to fixing the 2nd problem.

I've got my work cut out for me over the next few days, I've almost got chat going in-game (those RakNet guys weren't lying when they said it takes an hour to get their library in-game!) and I've tested their examples over my LAN, and a few of them over the 'NET.

I did have to setup a virtual server to forward the packets through my router, but that's a problem all video games face these days.

This will be cool because you'll be able to give orders to your gangsters, and then you can jump down and take contorl of one of them...the other players won't know which one you are! It's going to be great.

Any tips will be appreciated, and if anyone has experience (good or bad) with RakNet I'd like to hear it. And any ideas/kinks you guys can throw into my idea would be appreciated :-D

- Dan

What is the going rate of your sperm?

Unfortunatly it's only sold by the gallon at this point in time. Let's say $25k a gallon, and those are friend prices. What you'd want to do with it, now that's another question ;-) #### Share this comment ##### Link to comment Quote:  Original post by dgreen02 My concerns: - Handling the physics over a network. - Managing the 1000s of civilian/traffic cars. - Nobody being around/online to play the multiplayer. From what you show on your journal, I think everyone here will mob you for copies when you're done. I know I will. I wish I had the knowledge, time, and non-laziness to do what you do. I think that multiplayer is a great idea. I think Gang War is the one game where the usual game trash talk will fit in perfectly. Just my a$\$-kissing two cents.

I know you're crazy (and good!) enough to pull this through.

How much physics is there in your game? Do the trashcans roll when you shoot them or are you talking about driving physics?
Simulating a city is hard and even harder in a multiplayer setting. I know I hated GTA:VC everytime a car disappeared when I turned around. Hopefully you'll pull some clever tricks to make it feel right without killing too much bandwidth.

Co-operative gameplay!

Shooting out of the window while your friend is driving...

Yes there are maaany cool gameplay modes I can implement with multiplayer! It's going to be great. There will only be up to 6 players in a game at a time so I'll have a little more bandwidth to work with than the usual 32+/64+ player games.

If I represent the physics objects as quaternions, it's only 6 floats to send over the network, and if I keep track of exactly what objects are changing positions, and are visible by multiple players, there is a minimum amount of data I need to send over the network, and it should certanly be possible especially with 6 players in a server. Plus for simple/far away objects I'd only need to send 3 floats....x position, z position, y rotation and I could fill in the rest on the client.

Yes there are physics on streetside objects like trashcans, etc. I'm going to spread the physics calculations accross all of the computers. The server isn't going to do any of that, it is just going to sit in the middle of all the clients and relay information and make sure everyone is synced up.

I know what you mean about traffic cars disappearing in Vice City...they don't do that in my game. I actually keep track of all traffic/civilian positions. They have strategic value, for instance selling drugs to civilians, their density in an area is what determines how much money you'll be able to make without running accross all over the map.

Also due to the strategic nature of the game, I'd only need to send the "player inputs", like orders, over the network, and use those situations to sync everything up. The hard part is going to be when the player is controlling a gangster, I'm going to need to make sure everything comes accross smoothly.

One gameplay mode I was thinking of is 3vs3 player, where 3 players share managment of a gang, and play against 3 other players who share mangment of anoyher gang. That could be all kinds of fun :-D

Hopefully I'll be able to get all this implemented. Right now I'm working on the "lobby" where you find games, I'll post more info on this later on. :-D

Great. :-)

How about keeping the physics of small objects (trashcans, bottles) which have no gameplay use, that is they don't provide cover like big crates or cannot be jumped upon (to reach places higher up) client side? Just have them respawn after a certain time (the cleaners do their job well, hehe).

Oh yeah, one thing you definitely need: gang logo sprays. I'll let you decide if you want to let the players use custom ones. Chances are that they'll use pornographic ones. :-/ (They do that in CS:S).

I hear ya on the gang-logo-sprays! I was just about to post about it lol.

And I agree with your idea on streetside objects that don't effect the gameplay. It shouldn't be too hard to squeeze all the dynamic info about the city accross the network.

I just realized how I can do Capture the flag/Commnd point control type gameplay modes. There will be shipments of goods/money around the city at all times, they will be visible on the map. The players will need to hijack those transport trucks/armoured cars and take the contents back to their warehouse where they can sell them, evading other gangs, running from the cops.

You'll also be able to give realtime orders (think radial menu centered around your aiming reticle) to groups of your gangsters which should make it easier to work in small groups.

This opens up a whole othern world of gameplay options.

:-D

## Create an account

Register a new account