1 registered members (Ayumi),
662
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: What would be faster?
[Re: PeterM]
#140022
07/07/07 13:19
07/07/07 13:19
|
Joined: Mar 2007
Posts: 776 Poor village - Poland ;)
tompo
User
|
User
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
|
I think result will be quite the same but c_scan is better because You may attack from behind and not be detected (enemy hasn't eyes on his back). But remember that c_scan see through the walls so you have to use c_trace also.
Cheers
Last edited by tompo; 07/07/07 13:20.
Never say never.
|
|
|
Re: What would be faster?
[Re: Scorpion]
#140024
07/07/07 15:15
07/07/07 15:15
|
Joined: Mar 2007
Posts: 27
PeterM
OP
Newbie
|
OP
Newbie
Joined: Mar 2007
Posts: 27
|
|
|
|
Re: What would be faster?
[Re: Scorpion]
#140025
07/07/07 15:30
07/07/07 15:30
|
Joined: Oct 2004
Posts: 1,655
testDummy
Serious User
|
Serious User
Joined: Oct 2004
Posts: 1,655
|
Quote:
I think result will be quite the same but c_scan is better because You may attack from behind and not be detected (enemy hasn't eyes on his back).
As I hinted elsewhere, you don't need c_scan just for that. Perhaps, it is wasteful just to use c_scan to simply emulate view angles as, seemingly, c_scan also searches for entities within a certain area (probably using a list of all or some entities) and THAT takes more time. If the player is the only entity that can be attacked by enemies, than for 50 enemies: *vec_dist + own angle test + trace (probably much faster than) *scan + trace
Again, if the player is the only entity that can be attacked by enemies: I believe (as tests seem to indicate) the vec_dot instruction can be used to do angle of view tests. Also, alternately, I think a simple vec_to_angle and a subtraction of angles, can yield satisfactory results, without the slower use of c_scan.
Quote:
use c_trace and then scan, should be the best way
I suppose for users that are just starting out, that may be true. Otherwise, I guess I disagree with that, but it doesn't seem that anyone pays much attention to what I write about such things.
For instances where the player is not the only entity that can be attacked by enemies, for team instances, I normally use my el (entity list) plugin, as initially, in tests long ago, it was faster than scan_entity. (However, Conitec may have improved the scan algorithm since then.) It allows for greater flexibility and better linear logic in many instances. Of course, c_scan has functionality not provided in my simple plugin, so there are instances where it is still useful.
edit: I believe with 50 entities, if you don't handle it correctly, your framerate may take a nosedive.
Last edited by testDummy; 07/07/07 15:33.
|
|
|
|