Jump to content

Game architecture overview


Recommended Posts

Hey guys!

So I'm trying to understand the architecture of the game, so I can start developing, but something don't add up to me. So I found out that there is PythonPlayer class that inherits from the AbstractPlayer class. It has some important features but not all of them. It's also a Singleton, so only one object is present in the game at a time.  But there is also a CInstanceBase and CActorInstance which possess some key features for the player. So I'm guessing that the PythonPlayer class has every feature that is only relevant to the player, CInstanceBase is something like a manager of CActorInstance class. Are monsters also of the type CActorInstance?

So my question is the following. Is there an architectural overview somewhere of the game or can I talk to somebody about how the classes connect to each other?

Link to comment
Share on other sites

  • Silver

Loooooooooong story short:

PythonPlayer is like a manager class responsible for your character's data. It is used on the Python side to get the data and display it later on and that's about it.

CInstanceBase is like a wrapper for the entity class CActorInstance which holds all the needed components like animations, effects, collisions, etc.

Link to comment
Share on other sites

Thank you for your quick reply! ?

If I may I'd like to dig a little deeper. Am I correct to assume that some of the player's CActorInstance's variables are not changing during the gameplay? What I mean by that is, for example the vID value doesn't change, only when a new map is loaded or something significant is changing, right? Also CPythonCharacterManager is responsible for all the entities, so it creates the CInstanceBase for every entity, right?

Link to comment
Share on other sites

  • Silver

Actually, CInstanceBase holds the VID value and that one is set on the server once the entity is spawned. Essentially, CActorInstance is a big mess of components grouped into one class, so it only holds "resource variables" eg. motions, while the CInstanceBase holds the gameplay variables like name, level, etc. The concept is old and very far from the modern implementations of entities but hopefully, you'll understand.

Correct, CPythonCharacterManager is responsible for the entities.

  • Love 1
Link to comment
Share on other sites

Sorry for not replying for quite some time, but we've just had a release at work so I was tied up in that project, but I had a little bit of time to overview the architecture and I think I got a hang on it now. I only have two more questions, I've seen that CActorInstance holds the methods for collision detection, but haven't really dug deep into it. Do you know which method is responsible for detecting if the player hit an obstacle? And the other question is that I see that servers use HackShield and CShield, but I haven't found any website for them. Do you know how's responsible for selling it?

Thank you very much for taking the time replying! ?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.