Multiplayer question

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Evil Game Manic
Posts: 12
Joined: Sun Apr 23, 2006 11:05 pm

Multiplayer question

Post by Evil Game Manic »

In multiplaying games the opponent's camera(in first person only) is represented by the mesh they are playing as, so how could this be done in Irrlicht. I have some ideas on maybe how it can be done but would surely enjoy some back-up. :D

P.S. I'm refering to first person in this question :)
I'm not Game Manic
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

in a multiplayer network game experience is subjective - each player is only seeing a guess of what's happening on the server, and they're only seeing it from one person's point of view. so, the current player is an fps cam, everyone else is an animated mesh.
erm hang on... are you talking about split screen here? if so, you just need to hide the current player's mesh and show everyone elses when you draw each viewport.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Evil Game Manic
Posts: 12
Joined: Sun Apr 23, 2006 11:05 pm

Post by Evil Game Manic »

are you talking about split screen here? if so, you just need to hide the current player's mesh and show everyone elses when you draw each viewport.
So is there a way to manipulate what is seen in each viewport, so that a camera(fps to be exact) in one viewport to be a mesh in another viewport? :?
I'm not Game Manic
AzP
Posts: 16
Joined: Fri Jun 09, 2006 8:47 pm
Location: Stockholm, Sweden

Post by AzP »

you don't see cameras, and you can't render cameras. The only thing that's being rendered is the players meshes (like the previous post said).

I'm seeing the other players meshes, and they are being renderer at their position (which is probably defined as a Vec3df), with correct rotation.

Your own mesh should probably not be rendered, since it would occlude the view. So you just "feel" like you have a body, but you really don't. You're character is just a "floating camera", but other players see you as a mesh, since your position and rotation is saved -> hence their client renders a mesh there.
Just like your client did with their position and rotation...

Does this make anything clearer? Maybe I just made it harder...
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I think I know what he's asking for... ;)

Well, one methode could be that the client (player) sends his cameras position and rotation (maybe also frame number) to all other clients (or better server that broadcasts this datas) and this other clients uses this datas do display a mesh, representing the player who sended this datas...

Am I right !?!?! 8)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply