Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sections for various scenarios in mulplayer. Can Help-me? #402624
06/07/12 20:00
06/07/12 20:00
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
I have many doubts about the "mulplayers" using sections.
I do not know where or when I use "session_open", and the "session_connect."
Do not know if any of them call on the server, or all of the client.
I've tried several different ways, but am not having success.

> In a "dataBase" I signed a few names that are references to scenarios which players can connect.
> Each of these names is amount to a "WMB"
> When a player enters, he can choose one of these scenarios in a list, and when selected this scenario "WMB" is loaded into it.
If another player to choose this same scenario, both will be connectados in the same scenario, and will be able to interact with each other.

My problem is just load these scenarios.
I saw in the documentation that using A8 Litec "seession_connect" and "session_open", I could connect the players in different scenarios, but there is no better example for full understanding.

All the ways I tried here were frustrated and so I come to ask help from the community.

Can Help-me?
I'll post my last attempt, so you can evaluate where I am wrong, and so can help me better!


Code:
function main(){

	if (!connection)
	{

		str_cpy(messages_str, "Can't find any server. Please try again later.");
		wait (-4);
		sys_exit(NULL);

	}  	
	if (connection == 1) //Server
	{
		
		if (session_open("city_demo"))
		{			
			level_load("ignia.wmb"); // load level anew
			while (dplay_status < 8) wait(1);
			dplay_localfunction = 2;
		
		}

	} 
	if (connection == 2) //Client Connection
	{

		
		if (session_connect("city_demo","localhost"))
		{
			dplay_localfunction = 2;
			level_load("ignia.wmb"); // load level anew		
			while (dplay_status < 4) wait(1); // wait until the level state is received from the server
			
    		player = ent_create("warlock.mdl",vector(0,0,100),moveplayer);	
		wait(1);//wait util a function
	
		while(!player){wait(1);}
	        ent_createlocal("target_ring.mdl",_vec(player.x,player.y,player.z),func_seletor);	

		camera.arc=90;
		camera.x = player.x-50;
		camera.y = player.y-50;
		camera.z = player.z + 120;
	        camera.tilt = -27;
		
		
		
		}

	} 
}


In this example , he Connect the world and create my player, but does not perform the function of the player.
But my doubts persist as to whether this really is the correct way, I come to ask for your help.

Last edited by NeoNeper; 06/11/12 19:07.

Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: NeoNeper] #402625
06/07/12 20:05
06/07/12 20:05
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
first question:
session_open / session_connect is the runtime version of -sv and -cl parameters
session_open creates a server,
session_connect connects to a server


Visit my site: www.masterq32.de
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: MasterQ32] #402626
06/07/12 20:10
06/07/12 20:10
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Yes I am using the parameters (-sv-ip localhost) to the server and (-cl-ip localhost) to the client.
I edited the post I put a Previous and example of my last test performed, so you can get a better idea and can help me


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: NeoNeper] #402716
06/09/12 16:30
06/09/12 16:30
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Nothing? Somebody?


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: NeoNeper] #402843
06/10/12 20:48
06/10/12 20:48
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Hello friends. I still eat this doubt.
> I am also another problem

When I'm running mode (-sv) I can not perform the function attached to the entities..

EX:
I running server in (-sv) mode.
Affter i Running the Client in mode (-cl)
However, the functions of the entities are not running.
Sample:
my = ent_create ("warlock.mdl", vector (100, 50, 40), move_players);

The Function move_players no work.

IF i Running in mode (-cl -sv) ALL functions Begin to running

Can anyone help me?


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: NeoNeper] #402844
06/10/12 20:51
06/10/12 20:51
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Get into the workshops http://tutorial.3dgamestudio.net/ and do 25. When done do it again. Multiplayer is hard. Even when it is made as easy as 3dgs does it. Next stop using -cl and -sv. These are crutches and not something you can use for the final game, so no need to start with them either. Put up a panel with two buttons, one says server and other says client and have those functions start the game as described. Again, Multiplayer is hard and will take a lot of studying. It can be done though, I've done it and so can you.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: Sections for various scenarios in mulplayer. Can Help-me? [Re: FoxHound] #402901
06/11/12 18:46
06/11/12 18:46
Joined: Nov 2007
Posts: 318
Brasil, Paraná
NeoNeper Offline OP
Senior Member
NeoNeper  Offline OP
Senior Member

Joined: Nov 2007
Posts: 318
Brasil, Paraná
Thanks for responding.
But I already have a project ready, based on Client Server, where my server is also a client and other clients interact.
I'm not any doubt in this style of play.
My question refers to games where I only own a SERVER (-sv) and Not a (Server Client) (-sv -cl).

I have not found any AUM and also found nothing about this in the official manual.
I no found no example about it.

All the examples I find to by on servers that are also customers (-sv -cl)
I am wanting to Develop a project in Which I own the server that is not a CUSTOMER.

As I said earlier, when I try, the functions of the bodies have not been executed. I do not know what to do to fix it.

Note that the code I posted in the first POST has no connection type (3);
Only (1) = Server and (2 ) = Client. END. No Have a connection (3) = Client / Server.
In this example, the function of the entity (move players) No work.
And ALL Functions for Entityes also no Works.

You can try to help me please:??


Please! Use easy words to be translated. because my English is not very good! Grateful.
_______________________________________________________

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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