Register for your free account! | Forgot your password?

You last visited: Today at 03:49

  • Please register to post and access all features, it's quick, easy and FREE!

 

Couple of questions

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2009
Posts: 63
Received Thanks: 10
Couple of questions

1-What is the action taken by the server to send the client to character making or logging in other words what's the packet sent by the server to client that either sends client to character making or logging in game

2-should i make a recieve thread for each client like impulse does or there is a better way to do it i dont think its a good idea to use a recieve thread for each client since a char could go afk or so



miketheking is offline  
Old   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,307
1: Once the gameserver has finished setting up its connection with the client (including encryption) the client sends the login request packet (type 1052). The server then checks validation for this user (if they've been approved by the login server) and then sends a talk packet to control if they get to log into the game or if they get sent to character creation (type 1004)

The options are...
Normal login: "ANSWER_OK"
Character creation: "NEW_ROLE"


pro4never is offline  
Old   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 754
Quote:
Originally Posted by pro4never View Post
1: Once the gameserver has finished setting up its connection with the client (including encryption) the client sends the login request packet (type 1052). The server then checks validation for this user (if they've been approved by the login server) and then sends a talk packet to control if they get to log into the game or if they get sent to character creation (type 1004)

The options are...
Normal login: "ANSWER_OK"
Character creation: "NEW_ROLE"
And any other message with be thrown as a dialog in the login.

Ex.

Ban: "**** OFF"
BaussHacker is offline  
Old   #4
 
elite*gold: 0
Join Date: Oct 2009
Posts: 63
Received Thanks: 10
thnx guys i got that figured out a while ago anyway but the thread question still stands and btw bauss u read my mind


miketheking is offline  
Old   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 754
And to your threading question:
Threading
BaussHacker is offline  
Old   #6
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,122
Received Thanks: 2,490
Quote:
Originally Posted by miketheking View Post
thnx guys i got that figured out a while ago anyway but the thread question still stands and btw bauss u read my mind
No you shouldnt use 1 thread per character, it becomes unscaleable very rapidly.
Korvacs is offline  
Old   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,196
Received Thanks: 5,307
Sorry I intended to reply to your second question but I guess I ran to work :S


As korv said... thread per players is a very poor way of handling things.


There's lots of ways you could handle your threading and I don't think anyone here can make the claim that there's one absolute best way to deal with it in every situation but here's some of my oppinions.


Use an async socket system so that you don't need to have threads blocked off for receiving from client (eliminates the need for thread per client). From there I would tell the threadpool to process the received information. This allows for packets to be processed concurrently while at the same time not needing you to hard code a specific number of threads to switch between. From there I'd most likely just create a couple server threads to run through specific functions (monster AI thread, slow updates, fast updates is my general advice but I'm sure others would disagree)

If you write a threading system and you find certain things are really not running the way you would expect them to (such as monsters slowing down/freezing while the server runs) then I'd suggest using the stopwatch class to time how long each thread loop takes to execute. It really helps you track down issues. I know I was having an issue with my monster thread once where monsters were not being removed from the active collection so as players logged in/monsters re spawned the thread was slowing down more and more till it appeared almost frozen.
pro4never is offline  
Old   #8
 
elite*gold: 0
Join Date: Oct 2009
Posts: 63
Received Thanks: 10
i added an asynch socket system successfully while in the process i noticed an auth packet of length 80 that the client sends what's that


miketheking is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
couple questions
1. i got a pserver running. then i tried to run accserver again and it fails..... any idea on fixing that.. ive uninstalled everything to do with my...
1 Replies - EO PServer Hosting
[HELP]Just a couple of questions
what is a static ip and how do i get one? if i made a new item fo rmy server does the image have to be saved as dds? How ot make a Gold cup? like...
5 Replies - CO2 PServer - Discussions / Questions
Couple of questions
Hello everyone, I'm new to sro, just started yesterday and have a couple of questions, I hope you guys can help me. 1.- How are sp spend? I've...
4 Replies - SRO Ask the Experts
Just a couple of Questions
Hey guys i just wanted to know if some1 could show me the link to a met spammer. I also wanted to know if anyone could do some edits for conquer for...
2 Replies - CO2 Main - Discussions / Questions
Couple of questions
Are the memory address the same in CO2 for Stam, HP and Mana as they where in CO1.0? If not what are they, or do I have to fiund them myself >:o ? ...
0 Replies - CO2 Main - Discussions / Questions



All times are GMT +2. The time now is 03:49.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.