Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 16,302 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Multiplayer Camera (wow type) #97840
11/07/06 21:04
11/07/06 21:04
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
Hello ,

With a friend , we have started doing an internet multiplayer game . We are slowly but surely advancing , but are finding hard to understand really how multiplayer works on 3dgs. The actual features we have are :

-walk , -jump , -run .
-A discussion channel
-put objects on the ground
-pick up object
-a small inventory
-display of alle connected players.
-Display of the name of the player on top of his head
-connection and disconnection msg
-a door that opens and shuts on a click when we are close to it

all this works pretty well on internet, we are pretty proud considering we started more or less from scrap(helped of course with Locoweeds tutorial(thanks to him ).
We want a wow like camera. the actual camera code weve made work perfectly on lan , but on internet , delays a bit to much and "slides" too quick to the left or the right.
We where wondering if someone could help/explain how to make the right click to change the player.pan witout too much lag.

We really want to finish the movement and camera problems before carry on our game.

I hope you understand what i've written.
Thanks

ps: Single player games are so much easier to create lol !!!!!! am i the only to think that?

Last edited by oriongu; 11/07/06 21:09.
Re: Multiplayer Camera (wow type) [Re: oriongu] #97841
11/08/06 20:16
11/08/06 20:16
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
If your camera behaves different on Lan, singleplayer and internet,
you made an error in the first place.

It should be exactly the same camera as in a singleplayergame.

If you happen to use an entity for collisiondetection of the camera,
use ent_creatlocal to create a local entity on the client.
DO NOT! move the clients camera on the server.
No game does it this way, it makes no sense.


There is no special way to create a camera for multiplayer!
The camera is just relevant for the one client, not for the
other clients/the server. So it needs to be purely a clientbased calculation.


Or do you happen not to referr to the camera, but the actor, that the camera is
centering on?
The movement of the actor is not a camera issue.
If the camera lags, because the actor lags, you need to rework the way the actor moves.
(smoothing it with a dummy-actor for example)


Post your cameracode, if you need advice.

Re: Multiplayer Camera (wow type) [Re: Damocles] #97842
11/08/06 21:39
11/08/06 21:39
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
First , thanks for your quick reply

I dont quite understand all what yuve said , im french , and my english is a little rusty. I dont think i've explained properly:

I actually use the right click to to change the player.pan , so i need to send my player.pan value .

whever im in single or server client or client , its works exactly the same apart that on internet it lags. Because the camera.pan is dependant on the player.pan

I understand very well that the camera workd on client only. But when i right click its rotate the player.pan and the camera so that the camera always behind the player.
The funny thing is that doing the same by keybord works fine , but at soon as i use the rigth mouse click rotate the player , i keep having lags.

There must be something i havent understood yet.

What do you mean by smoothing it with a dummy actor?

Anyway , i've done alot of changes on the main script yesterday , and its works better, but i cant see how to optimize the right click.

Ill post the camera&movement code as soon as i get back home.

Orion,

Last edited by oriongu; 11/08/06 21:47.
Re: Multiplayer Camera (wow type) [Re: oriongu] #97843
11/08/06 21:49
11/08/06 21:49
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
Ok, dopnt make the camera get linked to the player pan!

Use something like:

var camera_directionpan;

//this is the function that "rotates the player"
function actor_camera_rotation
{

camera_directionpan = ....

}

//her you actually rotate the player
action player
{
while(1)
{
...
player.pan=camera_directionpan;
...
wait(1);
}
}


Whenever you move the camera (actor)
first, update the camera_directionpan

not the player.pan

the player later has to adapt his pan to the
camera_directionpan

this way, the camera is moveing freely,
and the player still adapt to this pan.

Re: Multiplayer Camera (wow type) [Re: Damocles] #97844
11/08/06 22:04
11/08/06 22:04
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
At first look , this is what i do do, but its the end of the day and im tired so i could be mistaking ...Ill try this as soon as i can. ill post a screen also

Thanks alot Damoclés.

Re: Multiplayer Camera (wow type) [Re: oriongu] #97845
11/10/06 18:56
11/10/06 18:56
Joined: Jan 2006
Posts: 29
O
oriongu Offline OP
Newbie
oriongu  Offline OP
Newbie
O

Joined: Jan 2006
Posts: 29
Hi again ,

We are so pleased, its works so much better now. We now have a wow type camera/movement .

We havent done any graphikal design so the screens arent very nice.
http://dayd.graphiks.net/forum-lecture-1593.html#1601 (french site )

Thanks alot Damoclés,


Moderated by  HeelX, Spirit 

Gamestudio download | 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