TheGeek, on 09 January 2013 - 04:01 PM, said:
Cloudy, on 09 January 2013 - 06:02 AM, said:
TheGeek, on 09 January 2013 - 05:16 AM, said:
sensor = sensor.wrap("right") as if the API wasn't loaded.
You're overwriting the sensor API with your sensor object
DOH! I sure am.
I have been noticing quite a noticeable "hiccup" in Minecraft whenever a sensor is called. My first code that checked many times a second brought my framerate from 120 down to 30. In subsequent code that only checked once a second, I still was able to tell when the sensor was activated. This concerns me a bit as I will likely have to use 4-8 sensors to cover the area in my project. I am confident you will optimize your code to minimize this in coming versions. I will have to do some testing on multiple sensors running at a reasonable rate and see if its any worse. I'll gladly share code or any debug info if it will help you in your efforts.
I haven't yet experienced any framerate loss. The code that drives OCS is pretty lightweight compared to everything else that's going on in minecraft - however, if you can provide some examples of what seems to be causing lag i'll profile it and see if it I can find a bottleneck.













