Jump to content

  • Log In with Google      Sign In   
  • Create Account


Miraz

Member Since 04 Nov 2010
Offline Last Active Jun 09 2013 11:09 AM
-----

Topics I've Started

Network Npc help needed.

26 May 2013 - 01:25 PM

Im programming ARPG game similiar like Diablo 2 and i cant understand how are npc controlled over network.

 

I know how to move and give commands to NPC players but how server "knows" where are obstacles etc. I have some idea in my head, i try to write it here , i was thinking this :

When player comes view of monster, player send's packet to server and server gives order to npc unit to act, am i right?


.Net server and chat channels

26 March 2013 - 09:46 AM

Im working on ARPG genre game with unity and i have been developing server by using vb.net 2010. Im running login , lobby and game sockets on ports 7111-7113 and each socket has own thread. example : When client connects login thread launch new thread and binds this new client data flow trought that.

here is picture to show logic behind my work :

Attached File  TCPServer.jpg   22.07KB   24 downloads
But now to the my question. How i create channels? I want 16 player limited channels to chat and 8 players to ingame channel.

Think about this: my client send data , packet structure is [ID,DATA] = [0x01 ,"Hello/Channel1"]. Server must check from array or collection where to send this data. We know that i want send it to clients in Channel1. I have thinking about creating multidimensional array OR collection, collection would be nice because i can acces those client's easily.

AND second question.

How i can store channels to collection? I know how to use collection, so im not asking help for that. But im thinking of multidimensional collection , which inculdes variables Object and String. Object stays one of connected client and string has channel name. 

could it work ? tell me ! icon_biggrin.gif


I need some example code. Please help me!
 


PARTNERS