Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (degenerate_762), 1,128 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
speed of trigger_range #88023
08/29/06 06:48
08/29/06 06:48
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I wonder, how much impact several entities with applied trigger_range have on the frame rate.
Does it make sense to do a periodic distance check tu turn off trigger_range for entities further away?
Is doing a simple periodic (e.g. 1s recurrence) distance check using vec_dist() faster?

Re: speed of trigger_range [Re: FBL] #88024
08/29/06 10:25
08/29/06 10:25
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
c_move is remarkably slower with triggering (->collision section of the manual). So yes, it would make sense to turn off the trigger_range when triggering is not needed.

Re: speed of trigger_range [Re: jcl] #88025
08/30/06 01:43
08/30/06 01:43
Joined: Jul 2000
Posts: 8,973
Bay Area
Doug Offline
Senior Expert
Doug  Offline
Senior Expert

Joined: Jul 2000
Posts: 8,973
Bay Area
Another idea (which I haven't tried) is to only do a trigger_range move every few frames (e.g. 4 'normal moves' for every one trigger_range move).

If you do try this, make sure to do it enough times that you don't skip over anything. Also make sure that each entity takes turns (if all the entities check at once you'll get jerks).


Conitec's Free Resources:
User Magazine || Docs and Tutorials || WIKI
Re: speed of trigger_range [Re: Doug] #88026
08/30/06 13:50
08/30/06 13:50
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Thanks for the info.
I'll stick with distance check instead.

Re: speed of trigger_range [Re: FBL] #88027
08/30/06 14:12
08/30/06 14:12
Joined: Oct 2000
Posts: 1,543
Germany
A
Alexander Esslinger Offline
Senior Developer
Alexander Esslinger  Offline
Senior Developer
A

Joined: Oct 2000
Posts: 1,543
Germany
When checking the distance, make sure to use the square - that's faster.

Re: speed of trigger_range [Re: Alexander Esslinger] #88028
09/01/06 02:59
09/01/06 02:59
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
you mean to use a square of 2 distance in teh distance check to increase the speed?

Re: speed of trigger_range [Re: Grimber] #88029
09/01/06 07:31
09/01/06 07:31
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
He means that I shouldn't use sqrt and instead check the with the square result (Meaning when checking for a distance of 5, I check with 25 (5²) instead in the script).
This is doable, but I'm planning ot use vec_dist anyway, because it has less problems with exceeding variable ranges for great distances.
Not sure how much slower vec_dist is, though.


Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1