How should a "NPC Server" work?

11/12/2014 17:35 pintinho12#1
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 pro4never#2
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 pintinho12#3
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 Xio.#4
I've built a database server that handles all the IO for the XioEmu source. Its using WCF with named pipe bindings.

[Only registered and activated users can see links. Click Here To Register...]
11/14/2014 01:10 pintinho12#5
Quote:
Originally Posted by Xio. View Post
I've built a database server that handles all the IO for the XioEmu source. Its using WCF with named pipe bindings.

[Only registered and activated users can see links. Click Here To Register...]
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?
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
11/14/2014 03:22 Xio.#6
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 Super Aids#7
Quote:
Originally Posted by Xio. View Post
Can't tell you anything about NHibernate since I don't use SQL even though everyone tells me to :)
:facepalm:
11/14/2014 12:48 KraHen#8
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.

[Only registered and activated users can see links. Click Here To Register...]
11/14/2014 15:32 pintinho12#9
Quote:
Originally Posted by Xio. View Post
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 :D I will try it

Quote:
Originally Posted by KraHen View Post
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.

[Only registered and activated users can see links. Click Here To Register...]
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 >_<