Game Development Community

Setting up a server + connecting.

by Braveheart · in Torque Game Engine · 12/09/2007 (2:06 pm) · 8 replies

I need some help with setting up a server, first is the "Starter.FPS Dedicated" what I want to use? How can I compile my own server from my game's directory?


When using the starter.FPS Dedicated I start up a server it's trying to load the wrong mission... I have edited the actual .exe to have the correct mission path and file name but it still tries to load the wrong mission, why? When trying to connect myself and others just get "Connecting to the server" obviously something isn't working as it would work when I loaded the starter.FPS's mission stronghold but of course I don't want that one!

Okay, I want to set up the connecting as follows:

img87.imageshack.us/img87/8108/pic1sh3.jpg

...to connect to this IP+port: 82.41.115.69:2800

Now I tried the button with the following command "connect("82.41.115.69:2800");" that didn't do anything... What am I doing wrong? What is the correct way to do this?

And lastly, bit of an off topic question, anyway I have image buttons now how could I make those images change to another image when rolled over? Similar to how the test on the default buttons when rolled over the slightly changes.

#1
12/10/2007 (7:26 am)
Did you make sure to set your -game to the right mod folder and setup your -mission statement correctly?

Here's the example for the starter.fps mission:
Quote:torqueDemo.exe -game starter.fps -dedicated -mission starter.fps/data/missions/stronghold.mis
#2
12/10/2007 (7:34 am)
Try 28000, that's the default bound port for a server!
#3
12/10/2007 (8:43 am)
@David: Yes I did! I've just discovered the problem:

torqueDemo.exe -game Z Day -dedicated -mission Z Day/data/missions/City.mis

The space in Z Day!! How can I change that? I tried editing all the main.cs, the folder name etc but got a lot of errors in the server console, help!


@Dave: Thanks! That did it, simple typing error :S. But now, how can I make the GUI redirect to another screen while sending the connect challenge? Also why does it say "Your connection has timed out" when I click the connect button?


Thanks a lot! I hope I can get to the bottom of this all.
#4
12/10/2007 (9:02 am)
I believe you should be able to wrap anything with a space in it in quotes.

For example:
torqueDemo.exe -game "Z Day" -dedicated -mission "Z Day/data/missions/City.mis"

should work I think...

edit: Disregard the above if changing the port was all you needed to do.

As far as changing the gui screen you should be able to use:
Canvas.popdialog(dialogcurrentlyopen);
Canvas.pushdialog(newdialog);
#5
12/10/2007 (12:32 pm)
Matt, the port thing was only the connecting problem I tried the quotes but it still tries to load a mission called "Z" and I believe it's because of the spaces... I tried editing all the main.cs, the folder name etc as I said but got a lot of errors in the server console, help!

Thanks for the GUI help, I'll give it a go. Do you happen to know how to make a button image switch to another image when the mouse rolls over?

Thanks!
#6
12/10/2007 (12:51 pm)
RobbieM: You can use the GuiBitmapButtonCtrl which allows for 4 button states. You need to name the files ending with _n for "normal" (what a normal active button looks like), _h for "highlighted" (what happens when the mouse is over it), _d for "down" (when the button is pressed down) and _i for "inactive" (when the button is inactive).

So you could have 4 files named:
mybutton_n.png
mybutton_h.png
mybutton_d.png
mybutton_i.png

When you specify the "bitmap" property of the button, you leave off the suffix. So, using the example above, you would enter the path and simply "mybutton" (leave off the file extension). Torque will then be able to switch between the highlighted, down, normal and inactive states automatically.
#7
12/10/2007 (1:26 pm)
By the way, if Z Day is the name of your mod folder (where you have the client, data and server folders), you can replace that with ~. ~ in a file path makes torque look in the root directory of the game mod. So if your game structure looks something like:

C:\YourGame\Z Day\data\missions

You can use "~/data/missions" in torquescript to access that directory / file.
#8
12/10/2007 (3:01 pm)
Matt thanks again!

But:

I don't know what you mean by the GuiBitmapButtonCtrl , the only one I can use is GuiBitmapBorderProfile, is that right? The buttons don't seem to work though I just get an empty space where the button is suppose to be... Nothing happens when rolled over etc, what's going on?

Also the ~ thing didn't work either :(... It just keeps saying it "Cannot load the mission"...