pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.21k stars 328 forks source link

Documentation Request: Control game loop like pygame #726

Open f-bdolan opened 2 weeks ago

f-bdolan commented 2 weeks ago

I am interested in building a Gym environment using Ursina in a way like PyGame in this example

This example takes advantage of PyGame's ability to control frame-by-frame with methods like

pygame.init()
pygame.display.init()
pygame.draw.rect()
pygame.event.pump()
pygame.display.update()

It is not clear to me if this is possible in Ursina, or perhaps there is a better way to control the loops beyond app.run().

a2cy commented 2 weeks ago

There is the app.step method wich you can use instead to manually execute the update loop