Register for your free account! | Forgot your password?

You last visited: Today at 22:56

  • 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 12/04/2011, 20:13   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
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 12/04/2011, 22:17   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 755
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 12/04/2011, 23:08   #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 12/04/2011, 23:33   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 755
And to your threading question:
BaussHacker is offline  
Old 12/05/2011, 00:03   #6
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,124
Received Thanks: 2,503
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 12/05/2011, 03:27   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
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 12/05/2011, 20:52   #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



« Classic server (How does TQ do it?) | I'd appreciate some help here =) »

Similar Threads
couple questions
11/04/2009 - EO PServer Hosting - 1 Replies
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 server reinstalled and it still wont work..... 2. how do i get the totems working?cool to have 100 stars n be a king lol no totems for my demon tho so i cant level up legion.... 3.anybody know how i can get the god quests? like divine path.... thanks guys _________________
[HELP]Just a couple of questions
05/21/2009 - CO2 PServer - Discussions / Questions - 5 Replies
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 whats the UID for talismans? More to come*
Couple of questions
09/04/2008 - SRO Ask the Experts - 4 Replies
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 been reading about sp farming so I haven't used a single sp. Right now my char is lvl 10 and have 310 sp and now I wanna add a skill. What I don't understand is, do I spend one for each mastery level?, or I can click 'Level up' anytime for free and the sp are spend when I level the skills. 2.- When they say Xlvl gap, it means the difference...
Just a couple of Questions
04/24/2008 - CO2 Main - Discussions / Questions - 2 Replies
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 me. I posted the edits i wantes before but i guess a mod said no. If you can help me i would appreciate very much.
Couple of questions
01/20/2006 - CO2 Main - Discussions / Questions - 0 Replies
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 ? Has anyone found a way to find a player on the current screen (as in mouse co-ords)? Reason I ask is cause I am thinking of writing an app for my Miner, so when he gets PKed, it logs in my water and revs him, closes the client my water is logged into then continues mining on my Miner client. I could do it with a set mouse position, but then...



All times are GMT +1. The time now is 22:56.


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.