Tutorial.base multiplayer
by Justin Woodman · in Torque Game Engine · 07/24/2005 (9:42 pm) · 15 replies
Ok, I have been trying to add a simple multiplayer to tutorial.base, and it is quite the headache.
heres my console.log:
heres my console.log:
//-------------------------- 7/25/2005 -- 00:30:55 -----
Processor Init:
AMD Athlon, ~2.05 Ghz
(timed at roughly 2.06 Ghz)
FPU detected
MMX detected
3DNow detected
SSE detected
Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing 3DNow extensions
Installing SSE extensions
Input Init:
keyboard0 input device created.
mouse0 input device created.
DirectInput enabled.
--------- Loading MODS ---------
Loading compiled script tutorial.base/main.cs.
Loading compiled script common/main.cs.
Missing file: common/defaults.cs!
Loading compiled script tutorial.base/client/defaults.cs.
Loading compiled script tutorial.base/server/defaults.cs.
Compiling tutorial.base/prefs.cs...
Loading compiled script tutorial.base/prefs.cs.
--------- Parsing Arguments ---------
--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.
--------- Initializing TTB: Server ---------
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Loading compiled script common/server/kickban.cs.
Loading compiled script common/server/game.cs.
Loading compiled script tutorial.base/server/game.cs.
Loading compiled script tutorial.base/server/centerPrint.cs.
--------- Initializing TTB: Client ---------
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
Loading compiled script common/editor/editor.cs.
Loading compiled script common/editor/particleEditor.cs.
Loading compiled script common/client/scriptDoc.cs.
Video Init:
Accelerated OpenGL display device detected.
Accelerated D3D device not detected.
Voodoo 2 display device not detected.
Activating the OpenGL display device...
Activating the OpenGL display device...
Setting screen mode to 800x600x32 (w)...
Creating a new window...
Acquiring a new device context...
Pixel format set:
32 color bits, 24 depth bits, 8 stencil bits
Creating a new rendering context...
Making the new rendering context current...
OpenGL driver information:
Vendor: NVIDIA Corporation
Renderer: GeForce 6800 GT/AGP/SSE/3DNOW!
Version: 2.0.0
OpenGL Init: Enabled Extensions
ARB_multitexture (Max Texture Units: 4)
EXT_compiled_vertex_array
NV_vertex_array_range
EXT_texture_env_combine
EXT_packed_pixels
EXT_fog_coord
ARB_texture_compression
EXT_texture_compression_s3tc
(ARB|EXT)_texture_env_add
EXT_texture_filter_anisotropic (Max anisotropy: 16.000000)
WGL_EXT_swap_control
OpenGL Init: Disabled Extensions
EXT_paletted_texture
3DFX_texture_compression_FXT1
#2
pretty much just created a Multiplayer server and did "%conn.connect("192.168.1.102");".
I also put setNetPort(0); in "function initClient()".
What else do I need to do to get this working?
Thank you very much,
Justin Woodman
07/24/2005 (10:02 pm)
Notice how it just stops at "Phase 1: Download Datablocks & Targets"? When it gets there it freezes and I have to CtrlAltDlt out of it. All I did to modify the code was change the original function loadTestMission() to:function loadTestMission()
{
// Create the server and load the mission
createServer("MultiPlayer",expandFilename("./data/missions/test1.mis"));
// Make a local connection
%conn = new GameConnection(ServerConnection);
RootGroup.add(ServerConnection);
%conn.setConnectArgs("Player");
%conn.setJoinPassword("None");
%conn.connect("192.168.1.102");
}pretty much just created a Multiplayer server and did "%conn.connect("192.168.1.102");".
I also put setNetPort(0); in "function initClient()".
What else do I need to do to get this working?
Thank you very much,
Justin Woodman
#3
07/24/2005 (10:14 pm)
Well, what that last function is doing, is hosting a server off your own computer, And then trying to join a server with the that ip...you need to make it pick, one or the other.
#4
07/24/2005 (10:20 pm)
So you can't host a server and join it at the same time? how does starter.fps let you host a multiplayer game that you can play in and other can join that server?
#5
Edit: so if you want everyone to just join one server, then call the start multplayer on the "master" server comp and the %conn.connect("192.168.1.102"); on the player comp
07/24/2005 (10:22 pm)
Well you can, but when you host a multplayer game, its just like starting a normal server but it lets people join. so your auto in the server, since its hosted off your computer.Edit: so if you want everyone to just join one server, then call the start multplayer on the "master" server comp and the %conn.connect("192.168.1.102"); on the player comp
#6
well thank you very much for your help, I truly appreciate it after looking for sooo long for an answer :)
07/24/2005 (10:32 pm)
Aah, I see, that explains quite a lot. The main problem now, is that I can't test it because I can't run two instances of torque on the same machine :(well thank you very much for your help, I truly appreciate it after looking for sooo long for an answer :)
#7
07/24/2005 (10:33 pm)
Well, to run 2 copys try the debug mode if you own torque, then just compile into debug mode rather then release mode, how you change that...it depends on your compiler :P
#8
05/10/2006 (1:52 pm)
Does anyone know of a tutorial for implementing Multiplayer in the tutorial base?
#9
Then I found this was missing:
Call that somewhere before you attempt to create/join servers (putting it at initClient() will do).
05/10/2006 (3:08 pm)
I had a similar problem. I was incrementally adding multiplayer GUIs and functions from starter.fps into tutorial.base, but after everything was apparently at place, our LAN tests wouldn't work no matter what. The server was simply not appearing on list, it wasn't even opening connections on the network at all.Then I found this was missing:
setNetPort(0);
Call that somewhere before you attempt to create/join servers (putting it at initClient() will do).
#10
05/24/2006 (1:07 am)
Im also a little lost in how to create a and host a server starting from tutorial.base (all in the same machine)... Any one knows the best way of doing this?
#11
I'm new to Torque and was trying to figure this out myself. Found this solution spread across a few threads, thought I'd gather them together in one place. Sorry if it's a duplicate of some other thread, but I sure couldn't find it.
First Off: I created two directories with source, one for my server and one for my client. That way all changes for server don't get included in the client and vice a versa.
Second: I compiled the source in both directories as debug
Third: Get the Master Server prototype
Fourth: In the server directory, I changed the address in the server\defaults.cs from $pref::Master0 = "2:master.garagegames.com:28002"; to $pref::Master0 = "2::28002";
Fifth: In the server directory I run Starter.FPS Dedicated.bat (Yes, I'm on a windoze box).
Sixth: In the client directory, I changed the address in client\prefs.cs from $pref::Master0 = "2:master.garagegames.com:28002"; to $pref::Master0 = "2::28002";
Seventh: I launched the client (started the torquedemo_DEBUG.exe file). It talked to my master server and then connected to my game server.
Hope this info will help someone else.
01/06/2008 (7:59 am)
Heh, over a year old on this post but I'll reply anyway. I'm new to Torque and was trying to figure this out myself. Found this solution spread across a few threads, thought I'd gather them together in one place. Sorry if it's a duplicate of some other thread, but I sure couldn't find it.
First Off: I created two directories with source, one for my server and one for my client. That way all changes for server don't get included in the client and vice a versa.
Second: I compiled the source in both directories as debug
Third: Get the Master Server prototype
Fourth: In the server directory, I changed the address in the server\defaults.cs from $pref::Master0 = "2:master.garagegames.com:28002"; to $pref::Master0 = "2:
Fifth: In the server directory I run Starter.FPS Dedicated.bat (Yes, I'm on a windoze box).
Sixth: In the client directory, I changed the address in client\prefs.cs from $pref::Master0 = "2:master.garagegames.com:28002"; to $pref::Master0 = "2:
Seventh: I launched the client (started the torquedemo_DEBUG.exe file). It talked to my master server and then connected to my game server.
Hope this info will help someone else.
#12
01/06/2008 (9:48 am)
Very nice explanation, George! I'm sure it will help people making the leap between tutorial.base and starter.fps. It doesn't seem like it would be that big of a leap, but it is!
#13
[edit] if i'm wrong someone please tell me. I want to make sure I have my own facts straight.
01/06/2008 (10:50 am)
And just because nobody else said it, you cant give another person the IP address 192.168.1.102 because thats your routers IP, they (the world) cant see that, you would have to get your real IP from your router's main config program page. If your using D-link like me (my IP is 192.168.0.101 on my computer not my router) then just type in 192.168.0.1 -> then click on status tab and look down under the "WAN" area to see the real IP... please note that thats not for people on a LAN.[edit] if i'm wrong someone please tell me. I want to make sure I have my own facts straight.
#14
01/27/2008 (6:04 pm)
You could also type in your default gateway address in your web browser, which will open-up the router configuration(after you enter your UserName and PWord of course).... just a thought... :)
#15
second with fps there is a connect function that allows an input of ip address and then it no longer needs the master server
my Question:
Has anyone had an issue withe engine checking versions when you connect to someone else and that list being so long it time out?
08/18/2008 (8:43 am)
So A couple of things one there is a dedicated server implemented in fps that is how you host and join the same game,second with fps there is a connect function that allows an input of ip address and then it no longer needs the master server
my Question:
Has anyone had an issue withe engine checking versions when you connect to someone else and that list being so long it time out?
Torque Owner Justin Woodman