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.

Newcomers DBPro Corner / Memblocks - Adice Needed

Author
Message
Arutha
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 18th Mar 2004 18:02
Hi i'm trying to set up a memblock to transfer my players posistions over a network, I anit done memblocks before and have never seen one laid out can anyone offer some examples and advice?
KC27
20
Years of Service
User Offline
Joined: 18th Mar 2004
Location:
Posted: 18th Mar 2004 22:59
I cannot offer examples nor advice other than this:

Ask Waffle, I srached multiplayer threads and his name has popped up multiple times as a good source for multiplayer knowledge.

Cheers

Subdivision of LSGaming
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 20th Mar 2004 16:53
firstly you must make a memblock:
this will make a memblock that can have 4 numbers in it. 5 including 0
Make memblock 1,4

then you will have to write information into it. memblock number,position in memblock out of 4,objectxposition

write memblock byte 1,1,object x position
write memblock byte 1,2,object y position
write memblock byte 1,3,object z position
write memblock byte 1,4,angleo bject facing

then useing some network code sent it to the other computer....
then to place the read memblock code. memblock number, position in the memblock

object x position = memblock byte 1,1
object y position = memblock byte 1,2
object z position = memblock byte 1,3
angle object facing = memblock byte 1,4

I wonder where that fish did go, a fish, a fish, a fish, O
Arutha
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 22nd Mar 2004 22:23 Edited at: 22nd Mar 2004 22:24
Hey Neil, i've tired what you said and ended up with this



But it still anit working, i've attached my entire game code if you or anyone else can be of anymore help it'll help alot
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 23rd Mar 2004 03:47
Try:

Make memblock 1,2

write memblock byte 1,1,bomberman_positions(this_player,1)
write memblock byte 1,2,bomberman_positions(this_player,2)

SEND NET MESSAGE MEMBLOCK 1,1
SEND NET MESSAGE MEMBLOCK 3,1
SEND NET MESSAGE MEMBLOCK 4,1
DELETE MEMBLOCK 1

I wonder where that fish did go, a fish, a fish, a fish, O
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 23rd Mar 2004 03:49
and to read the memblocks

Newx=memblock byte 1,1
newy=memblock byte 1,2

I wonder where that fish did go, a fish, a fish, a fish, O
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 24th Mar 2004 07:07
Just wondering if it worked?

I wonder where that fish did go, a fish, a fish, a fish, O
Arutha
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 25th Mar 2004 02:34
Well typed it in, hit compile and got this msg

#100001: Could not determine parameter type of 'memblock byte 1'

That was for reading the memblock code

Newx=memblock byte 1,1
newy=memblock byte 1,2

any ideas why this is comming up?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 25th Mar 2004 02:48
All commands that return values need brackets, so

Newx=memblock byte 1,1
newy=memblock byte 1,2

becomes

Newx=memblock byte(1,1)
newy=memblock byte(1,2)
Arutha
20
Years of Service
User Offline
Joined: 13th Jan 2004
Location:
Posted: 25th Mar 2004 02:53
Thanks winch, I anit gotta say Read Memblock or anything then I just put what you have put down and the other players computers should recieve the data and posistion the characters accordenly then?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 26th Mar 2004 01:37
No, read memblock reads a memblock from an open file.

Some example code

Login to post a reply

Server time is: 2024-11-26 09:38:53
Your offset time is: 2024-11-26 09:38:53