|
You last visited: Today at 07:24
Advertisement
How should a "NPC Server" work?
Discussion on How should a "NPC Server" work? within the CO2 Private Server forum part of the Conquer Online 2 category.
11/12/2014, 17:35
|
#1
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
How should a "NPC Server" work?
Hello guys,
I've not been posing here often anymore, because i am doing good with my source, at least i hope.
But i don't want the main server to handle everything, of course if i have another server to handle Mobs it would be better.
Basically, i am rewriting my source, i've been trying to make the Account Server separately, I hope i can finish this today. So i will rename the Main project to MsgServer and i want the last one to be the NPCServer.
I am re-downloading the "Binaries" so i can guess how their NPC Server works.
I am working on the 5187 version, by the way, it doesn't matter, i aint asking for a free ready to use code, the main question is, How a NPCServer should work?
Like a client? Sending the Mobs as Entities to the Main Server so it spawns on every client screen? There is any way to make it send packets directly to the client? I never done the Mobs part, so it will be my first try.
Base Socket System: Exodus Source - ImmuneOne
|
|
|
11/12/2014, 18:02
|
#2
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
NPC servers are kinda a pointless concept.
Basically when a player clicks an NPC they request a NPC ID and a linkback number. A 'npc server' isn't really a server so much as a compartmentalized project which matches those up with a script and performs its logic.
If you're referring to what TQ uses then I believe that controls all of their object AI (spawns, monster AI, etc). Making seperate projects for everything isn't really needed and won't get you any true benefits when working with conquer. If you're interested in interprocess communication then sure, go for it but it's just not something that will benefit the project itself.
PS: Using externally loaded scripts (python, lua, etc) are a great way to have easily configurable scripts that wont require you to recompile the source every time.
|
|
|
11/13/2014, 04:26
|
#3
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Thank you, Interprocess Communication was the keyword.
Well, i just want mobs to be handled by something else, i wont split the server in 10 parts hehe.
Btw, thank you.
Found an article about Named Pipes and i'll be reading this... after i finish a stupid dll to handle the Fluent NHibernate. (I've been looking through Albetros xD)
|
|
|
11/13/2014, 06:27
|
#4
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
|
I've built a database server that handles all the IO for the XioEmu source. Its using WCF with named pipe bindings.
|
|
|
11/14/2014, 01:10
|
#5
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Quote:
Originally Posted by Xio.
I've built a database server that handles all the IO for the XioEmu source. Its using WCF with named pipe bindings.

|
Thanks for the tip.
In terms of Difficult and Security, how much it's worth? (0-10)
I will make the basic things first, my Account Server already accepts data and send to the MsgServer.
I am building the Mappings(MySQL/Fluent NHibernate) to Users and other things so i can login and jump. After i finish the screen system i will see this.
Oh, another question.
I've made it to use Fluent NHibernate, i've seen sources that use NHibernate. I didn't use the basic one because i dont like working with XML files, and i think i win time since it's pre-compiled and doesn't need to load any extern file.
Do your guys recommend using Fluent NHibernate?
|
|
|
11/14/2014, 03:22
|
#6
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,323
Received Thanks: 928
|
Difficulty 2.
Security 10. Namedpipes are local only. Nobody can access them unless they already have access to your server.
Can't tell you anything about NHibernate since I don't use SQL even though everyone tells me to
|
|
|
11/14/2014, 11:39
|
#7
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Quote:
Originally Posted by Xio.
Can't tell you anything about NHibernate since I don't use SQL even though everyone tells me to 
|
|
|
|
11/14/2014, 12:48
|
#8
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
Fluent NHibernate is just as good as XML schemas, if you can work with it efficiently. The thing about the XML version is that it`s great for dynamic databases, since you can add new tables without recompiling. In the case of CO, this doesn`t apply, Fluent is perfect. And also, you can use the Fluent NHibernate Mapping Generator, link below.
|
|
|
11/14/2014, 15:32
|
#9
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Quote:
Originally Posted by Xio.
Difficulty 2.
Security 10. Namedpipes are local only. Nobody can access them unless they already have access to your server.
Can't tell you anything about NHibernate since I don't use SQL even though everyone tells me to 
|
Thank you  I will try it
Quote:
Originally Posted by KraHen
Fluent NHibernate is just as good as XML schemas, if you can work with it efficiently. The thing about the XML version is that it`s great for dynamic databases, since you can add new tables without recompiling. In the case of CO, this doesn`t apply, Fluent is perfect. And also, you can use the Fluent NHibernate Mapping Generator, link below.

|
I don't like XML lol looks harder...
And thank you very much for that app lol
It was so damn hard to write the classes to cq_user table since there are so many columns @_@
when i finish the basic things i will release it so i can contribute a few to the community >_<
|
|
|
All times are GMT +1. The time now is 07:25.
|
|