Calinou wrote:Create a dedicated server, or a "listen" server from your client (by putting no address in the "Advanced" tab), then connect the second client with the address "localhost" (or 127.0.0.1), it should always work.
aldobr wrote:Mind sharing the packet formats with us ?
// Send TOSERVER_INIT
// [0] u16 TOSERVER_INIT
// [2] u8 SER_FMT_VER_HIGHEST
// [3] u8[20] player_name
// [23] u8[28] password (new in some version)
// [51] u16 minimum supported network protocol version (added sometime)
// [53] u16 maximum supported network protocol version (added later than the previous one)
SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2+2);
writeU16(&data[0], TOSERVER_INIT);
writeU8(&data[2], SER_FMT_VER_HIGHEST);
memset((char*)&data[3], 0, PLAYERNAME_SIZE);
snprintf((char*)&data[3], PLAYERNAME_SIZE, "%s", myplayer->getName());
/*infostream<<"Client: sending initial password hash: ""<<m_password<<"""
<<std::endl;*/
memset((char*)&data[23], 0, PASSWORD_SIZE);
snprintf((char*)&data[23], PASSWORD_SIZE, "%s", m_password.c_str());
writeU16(&data[51], CLIENT_PROTOCOL_VERSION_MIN);
writeU16(&data[53], CLIENT_PROTOCOL_VERSION_MAX);
// Send as unreliable
Send(0, data, false);
#define SEQNUM_INITIAL 65500
Are you saying that I put an abnormal brain into a seven and a half foot long, fifty-four inch wide GORILLA?
Ragnar wrote:if i understand correctly (that the npcs will move, maybe follow a player, hit him/her if he gets hit, maybe even builds something) than i cant wait til this gets released
kaeza wrote:+1 Cool!
I like the idea of a bot as NPC. Can you provide a link to the code? If pleople see your code, they may be better able to help you.
OmniStudent wrote:Not sure I understand, but image recognition is cool in any case!
It would be very cool to have MOBs using image recognition to spot players!
kaeza wrote:OmniStudent wrote:Not sure I understand, but image recognition is cool in any case!
It would be very cool to have MOBs using image recognition to spot players!
That's overkill. Why scan an image to find a pattern when you have the player position/looking direction and surrounding nodes readily available from the communication with the server? It would require *way* less computation (processor time) to just check if the player is in the bot's field of vision.
kaeza wrote:OmniStudent wrote:Not sure I understand, but image recognition is cool in any case!
It would be very cool to have MOBs using image recognition to spot players!
That's overkill. Why scan an image to find a pattern when you have the player position/looking direction and surrounding nodes readily available from the communication with the server? It would require *way* less computation (processor time) to just check if the player is in the bot's field of vision.
rarkenin wrote:The thing is, I gave u[ on network communication before this progress occured.
Users browsing this forum: No registered users and 2 guests