Hello. I've been making a game and the python library I was used is terrible (Pyglet). I want to try using Cocoa for the OSX version.
I'll be able to figure out using the objects from classes like NSWindow and NSOpenGLView and then put these objects in my own class for the game loop.
I have no idea how I can use PyObjC to load a dynamic Objective-C library I can make and then use the class I will make in python to setup the game which I suppose can be looped by NSTimer.
However, the loop method will also need to call a python method from one of many python classes. My game consists of many python classes which are used for different sections of the game (Mapmaker,GameSession,AnacondaGame etc.). The game loop will need to call a loop method in any of these classes depending on the current section and pass even information.
PyObjC is "bi-directional" apparently so how is that done?
Alternatively I could create two methods to be called by python and I add the python code in-between, where the loop is controlled by python.
The "documentation" on the PyObjC website only seem to explain how to use Cocoa in python and nothing else.
What I can't do is make a fixed GUI with the interface builder because the library will need to create windows based on the python input to an initialisation method of my class.
Knowing the syntax of Objective-C isn't a big problem and I can reefer to the Cocoa documentation to make the objects I require.
Thank you for any help. It will be appreciated very much. I'm sick of using broken libraries like pygame and pyglet, using the platform specific OS APIs seems to be the best method to ensure quality.