Latest Neocron News and Information

  • New test server patch #563 has been released to Vedeena

Difference between revisions of "NcSource talk:Programming psi healing shields"

From Neocron Wiki
Jump to: navigation, search
m
m
Line 9: Line 9:
 
Damn sorry ^^ totally forgot that wiki differentiates between talk pages and the normal pages ;) still have to get used to it. I just browsed the valve dev wiki a little bit to find out where i had that info about the total number of entities from. It can be found there: [http://developer.valvesoftware.com/wiki/Entity_limit here]. The limit i posted in the NC forum is not quite correct. As you can see on that page. But it's correct if you only consider networked entities which i am most worried about. Basically you may spawn 2048 non networked entities, which only live on the client or the server and then you may spawn an extra 2048 entities which live on both, the client and the server. During the first Phases there shouldn't be a problem with the number of entities, but it might become one when we move on to later phases. L4D solved that problem with a manager (they called it director) approach and so i think that's the way to go. If no one has any concerns about it i would start implementing the psi_manager_class tomorrow. --[[User:R2d22k|R2d22k]] 19:54, 1 March 2010 (UTC)
 
Damn sorry ^^ totally forgot that wiki differentiates between talk pages and the normal pages ;) still have to get used to it. I just browsed the valve dev wiki a little bit to find out where i had that info about the total number of entities from. It can be found there: [http://developer.valvesoftware.com/wiki/Entity_limit here]. The limit i posted in the NC forum is not quite correct. As you can see on that page. But it's correct if you only consider networked entities which i am most worried about. Basically you may spawn 2048 non networked entities, which only live on the client or the server and then you may spawn an extra 2048 entities which live on both, the client and the server. During the first Phases there shouldn't be a problem with the number of entities, but it might become one when we move on to later phases. L4D solved that problem with a manager (they called it director) approach and so i think that's the way to go. If no one has any concerns about it i would start implementing the psi_manager_class tomorrow. --[[User:R2d22k|R2d22k]] 19:54, 1 March 2010 (UTC)
  
would temporary ones work too? http://developer.valvesoftware.com/wiki/Temporary_Entity does that number include map entities too btw? (such as props etc)
+
would temporary ones work too? http://developer.valvesoftware.com/wiki/Temporary_Entity does that number include map entities too btw? (such as props etc), and can't the effects just be part of the player entity? --[[User:Biglines|Biglines]] 20:47, 1 March 2010 (UTC)

Revision as of 20:47, 1 March 2010

Ok, i (r2) am currently working on getting the basic PSI and DoT (damage over time) system implemented. There a several things i would want to discuss with you.

The Source-Engine has afaik an entities cap of 2048 entities. Having this cap we should avoid creating an entity for every single shields/heal/dot. So i thought that one could just implement one single logical entity serverside that keeps track of all the shields, heals and dots serverside. If someone casts a heal, the psi manager will be called and it creates a particle effect (an entity) which will be attached to the player and which (the particle effect) will also handle the hud thingy showing up on the client who got that heal. The time how long that heal will last will be controlled serverside but the user will see the progress bar we all know and love ;) The shields will be more or less silently be kept track of. Every second they will be checked whether they ran out or not and the entitys belonging to the specific gui elements on the clients will be updated. So the gui elements are the only entites which are created. The shield particle effect will be created once a player recieves damage and will fade out quite fast (like the shields in NC). So basically the main informations about the psi effects will be stored in structs serverside and the graphical effects will only be spawned as entities when needed. That way we may reduce the amount of entities. But the downside of this is that the Think function of the manager class, called once a sec, may(it doesn't have to just maybe) become more or less huge and time consuming.

The other possibility would be to drop the concept of the manager class more or less completely and spawn a new entity once a shield/heal/dot is casted. This maybe makes sense for the heals but the shields which spawn their particle effects just once in a while that may create an entity overhead. But this approach would distribute the processing time needed a little bit better, but it would also consume more processing power. Apart from that, it is harder to handle. --R2d22k 12:34, 1 March 2010 (UTC)

Moved this to the talk page, and made a setup for the general page ;) (we can use the main page then to refine the actual one) --Biglines 17:50, 1 March 2010 (UTC)

Damn sorry ^^ totally forgot that wiki differentiates between talk pages and the normal pages ;) still have to get used to it. I just browsed the valve dev wiki a little bit to find out where i had that info about the total number of entities from. It can be found there: here. The limit i posted in the NC forum is not quite correct. As you can see on that page. But it's correct if you only consider networked entities which i am most worried about. Basically you may spawn 2048 non networked entities, which only live on the client or the server and then you may spawn an extra 2048 entities which live on both, the client and the server. During the first Phases there shouldn't be a problem with the number of entities, but it might become one when we move on to later phases. L4D solved that problem with a manager (they called it director) approach and so i think that's the way to go. If no one has any concerns about it i would start implementing the psi_manager_class tomorrow. --R2d22k 19:54, 1 March 2010 (UTC)

would temporary ones work too? http://developer.valvesoftware.com/wiki/Temporary_Entity does that number include map entities too btw? (such as props etc), and can't the effects just be part of the player entity? --Biglines 20:47, 1 March 2010 (UTC)