pokepetter / ursina

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

Documentation Request: Control game loop like pygame #726

Closed f-bdolan closed 1 month ago

f-bdolan commented 1 month 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 1 month ago

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