Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (wandaluciaia, AndrewAMD, 1 invisible), 765 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: AUM77 bullit only from server/client [Re: GarniSoft] #252110
02/16/09 16:33
02/16/09 16:33
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
You must publish the demo because it is run by the batch (.bat) files for the client and for the server; if you only run the executable it won't work. Do you have any problems with my demo that comes with Aum77's resources?

Re: AUM77 bullit only from server/client [Re: George] #252287
02/17/09 14:55
02/17/09 14:55
Joined: Dec 2004
Posts: 87
Nederland Tilburg
GarniSoft Offline OP
Junior Member
GarniSoft  Offline OP
Junior Member

Joined: Dec 2004
Posts: 87
Nederland Tilburg
No, i have no problems with the pre-published version of Aum77 multiplayer project. Only when i publish your project in my own version of 3dgs/wed/sed.

Thank you for your help... i don't spent any time for such a simple thing anymore, i got it running in XNA, i got false hope to get it run in 3dgs.

Thanks.


I am a dreamer ... i dream they all come true ...

www is in bewerking
Re: AUM77 bullit only from server/client [Re: GarniSoft] #255213
03/08/09 20:33
03/08/09 20:33
Joined: May 2008
Posts: 10
UK
C
cjm Offline
Newbie
cjm  Offline
Newbie
C

Joined: May 2008
Posts: 10
UK
George there is a definate 'funny'.

Your published version runs all ok for me.

When I re-publish using A7.70 (only change is to camera_ambient = 120; in main else everything is black as night!) I get the same problem - all bullets fire from the server soldier.

Any furthur thoughts?

Last edited by cjm; 03/09/09 11:25.
Re: AUM77 bullit only from server/client [Re: cjm] #270922
06/10/09 15:08
06/10/09 15:08
Joined: Dec 2004
Posts: 87
Nederland Tilburg
GarniSoft Offline OP
Junior Member
GarniSoft  Offline OP
Junior Member

Joined: Dec 2004
Posts: 87
Nederland Tilburg
Is there an awnser for this problem?


I am a dreamer ... i dream they all come true ...

www is in bewerking
Re: AUM77 bullit only from server/client [Re: GarniSoft] #270932
06/10/09 16:22
06/10/09 16:22
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Quoting George.
Quote:
The code has to be published before being run.

Maybe a full publish is necessary when using A7 and Lite-C, but it used to be possible to use a .bat file to compile and run a shared script with multi-player parameters for LAN testing / play.

Code:
sample only:
sv.bat
	ack_dir\acknex.exe project_dir\script.wdl -eq -nx 199 -diag -win -sv -cl
cl.bat
	ack_dir\acknex.exe project_dir\script.wdl -eq -nx 199 -diag -win -cl -ip ip_address


Re: AUM77 bullit only from server/client [Re: testDummy] #271150
06/11/09 14:41
06/11/09 14:41
Joined: Dec 2004
Posts: 87
Nederland Tilburg
GarniSoft Offline OP
Junior Member
GarniSoft  Offline OP
Junior Member

Joined: Dec 2004
Posts: 87
Nederland Tilburg
Okay thanks.

I try it.


I am a dreamer ... i dream they all come true ...

www is in bewerking
Re: AUM77 bullit only from server/client [Re: GarniSoft] #274791
06/28/09 15:02
06/28/09 15:02
Joined: May 2008
Posts: 10
UK
C
cjm Offline
Newbie
cjm  Offline
Newbie
C

Joined: May 2008
Posts: 10
UK
I have added some code to George's Multiplayer10's function main, the if (client_fired) code near the end.

This shows that the my pointer sent from the client and directed to you on the server is seen as the my of server,
so client's bullet fires from the server's gun?

George had this code working, so has a bug crept into later releases of Gamestudio?

Code:
function main() 
{
	fps_max = 60; // limit the number of data packets that are sent over the network each second to 60
	level_load ("multiplayer10.wmb");
	camera.ambient = 120;
	on_mouse_left = fire_bullets; // the player use the left mouse buttons to fire
	if (!connection) // no server could be found?
		sys_exit(NULL); // then shut down the engine
	if (connection == 2)  // this instance of the game runs as a client?
	{
		my = ent_create("redsoldier.mdl", vector (100, 50, 40), move_players); // then create the red soldier!		
		wait (-0.5); // wait until the handle is ready and valid for all the clients (this line is very important!)
		client_ent = handle(my); // now we can get a valid handle to the client entity (the player that runs on the client)
		send_var(client_ent); // and let's send the handle over the network to the server (no need to do that more than once)
		while (1) 
		{			
			my.skill1 = 5 * (key_w - key_s) * time_step;
			my.skill2 = 4 * (key_a - key_d) * time_step;
			send_skill(my.skill1, SEND_VEC); // send skill1...3 to the server (skill3 is used to store player's health
			send_var(client_fired); // send client_fired to the server; even client's bullets are created on the server
			simple_camera(); // call the simple camera function
			// new code
			players_health = my.health; // display the proper player health value on the client
			wait (1);
		}
	}
	if (connection == 3) // this instance of the game runs as a server and client at the same time? (connection = 3)
	{
		my = ent_create("bluesoldier.mdl", vector (-100, -50, 40), move_players); // create the blue soldier
		VECTOR bullet_pos[3];
		while (1) 
		{
			my.skill1 = 5 * (key_w - key_s) * time_step;
			my.skill2 = 4 * (key_a - key_d) * time_step;
			simple_camera(); // call the simple camera function
			// new code
			players_health = my.health; // display the proper player health value on the server
			
			if (server_fired) // the server has fired? Then we've got everything that we need here ("my" is the player on the server)
			{
				vec_set(bullet_pos.x, vector (30, -5, 15)); // create the bullet at an offset of x = 30, y = -5, z = 15
				vec_rotate(bullet_pos.x, my.pan); // in relation to the origin of the model
				vec_add(bullet_pos.x, my.x);
				bullet_pan = my.pan; // the bullet will have the same pan angle with player's pan
				if (my.health > 0) // the server player is still alive?
					ent_create("bullet.mdl", bullet_pos.x, move_bullets); // then create the server player bullets
			}
			if (client_fired) // the client has fired? Then we need to get access to the client player
			{
				beep(); // See if client mouse left button is seen! IT IS !!!!
				
				you = ptr_for_handle(client_ent); // let's restore its handle; the client player is now "you"
				
				// We are not 'seeing' you as the client soldier's data but as the server soldier's data!!!!!!!!
				// =============================================================================================
				
				vec_set(bullet_pos.x, vector (30, -5, 15)); // we set bullet_pos to the same offset
				vec_rotate(bullet_pos.x, you.pan); // in relation to the "you" model (client's player)
				vec_add(bullet_pos.x, you.x);
				bullet_pan = you.pan; // and we use client's player pan angle for the bullet
				if (you.health > 0) // the client player is still alive?
					ent_create("bullet.mdl", bullet_pos.x, move_bullets);	// then create client's bullets (on the server as well)

				vec_set(bullet_pos.x, vector (30, -5, 15)); // we set bullet_pos to the same offset
				if (you.health  > 0) // Test Code! This adds 15 to Server, NOT Client????????????
					you.health += you.health ;
			}
			wait (1);
		}
	}
}



Last edited by cjm; 06/28/09 15:06.
Re: AUM77 bullit only from server/client [Re: cjm] #304690
01/10/10 03:20
01/10/10 03:20
Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stuttga...
M
maglat Offline
Junior Member
maglat  Offline
Junior Member
M

Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stuttga...
Dear George,

I have the same problem with this multiplayer code from Aum 77 /78.

When i complie the code for myself, all the bullets are fired from the server model instead of the client model.
The published version from you works correct!
Can you pls find a solution how to fix this issues?
That would be very great!

Many thanks in advance.

I'm using A7 Com 7.82.3 for compiling.

Greetings

maglat!


http://visit-ben.net
Com A7.82
current "big" Project : Undead Defender Adventure
Re: AUM77 bullit only from server/client [Re: maglat] #304696
01/10/10 08:06
01/10/10 08:06
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
This was a bug in the AUM multiplayer code, the fix was posted here on the forum some time ago. I dont remember what it was, but do a search.

Re: AUM77 bullit only from server/client [Re: Spirit] #304772
01/10/10 19:36
01/10/10 19:36
Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stuttga...
M
maglat Offline
Junior Member
maglat  Offline
Junior Member
M

Joined: Feb 2006
Posts: 77
Schwäbisch Gmünd (nähe Stuttga...
George answer me to my question!
The solution is simple!

Quote:
The solution is simple: replace "wait (-0.5);" with "wait (-5);"



http://visit-ben.net
Com A7.82
current "big" Project : Undead Defender Adventure
Page 2 of 3 1 2 3

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