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.

DarkBASIC Professional Discussion / DarkBasic send a file

Author
Message
Southside Games
16
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 17th Sep 2013 02:12 Edited at: 17th Sep 2013 02:13
Hey,

Basically I want to send the map data to other players before the game starts. The data is stored like old sprite games were a number represents a tile type, not meshes. The maps can be as big as the player wants. (though the biggest I've done is about 23KB)

I looked but did not find a native command to send Files. Anyone know a good work around?

thanks
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 17th Sep 2013 02:21
You can load the file into a memory block, then send the memory block.

Southside Games
16
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 17th Sep 2013 02:30 Edited at: 17th Sep 2013 02:31
is a memory block and memblock the same thing?
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Sep 2013 03:36
Quote: "is a memory block and memblock the same thing?"

Yes.


"Why do programmers get Halloween and Christmas mixed up?"
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 17th Sep 2013 03:47
Lol yeah sorry for using the full term.

Southside Games
16
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 17th Sep 2013 22:35
for people that stumble on this What I did is I converted the file into an array, then sent it with...

MAKE MEMBLOCK FROM ARRAY 1,mymap()

send net message memblock 0,1,1

Login to post a reply

Server time is: 2026-07-07 10:13:33
Your offset time is: 2026-07-07 10:13:33