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.

Dark GDK / Dark GDK transfering 2D arrays over TCP with multisync?!

Author
Message
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 13th Nov 2010 22:36
Hello everyone!

I was just wondering how to send a 2D array for my game world (Tile map) over multi-sync using Dark GDK?

I have read up about Dark GDK memblocks but haven't managed to get a working example going, to show I have tried a shot at it here is my attempt. I try and load the memblock into a bitmap and read data off of that;

client side:

Server side:


I would be so appreciative if I got a reply, Thanks!

Happy-programming!
from Helpfullprogrammer.
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 1st Dec 2010 21:15
Any ideas?... come one someone must know?!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 2nd Dec 2010 14:28
Wow about 2 weeks before you bumped it. I'm impressed! I wish I knew more about Myltisync, but I have had some experience with network programming. The most I can tell you is that you should send messages something like this psudo code:
-packet type (so the client can interpret the data to follow)
-packet size (if the type has a variable size to it)
-packet data

The client will read each packet received and sort according to type.

I wish people frequented this forum more.

The fastest code is the code never written.
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 2nd Dec 2010 15:00
Haha! I am impressed with my-self I am working on a 2D multi-player sandbox and am one month into development, I have about 10 message types and I use the format shown above

I have broken it down into chunks and send bursts of 40x40 to not bog down the server as much And my networking is proving al-right as I have three windows open (2 clients and a server) all running at 57 FPS +

Thanks for the comment!
From Helpfullprogrammer,

P.S Check my tutorials at www.youtube.com/helpfullprogrammer

Login to post a reply

Server time is: 2024-11-19 16:27:17
Your offset time is: 2024-11-19 16:27:17