Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Tiasen
23
Years of Service
User Offline
Joined: 26th May 2003
Location:
Posted: 28th May 2003 02:21 Edited at: 28th May 2003 02:26
hi sorry but I'm really upset!
I have been trying to make a multiplayer 3d simple game
and I have tried diffrent ways to sen and recive the data
and aperently memblocks are the bes't way to send and recive the
data or? no? then what is?
befor the main loop starts I make a memblock

MAKE MEMBLOCK 1,12

then I put this into the main loop... yes no? or?

rem // set x# //
WRITE MEMBLOCK FLOAT 1,0,object position x(1)
rem // set y# //
WRITE MEMBLOCK FLOAT 1,4,object position y(1)
rem // set z# //
WRITE MEMBLOCK FLOAT 1,8,object position x(1)
rem // send message //
SEND NET MESSAGE MEMBLOCK 0,1


but then between this part of the code that's also positioned in the main loop

rem Draw Others
get net message
while net message exists()=1

and this

get net message
endwhile


should be something for geting the current memblock data
and seperating it so the otherx#=the x pos that was sent in the memblock
and the othery#=the y pos and the otherz# = the z positon that was sen't with the memblock ok?...

How the **** do I sperate the data drom the memblock and
assign the sepperated memblock values to the variables otherx#,othery#,otherz#??

and then finaly I guess I'm supose to position the other player object at the variables

position object 62,otherx#,othery#,Otherz#
please, I will stop asking this lame ass questions if someone just could help me with this.....

Thank's /Mathias

Dr OcCuLt
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: a Dark Deep Dark pit, it dark in here
Posted: 28th May 2003 04:15
1)carm down

2) you send in you last post that you fix`t it.

3) this froum take time. do`t think no one takeing to you if you do`t get any replay after 3 hours.

try puting a tag in to the MEMBLOCK that tells the program white player the message is moveing.

rem // put this in the setup block //
MAKE MEMBLOCK 1,13

rem // main loop //
rem // set x# //
WRITE MEMBLOCK BYTE 1,0,i
rem // set x# //
WRITE MEMBLOCK FLOAT 1,1,object position x(i)
rem // set y# //
WRITE MEMBLOCK FLOAT 1,5,object position y(i)
rem // set z# //
WRITE MEMBLOCK FLOAT 1,9,object position x(i)
rem // send message //
SEND NET MESSAGE MEMBLOCK 0,1

look have you got this game working white out the multiplayer stuf.

--Dr 0--


You mean like a book?
Justin Timberlake N Sync.
On what he read this year that he most liked.
Tiasen
23
Years of Service
User Offline
Joined: 26th May 2003
Location:
Posted: 28th May 2003 04:57
yeah i'v got it working without the multiplayer stuff
or well not the right multiplayer stuff

the code you just wrote just tells the program what player is moving where... or? I already know how to send my positions what I don't know is how to position an object at the other players xyz

I'm guessing it must be something like this:

get net message
while net message exists()=1

net message MEMBLOCK 2
OtherNumber=net message player from()
Otherz#=memblock FLOAT(2, 8)
othery#=memblock float(2,4)
Otherx#=memblock FLOAT(2, 0)
position object 62,otherx#,othery#,OtherZ#

get net message
endwhile


do you understand?.. or is it just me who don't understand... and is
totaly making wrong asumptions?....

and thank's for even bothering to answer by the way

Tiasen
23
Years of Service
User Offline
Joined: 26th May 2003
Location:
Posted: 28th May 2003 05:08 Edited at: 28th May 2003 05:14
this is the MAtrix with object's 1 and 2 and you control player 1
and what you see here is computer 1's screen
----------------------------------
|1-------------------------------| so when computer one moves
|--------------------------------| character one then computer 2's
|--------------------------------| character 2 should be positoned
|--------------------------------| at computer 1's character 1's
|--------------------------------| XYZ but how can I get character 2
|--------------------------------| to be positioned at the oponets
|--------------------------------| character 1 position??
|--------------------------------|
|---------------------2----------|
|--------------------------------|
----------------------------------


this is the MAtrix with object's 1 and 2 and you control player 1
and what you see here is computer 2's screen
----------------------------------
|2-------------------------------|
|--------------------------------|
|--------------------------------|
|--------------------------------| opposit positions
|--------------------------------|
|--------------------------------|
|--------------------------------|
|--------------------------------|
|---------------------1----------|
|--------------------------------|
----------------------------------

hell what am I doing! I'm sure you alreddy figgured that out
haha the basis of multiplayer gameing duh... any way

how do I get my object two to be controlled by my oponent's object one positions?? ... blahhhh...!!

Bighead
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location:
Posted: 28th May 2003 07:35
Well, apparently what is happening here is that the code assumes that each player is object 1 on its respective computer -no matter what player you really are.

So, what you have to do is, for example:

1) Check who is hosting the game,
2) The host check for the connected players and retrieves their info in a list,
3) According to the unic ID of each connected player the host inputs each ID in an array, like player(1)=xx's ID, player(2)=yy's ID, ... ,
4) Then it communicates the values of the array to the other players so that everyone knows that xx's ID is player(1), yy's ID is player(2) and so on,
5) Each computer verifies its own identity and to whom belongs the data it is receiving, and then,
6) According to that, the code places the respective objects: object 1 for xx, object 2 for yy, etc.

I hope this helps.

Login to post a reply

Server time is: 2026-07-11 19:05:41
Your offset time is: 2026-07-11 19:05:41