May 23, 2012, 12:50:20 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Various forms of multi-player  (Read 1064 times)
Spaz
Full Member
***
Posts: 109


View Profile
« on: March 31, 2009, 06:46:17 PM »

For my next project I need to be able to control 2 vehicles at the same time.  I'm guessing a multi-player game is the way to go for that, though I'd also take a version where both players use the same keyboard.  Anybody have any idea how two players might be able to do that?  What kind of success have you guys had with the multi-player abilities of GC? 
Logged
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #1 on: April 01, 2009, 12:26:31 AM »

I have been holding on multi player until we get to the final release. I did get as far as sending socket information back and forth, but thats about it.

Probably the quickest way would be two vehicles with different keyboard commands for control. The arrows could control one, and W-A-S-D controls the other one.
Logged
Spaz
Full Member
***
Posts: 109


View Profile
« Reply #2 on: April 01, 2009, 03:49:20 PM »

That's what I was thinking, too.  Can they both be made players, though?
Logged
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #3 on: April 01, 2009, 04:27:59 PM »

Keep in mind I could be wrong on some of this Smiley

Both could be players, I think player just means it can keep inventory. If this is just a one time setup, I would do the following:

(1) Keep your main vehicle and script as is
(2) Make a second vehicle.opr and reference it to a different vehicle script (one without a camera control and different input for steering).

Again, I may be totally off base. My usual way is thinking I have the perfect idea of how to do something, but sometimes it ends up completeley different when I finally get it figured out;D
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #4 on: April 27, 2009, 01:37:14 PM »

The cars don't need to be players, they're added to the one player's inventory.

This seems it might be kind of tough. A dual-control vehicle seems like more of a hassle than it's worth considering working multiplayer would give you what you need. You can always dual-box if you need to keep control yourself. Borrow a laptop if you don't have a 2nd computer, lol.

What you'll end up having to do is altering the existing script to take a another set of inputs. Copying the vehicle script and replacing the values won't work, as it will require you to pick up two cars. That's more hassles with the checks and balances to dictate which goes with what. At the very least, you don't want to get out of the first car when getting in to the 2nd.

You could make a special copy of the script that grants the player the double-car inventory item. This has the additional inputs added on top of the originals instead of replacing them. If you keep it offline, you can automatically assign it to the player.

Remember, if this is single player and one keyboard controls two cars, that's essentially one player with more input controls, not a 2nd player at all. Being a player means it can have inventory, not that it can be inventory.

If you take it online, that's multiplayer and even easier, because you don't have to do anything but make the 2nd car the same as the first and you just let Billy drive it.
Logged
Spaz
Full Member
***
Posts: 109


View Profile
« Reply #5 on: April 28, 2009, 11:16:56 AM »

Crikey!  That sounds complicated!  Sounds like the multi-player would be the easiest way to go, but I've never tried to make a multi-player game.  Have any of you ever messed with that?  How difficult is it?
Logged
Squat
Hero Member
*****
Posts: 592


View Profile
« Reply #6 on: April 28, 2009, 04:44:58 PM »

I haven't tried it yet. I'm eager to see how it's going to work out though.
Logged
VMachmedia
Newbie
*
Posts: 26


View Profile
« Reply #7 on: April 29, 2009, 06:42:23 PM »

We've been looking into having two cars operated by different keys on one keyboard for a split screen option of our Speed Drifter game (www.3dgameresources.com) and it's actually really easy to do.

1) Add a car to your world, name it "Player" and tick the make player box
2) Add a second car to your world and give it another name e.g. .. "Player2" and tick the make player box

The car named 'Player' will use the standard keys and mouse.
Then ... to use the 'I J K L' keys for Player2 car just add the following to the bottom of you projects input.cfg file

GlobalInputSet Player2

InputSet Player2 Character
Action Forward
Action Backward
Action Left
Action Right
KeyMapping KeyI Forward
KeyMapping KeyK Backward
KeyMapping KeyJ Left
KeyMapping KeyL Right

InputSet Player2 Vehicle
Action Forward
Action Backward
Action Left
Action Right
KeyMapping KeyI Forward
KeyMapping KeyK Backward
KeyMapping KeyJ Left
KeyMapping KeyL Right

The standard GC Vehicle script supports camera views so you can just add two viewports to your main screen and assign one to each car.

Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #8 on: April 30, 2009, 06:31:04 PM »

I can't help except there is a script for camera that always have 2 objects visible on screen. So if you have 2 cars driving around they will always be visible
Logged
Spaz
Full Member
***
Posts: 109


View Profile
« Reply #9 on: May 04, 2009, 10:33:26 AM »

Vibe2K - Thanks for the explanation! Smiley

Edit:  Worked like a charm, Vibe.  Thanks!
« Last Edit: May 05, 2009, 12:21:35 PM by Spaz » Logged
Pages: [1]
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!