Hi there. Let's say i want to loop a function in my game which is created using pyglet. You might say that use pyglet.clock.schedule functions but here my problem comes. It looks like pyglet itself increases the sleeptime so when you say pyglet.clock.schedule_interval(func, .001) it's not really calling a function each 1 millisecond. Pyglet itself puts a sleep between each call, At least from what I could guess and thus making loops that should be very fast like bullet update function trigger seriously slower than how fast they should be called. I tried multi threading too but it looks like it even doesn't let me start a thread or possibly use a thread when pyglet makes its window and begins working. Please tell me there's a way to fix this or there's a way to make pyglet.clock.schedule stop lying and call functions about as fast as you tell it to.
Edit: I used pyglet.schedule(func) as well, Still the same result. It doesn't trigger functions in the way I want it to
Thanks for reading.
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988