hasore

Member
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

100 Neutral

About hasore

  • Rank
    Newbie
  1. Encapsulating a network message

    Certain? I don't know a 3 byte value type... ShortInt, Byte = 1 byte SmallInt, Word = 2 bytes Float, Integer = 4 bytes Double, Int64, Currency, Date = 8 bytes I think, the message length and the message id is word or smallint type, because message len and message id ocuppies 4 bytes in total for storage.
  2. Game Logic

    I still using a Threaded Database Connections or use a own connection for each query?
  3. Encapsulating a network message

    You know the packet structure for the game?
  4. Encapsulating a network message

    1 - Work with word data type messages ( 2 Bytes ). 2 - I think, u don't need to store message length, because a word value is 2 bytes ( 0-65535 ). Client: After the message, write the buffer/data. Server: In server, first read the message, after read buffer/data based on messageid.
  5. Game Logic

    Server, Login, Info, Prize, DBConnnection Threads is a global thread. Only the socket thread is created on receive socket.
  6. Game Logic

    The dll have a own connection with the server that I developed and described above. Clients doesn't connect/talk to database, adUseClient is cursor location for get data for database fastest and adUseServer to write/update, the connection occurs in server. The database is used to obtain information on loads of items. Any Socket received by Server is repassed to a new socket thread, its wrong? [code] procedure TServerThread.ReceiveData(Sender: TObject; Socket: TCustomWinSocket); var SThread:TSocketThread; begin {$O+}//Optimization+ SThread:=TSocketThread.Create(Socket,True,True); {$O-} end; [/code]
  7. Game Logic

    I'm starting to develop multiplayer games, for now I'm working on simple things, like a extension dll. My DLL Game Logic: [img]http://i.imgur.com/8unN8.png[/img] I am developing in Pascal, using ADO to connect to SQL, and Client / ServerSocket for TCP Connections in mode ctNonBlocking / stNonBlocking. The above structure is used in a DLL which acts as an extension of a game, and works as follows: 1 - (Client<->Server->SocketThread->LoginThread) The dll is loaded by executable and connects to the server, then the player performs login to the server (2 Querys). 2 - (Client<->Server->SocketThread->GlobalInfoThread) After logging in, the client requests some information and the server returns data (7 Querys). 3 - (Client<->Server->SocketThread->RetraceInfoThread) When you open a window in question, the DLL sends a message to the server requesting data to update the client (7 Querys), that used, because items can be upgraded by purchasing through a browser. 4 - (Client<->Server->SocketThread->OpenPrizeThread) Players open a chest and the server return the prize (9 Querys). Problems: 1 - Upon arrival at about ~ 300K queries, the connection to the database seems to be destroyed, not sure. 2 - I'd like some tips to improve my structure, because i think it's a bad design. 3 - The SQLServer (2000) ends up consuming somewhere around 1.5GB ram to get around the ~ 300k queries, and the server is slow... Remarks: [list] [*]There are 4 threads calling SocketThread (Login, GlobalInfo, RetraceInfo, OpenBag), each with its connection to the database through a thread. [*]I am using Query objects in the CursorLocation: adoUseServer to UPDATE / INSERT and the SELECT to adoUseClient. [*]The average of people connected to the server through this dll is 150. [*]Not sure if the logic posted, is problematic, since it was previously using a single database connection for all threads, and I think I have not done a full test with this logic. [*]I will do a full test posted to this logic, with upgrade on SQLServer (2005 SP3) and upgrade in server hardwares, anyway, i would like to help me. [/list]
  8. Hello, I'm starting with multiplayer programming and have much questions to a good perfomance server. First, the conditions of my game: OS: Windows Server Expected Players: 1000 for each game server. 1 - DB Connetion, i have do: [list] [*] One db connection to each player. [*] One db connection in each server. [*] A DBServer interconnected to game/login server ( can post a example? ); [/list] 2 - Login<>Game Server, i have to do: [list] [*] LoginServer save the session info and GameServer call login server to ask the session data via local sockets. [*] LoginServer save the session info and GameServer call login server to ask the session data via local messages. [/list] 3 - General Socket questions. 3.1. I need to create: [list] [*]each thread for each packet received. [*]create a thread for each client connected and manipulate data. [/list] Obs: I'm pascal developer. I want solutions in any programming language. Thx.