Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, RealSerious3D, BrainSailor), 1,265 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Checking for "No Server Found" #187305
03/06/08 14:58
03/06/08 14:58
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline OP
Senior Member
Zelek  Offline OP
Senior Member

Joined: Feb 2002
Posts: 357
Florida
I have a small program (separate from my main app) that allows the user to start a single player session, host a game, or join via lan/ip. I would like to handle the case where someone tries to join a game and no server is found. According to the manual, when no server is found, the "the engine automatically starts in non-multiplayer mode".

Is there anyway I can differentiate between someone starting a single player session and someone trying to join a server and failing, in that case?

Re: Checking for "No Server Found" [Re: Zelek] #187306
03/06/08 23:31
03/06/08 23:31
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
For Com or Pro Edition?

Re: Checking for "No Server Found" [Re: Damocles] #187307
03/07/08 00:44
03/07/08 00:44
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline OP
Senior Member
Zelek  Offline OP
Senior Member

Joined: Feb 2002
Posts: 357
Florida
Commercial.

Re: Checking for "No Server Found" [Re: Zelek] #187308
03/07/08 20:31
03/07/08 20:31
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
the connection variable contrains a 0, for not connection, and a 2 when you connected as client.

Now, in com, the engine starts up as client, and tries to connect, if it fails
the engine start as usual as singleplayer.
You can not run script before the client tries to connect, and as far as I know, no variable stores
a "missed" connection attemt.

but if you can run the game as singleplayer also, I dont really know why you want
to handle it different to a normal singleplayer start?

In case you want to post a message "no server found" within the engine, you could
use a trick.

You create a starter program for 3dgs. This starter program (can be written in
3dgs also) can start a client, together with the commands -ip xxx and -cl, or start as normal singleplayer
This instance also then saves data to a textfile, stating that is just tried to
start as client.

if the 3dgs instance starts, and has a connection of 0, it checks the textfile.

From its information it can determine your previous attempt.

then you erase, or overwrite this textfile.

----

Its one of the possible workarounds....

Re: Checking for "No Server Found" [Re: Damocles] #187309
03/08/08 03:57
03/08/08 03:57
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline OP
Senior Member
Zelek  Offline OP
Senior Member

Joined: Feb 2002
Posts: 357
Florida
Thank you for this advice. It occurred to me that an even easier method would be to set a variable using "-d name" via the starter program. This should take care of the problem.

Re: Checking for "No Server Found" [Re: Zelek] #187310
03/08/08 11:13
03/08/08 11:13
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
can you read it out then?

If yes, it of course the preferable method.


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1