≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
How to do this?
Posted by:
(you are not logged in)
Enter the missing letter in: "Internati?nal"
(you are not logged in)
Text:
[quote][b][/b] wrote: Niko, I've been wondering if the reason why he doesn't want to use the Behavior called "[b]Every few seconds, do something[/b]" is that he thinks it would cause a negative performance impact because it will constantly run during the whole game. His reason for wanting to achieving the same goal with the "[b]If a key is pressed, do something[/b]" Behavior might be that he thinks the engine will ONLY check its status when a key is pressed, so his game will be faster because it won't constantly check the status of the "Every few seconds" Behavior. Can you add some insight by describing the performance impact of the engine constantly checking the status of the "[b]Every few seconds, do something[/b]" Behavior compared to the speed of checking whether a key is pressed with the Behavior called "[b]When a key is pressed, do something[/b]"? Imagine the "[b]Every few seconds, do something[/b]" Behavior running every 1 millisecond. Would that waste more processing power compared to the "[b]When a key is pressed, do something[/b]" Behavior? Since he wants his object move at a speed that's slow enough for people to see, would the speed of the "Every few seconds" Behavior actually run faster than the check for a key press? I mean, if his "Every few seconds" Behavior is set to 1000 milliseconds (1 second), would the engine check for that less often than it checks the status of the keypress Behavior, thus causing it to actually waste LESS processing power than the keypress Behavior? My guess is that the engine still needs to constantly check if a key is pressed, probably every 1 millisecond, so checking for that would have the same performance impact as the "[b]Every few seconds, do something[/b]" Behavior. Is my guess correct? Does the check for a key press run at every 1 millisecond, essentially causing both Behaviors to have exactly the same performance impact? I'm talking about the C++ code that the engine is built with. Does the C++ code check for a keypress the same way it checks for the "Every few seconds" Behavior, causing them to both have the same speed? He seems to want to emulate your "Every few seconds" feature inside of the "If a key is pressed" Behavior. Your answer might convince him and other future people that this is not necessary![/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact