Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problems sending a BMAP #395594
02/25/12 10:50
02/25/12 10:50
Joined: Nov 2004
Posts: 85
Deutschland, NRW, Eschweiler
A
annonymie Offline OP
Junior Member
annonymie  Offline OP
Junior Member
A

Joined: Nov 2004
Posts: 85
Deutschland, NRW, Eschweiler
Hello,

i try to send a PANEL.bmap to a client when he joined the game. Unfortunaly it don't work with send_var_id, send_data_id. Also when I try to send pixel for pixel... Error or no change on client... I don't know, what's wrong, sending normal vars works very well.

Please help smile


A8.30.5 Commercial
Re: Problems sending a BMAP [Re: annonymie] #395596
02/25/12 12:03
02/25/12 12:03
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
.bmap of a panel is a pointer. Pointers aren't globally valid. This means that the pointer will point on something different on a different pc. Thus sending a pointer won't work. What you could do is that you create your own unique identification:

Code:
BAMP* bmap1 = "testimg.bmp";
BAMP* bmap2 = "testimt2.bmp";

//send a variable with value 1 or 2. On the client check which number was sent and use either bmap1 or bmap2



Sending the bmap pixle by pixel works for sure:

Code:
COLOR image[128]; //store a 64x64 image 

int i=0;
for(;i < 128; i++)
{
//copy the color of every pixel into the array
}

//send the content of the whole array to the client



On the client create an empty 64x64 bmap and fill it with the colors you received by the array.

Please note that the code I posted is only shematic, because I was too lazy to look for the according functions ^^


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1