PyUnity is a Python implementation of the Unity Engine, written in C++

Overview

PyUnity

Documentation Status License PyPI version Python version Language grade: Python Total alerts Build status Discord Gitter GitHub Repo stars

Version 0.7.0 (in development)

PyUnity is a Python implementation of the Unity Engine, written in C++. This is just a fun project and many features have been taken out to make it as easy as possible to create a scene and run it.

Installing

To install PyUnity for Linux distributions based on Ubuntu or Debian, use:

> pip3 install pyunity

To install PyUnity for other operating systems, use pip:

> pip install pyunity

Alternatively, you can clone the repository to build the package from source. Then use setup.py to build. Note that it will install Cython to compile.

> python setup.py install

Its only dependencies are PyOpenGL, PySDL2, GLFW, Pillow and PyGLM.

Importing

To start using pyunity, you must import it. A standard way to import is like so:

>>> from pyunity import *

Debug information is turned on by default. If you want to turn it off, set the PYUNITY_DEBUG_MODE environment variable to "0". This is the output with debugging:

Loaded config
Trying GLFW as a window provider
GLFW doesn't work, trying PySDL2
Using window provider PySDL2
Loaded PyUnity version 0.7.0

If debugging is off, there is no output:

>> from pyunity import * >>> # No output ">
>>> import os
>>> os.environ["PYUNITY_DEBUG_MODE"] = "0"
>>> from pyunity import *
>>> # No output

Scenes

All PyUnity projects start with a scene. To add a scene, do this:

>>> scene = SceneManager.AddScene("Scene 1")

Then, let's move the camera backwards 10 units.

>>> scene.mainCamera.transform.position = Vector3(0, 0, -10)

Finally, add a cube at the origin:

>> renderer = cube.AddComponent(MeshRenderer) >>> renderer.mesh = Mesh.cube(2) >>> renderer.mat = Material(Color(255, 0, 0)) >>> scene.Add(cube) ">
>>> cube = GameObject("Cube")
>>> renderer = cube.AddComponent(MeshRenderer)
>>> renderer.mesh = Mesh.cube(2)
>>> renderer.mat = Material(Color(255, 0, 0))
>>> scene.Add(cube)

To see what you have added to the scene, call scene.List():

>>> scene.List()
/Main Camera
/Light
/Cube

Finally, to run the scene, call scene.Run(). The window that is created is one of FreeGLUT, GLFW or PySDL2. The window is selected on module initialization (see Windows subheading).

Behaviours

To create your own PyUnity script, create a class that inherits from Behaviour. Usually in Unity, you would put the class in its own file, but Python can't do something like that, so put all of your scripts in one file. Then, to add a script, just use AddComponent(). Do not put anything in the __init__ function, instead put it in Start(). The Update() function receives one parameter, dt, which is the same as Time.deltaTime.

Windows

The window is provided by one of three providers: GLFW, PySDL2 and FreeGLUT. When you first import PyUnity, it checks to see if any of the three providers work. The testing order is as above, so FreeGLUT is tested last.

To create your own provider, create a class that has the following methods:

  • __init__: initiate your window and check to see if it works.
  • start: start the main loop in your window. The first parameter is update_func, which is called when you want to do the OpenGL calls.

Check the source code of any of the window providers for an example. If you have a window provider, then please create a new pull request.

Examples

To run an example, import it like so:

>>> from pyunity.examples.example1 import main
Loaded config
Trying FreeGLUT as a window provider
FreeGLUT doesn't work, trying GLFW
GLFW doesn't work, trying PySDL2
Using window provider PySDL2
Loaded PyUnity version 0.7.0
>>> main()

Or from the command line:

> python -m pyunity 1

The 1 just means to load example 1, and there are 9 examples. To load all examples one by one, do not specify a number. If you want to contribute an example, then please create a new pull request.

Comments
  • ModuleNotFoundError: No module named 'vector3'

    ModuleNotFoundError: No module named 'vector3'

    I am a new user to pyunity.. i installed it with pip install pyunity

    I was trying out the examples.. python -m pyunity 1 it resulted in error: Error log:

    PS C:\Users\Lenovo> python -m pyunity 1
    Loaded config
    Trying GLFW as a window provider
    Using window provider GLFW
    Traceback (most recent call last):
      File "C:\Program Files\Python38-32\lib\runpy.py", line 185, in _run_module_as_main
        mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
      File "C:\Program Files\Python38-32\lib\runpy.py", line 144, in _get_module_details
        return _get_module_details(pkg_main_name, error)
      File "C:\Program Files\Python38-32\lib\runpy.py", line 111, in _get_module_details
        __import__(pkg_name)
      File "C:\Program Files\Python38-32\lib\site_packages\pyunity\__init__.py",  line 131, in <module>
        from .audio import *
      File "audio.py", line 13, in init pyunity.audio
      File "core.py", line 1, in init pyunity.core
    ModuleNotFoundError: No module named 'vector3'
    

    I have tried whatever i can do.. but i can't fix it nor find any module with name "vector3" on the internet..

    Specs (if you need):

    Python Version: Python 3.8.9
    OS: Windows 7 SP 1
    Processor: Intel core i3 (x86)
    
    opened by whmsft 16
  • Convert stubs to inline type hints

    Convert stubs to inline type hints

    The current approach makes it hard to maintain the project's types since the docstrings and stub files has to be in sync so I think the project should convert to inline type hints as defined in PEP 448 and note that a py.typed file will need to be added to /pyunity for PEP 561.

    Since pyunity only supports Python3.6+ there will be no compatibility issues what's however.

    I would like to know your opinion on this :)

    opened by FaresAhmedb 11
  • Importing issue

    Importing issue

    Cannot import pyunity due to error below:

    Loaded config
    Trying GLFW as a window provider
    Using window provider GLFW
    Traceback (most recent call last):
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 188, in _run_module_as_main
        mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 147, in _get_module_details
        return _get_module_details(pkg_main_name, error)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 111, in _get_module_details
        __import__(pkg_name)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\site-packages\pyunity\__init__.py", line 156, in <module>
        from .audio import *
      File "audio.py", line 13, in init pyunity.audio
      File "core.py", line 1, in init pyunity.core
    ModuleNotFoundError: No module named 'vector3'
    
    Type: Bug Meta: Invalid 
    opened by rayzchen 10
  • Feature/saving

    Feature/saving

    TODO:

    • [x] Move Color and MeshRenderer to meshes.py
    • [x] Subclass SavesProjectID for savable assets
    • [x] Customize saving of assets in class not in Loader
    • [x] Save class as struct-like representation
    • [x] Clean up Loader.Save* functions and remove weird parameters
    • [x] Create prefab mechanics
    • [ ] Fix Behaviour saving (only write when needed)
    • [x] Callback saving
    Type: Enhancement Topic: Module Meta: Awaiting Response OS: Any 
    opened by rayzchen 5
  • [BUG] Cannot import from egg

    [BUG] Cannot import from egg

    Describe the bug

    Trying to import PyUnity from an egg file errors out.

    To Reproduce

    Run cython=0 python setup.py bdist_egg Go to dist folder Run code

    Expected behavior

    Successful import

    Code

    import sys
    sys.path.insert(0, "pyunity-0.9.0-py3.9.egg")
    import pyunity
    

    System info

    ##############################
             VERSION INFO
    ##############################
    PyUnity version: v0.9.0
    Python version: v3.9.4-final
    Operating system: Windows 10
    Architecture: 32bit
    Requirements:
    - pyopengl version: 3.1.5
    - pillow version: 9.0.1
    - pysdl2 version: 0.9.11
    - pysdl2-dll version: 2.0.20
    - pyglm version: 2.5.7
    - importlib-resources version: None
    - glfw version: 2.5.0
    

    Traceback

    Traceback (most recent call last):
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\importlib\_common.py", line 35, in _tempfile
        os.write(fd, reader())
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\zipfile.py", line 2322, in read_bytes
        with self.open('rb') as strm:
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\zipfile.py", line 2306, in open
        stream = self.root.open(self.at, zip_mode, pwd=pwd)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\zipfile.py", line 1502, in open
        zinfo = self.getinfo(name)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\zipfile.py", line 1429, in getinfo
        raise KeyError(
    KeyError: "There is no item named 'pyunity/shaders/skybox/textures/' in the archive"
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
      File "<frozen zipimport>", line 259, in load_module
      File "pyunity-0.9.0-py3.9.egg\pyunity\__init__.py", line 209, in <module>
        from .render import __all__ as _render_all
      File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
      File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
      File "<frozen zipimport>", line 259, in load_module
      File "pyunity-0.9.0-py3.9.egg\pyunity\render.py", line 324, in <module>
        skyboxes["Water"] = Skybox(stack.enter_context(as_file(ref / "skybox/textures")))
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\contextlib.py", line 429, in enter_context
        result = _cm_type.__enter__(cm)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\contextlib.py", line 117, in __enter__
        return next(self.gen)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\importlib\_common.py", line 52, in as_file
        with _tempfile(path.read_bytes, suffix=path.name) as local:
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\contextlib.py", line 117, in __enter__
        return next(self.gen)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\importlib\_common.py", line 40, in _tempfile
        os.remove(raw_path)
    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\raych\\AppData\\Local\\Temp\\tmpbrwljrmttextures'
    

    Additional context Add any other context about the problem here.

    Type: Bug Topic: Module OS: Any 
    opened by rayzchen 3
  • Memory leaks

    Memory leaks

    Sometimes MemoryError is encountered when copying the scene at runtime, especially with shaders and skyboxes duplicated (which they aren't meant to be).

    Type: Bug Meta: Invalid 
    opened by rayzchen 3
  • Cannot import when built with Cython

    Cannot import when built with Cython

    In the current state, importing PyUnity will cause this error:

    Loaded config
    Traceback (most recent call last):
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 184, in _run_module_as_main
        mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 143, in _get_module_details
        return _get_module_details(pkg_main_name, error)
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 110, in _get_module_details
        __import__(pkg_name)
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyunity\__init__.py", line 125, in <module>
        from .audio import *
      File "audio.py", line 12, in init pyunity.audio
      File "config.py", line 17, in init pyunity.config
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyunity\window\__init__.py", line 34, in <module>
        from .glutWindow import Window as glutWindow
    ImportError: DLL load failed while importing glutWindow: The specified module could not be found.
    
    Type: Bug Meta: Invalid 
    opened by rayzchen 3
  • [OBSERVATION] Cool idea, but the name will likely get C&D'd....

    [OBSERVATION] Cool idea, but the name will likely get C&D'd....

    Cool idea for a project :) I suspect that as far as the name there are two situations:

    1. no-one is using your project, and it sits below the radar, and Unity themselves don't notice, or do anything
    2. your project starts to become popular. I suspect your name will then get cease and desisted, by Unity, at that point

    I suppose you could just change the name at that point, but, might be as easy to just change the name now? (e.g. Mono, which Unity uses, didn't call themselves "Linux .Net Framework", they called themselves "mono", and everyone knew that it was a cross platform version of the windows .net framework).

    this would also avoid having to state twice, in the first two paragraphs of your front page, that pyunity is not a wrapper around unity :)

    (And it's natural to assume pyunity is a wrapper. My pytorch project, https://github.com/hughperkins/pytorch (which predates the Facebook pytorch by a year or two), was a wrapper around Facebook's lua torch)

    opened by hughperkins 2
  • [FEATURE] Move main loop to SceneManager, or have a custom main loop runner

    [FEATURE] Move main loop to SceneManager, or have a custom main loop runner

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] The main loop code in the window providers is almost exactly the same thing: run some init, create a clock, infinite loop, quit etc. but it's hard to create something like VSync that can be toggled on and off. This really shouldn't be handled by the window providers.

    Describe the solution you'd like A clear and concise description of what you want to happen. The main loop code should be either in SceneManager.__loadScene or (more preferably) another ABCMeta that can be subclassed and implemented, given an update function and set to chug along nicely.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    Type: Enhancement Topic: Module OS: Any 
    opened by rayzchen 2
  • RenderTarget.canvas nested rendering

    RenderTarget.canvas nested rendering

    If RenderTarget.canvas is true, it may try to render itself in PreRender. Whether this is wanted or not, there needs to be a limit to the depth of recursion.

    Type: Bug 
    opened by rayzchen 2
  • Example 8

    Example 8

    Loading example 8 always gives an error:

    Traceback (most recent call last):
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\Ray\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "D:\Ray\python\pyunity\__main__.py", line 2, in <module>
        examples.show()
      File "D:\Ray\python\pyunity\examples\__init__.py", line 32, in show
        example.main()
      File "D:\Ray\python\pyunity\examples\example8\__init__.py", line 9, in main     
        source = scene.mainCamera.AddComponent(AudioSource)
      File "D:\Ray\python\pyunity\core.py", line 327, in AddComponent
        return self.gameObject.AddComponent(component)
      File "D:\Ray\python\pyunity\core.py", line 186, in AddComponent
        component = componentClass(self.transform)
      File "D:\Ray\python\pyunity\audio.py", line 58, in __init__
        mixer.Mix_AllocateChannels(channels)
    OSError: exception: access violation reading 0x00000074
    

    This doesnt happen when I run python -m pyunity 8, only when I run all examples. This happens on the develop branch.

    Type: Bug 
    opened by rayzchen 2
  • [FEATURE] `Config` class that is set per project

    [FEATURE] `Config` class that is set per project

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    Instead of having global variables under pyunity/config.py, using a class that can be modified is more portable. This way we can separate flags and actual configs, whereas right now config.audio can be modified.

    Describe the solution you'd like A clear and concise description of what you want to happen.

    Config class created that can be loaded and saved from the .pyunity file in projects

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    Additional context Add any other context or screenshots about the feature request here.

    Type: Enhancement Topic: Module 
    opened by rayzchen 0
  • [BUG] ctypes.ArgumentError: argument 2: <class 'KeyboardInterrupt'>

    [BUG] ctypes.ArgumentError: argument 2:

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    System info

    Loaded config
    Detected settings.json entry
    Using window provider GLFW
    Loaded PyUnity version 0.9.0
    ##############################
             VERSION INFO
    ##############################
    PyUnity version: v0.9.0
    Python version: v3.9.4-final
    Operating system: Windows 10
    Machine: AMD64
    Python architecture: 32bit
    Dependencies:
    - pyopengl version: 3.1.5
    - pillow version: 9.0.1
    - pysdl2 version: 0.9.11
    - pysdl2-dll version: 2.0.20
    - pyglm version: 2.5.7
    - importlib-resources version: None
    - glfw version: 2.5.3
    

    Describe the bug

    Program quits with a large error yet KeyboardInterrupt is not raised and so cannot be caught normally by SceneManager.__loadScene.

    To reproduce

    Run examples Press Ctrl+C while an example is running Repeat until KeyboardInterrupt is raised while an OpenGL function is being called

    Code

    No response

    Traceback

    Loaded config
    Detected settings.json entry
    Using window provider GLFW
    Loaded PyUnity version 0.9.0
    
    Example 1
    /Cube
    /Floor
    /Light
    /Main Camera
    Launching window manager
    Compiling objects
    Starting scene
    Physics is on
    Scene 'Scene' has started
    
    Example 2
    Launching window manager
    Compiling objects
    Starting scene
    Physics is on
    Scene 'Scene' has started
    Traceback (most recent call last):
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Ray-Data\python\pyunity\pyunity\__main__.py", line 60, in <module>
        examples.show()
      File "C:\Ray-Data\python\pyunity\pyunity\examples\__init__.py", line 36, in show
        loadExample(i)
      File "C:\Ray-Data\python\pyunity\pyunity\examples\__init__.py", line 20, in loadExample
        module.main()
      File "C:\Ray-Data\python\pyunity\pyunity\examples\example2\__init__.py", line 55, in main
        SceneManager.LoadScene(scene)
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\sceneManager.py", line 243, in LoadScene
        __loadScene(copy.deepcopy(scene))
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\sceneManager.py", line 308, in __loadScene
        windowObject.start(scene.update)
      File "C:\Ray-Data\python\pyunity\pyunity\window\providers\glfw\window.py", line 145, in start
        self.updateFunc()
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\scene.py", line 502, in update
        self.Render()
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\scene.py", line 518, in Render
        self.mainCamera.Render(renderers, lights)
      File "C:\Ray-Data\python\pyunity\pyunity\render.py", line 732, in Render
        self.RenderScene(renderers, lights)
      File "C:\Ray-Data\python\pyunity\pyunity\render.py", line 727, in RenderScene
        self.SetupShader(lights)
      File "C:\Ray-Data\python\pyunity\pyunity\render.py", line 637, in SetupShader
        self.shader.setVec3(b"viewPos", list(
      File "C:\Ray-Data\python\pyunity\pyunity\render.py", line 292, in setVec3
        location = gl.glGetUniformLocation(self.program, var)
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\site-packages\OpenGL\latebind.py", line 63, in __call__
        return self.wrapperFunction( self.baseFunction, *args, **named )
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\site-packages\OpenGL\GL\VERSION\GL_2_0.py", line 430, in glGetUniformLocation
        return baseOperation( program, name )
    ctypes.ArgumentError: argument 2: <class 'KeyboardInterrupt'>:
    

    Additional context

    To do with raising KeyboardInterrupt while running an OpenGL function

    Type: Bug Topic: Module 
    opened by rayzchen 2
  • [BUG] Fix collision detection algorithm

    [BUG] Fix collision detection algorithm

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    System info

    Loaded config
    Detected settings.json entry
    Using window provider GLFW
    Loaded PyUnity version 0.9.0
    ##############################
             VERSION INFO
    ##############################
    PyUnity version: v0.9.0
    Python version: v3.10.4-final
    Operating system: Windows 10
    Machine: AMD64
    Python architecture: 64bit
    Dependencies:
    - pyopengl version: 3.1.6
    - pillow version: 9.1.1
    - pysdl2 version: 0.9.11
    - pysdl2-dll version: 2.0.20
    - pyglm version: 2.5.7
    - importlib-resources version: None
    - glfw version: 2.5.3
    

    Describe the bug

    Physics is broken, when two cubes collide head-on they collide into each other Collision point is offset by 1 unit in the Z axis in example 2 Example 3, red cube has infinite inertia yet it still rotates

    To reproduce

    Run examples 2 and 3, observe For example 2 pressing Space and R starts and resets the cubes respectively

    Code

    No response

    Traceback

    No response

    Additional context

    Using GJK and EPA algorithm, pretty expensive and still doesnt work

    Type: Bug Topic: Module 
    opened by rayzchen 2
  • [BUG] 3D render is flipped left-to-right

    [BUG] 3D render is flipped left-to-right

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    System info

    Loaded config
    Detected settings.json entry
    Using window provider PySDL2
    Loaded PyUnity version 0.9.0
    ##############################
             VERSION INFO
    ##############################
    PyUnity version: v0.9.0
    Python version: v3.10.4-final
    Operating system: Windows 10
    Machine: AMD64
    Python architecture: 64bit
    Dependencies:
    - pyopengl version: 3.1.6
    - pillow version: 9.1.1
    - pysdl2 version: 0.9.11
    - pysdl2-dll version: 2.0.20
    - pyglm version: 2.5.7
    - importlib-resources version: None
    - glfw version: None
    

    Describe the bug

    The skybox is flipped, rotating seems flipped along the Y-axis.

    To reproduce

    Run example 1 and watch the cube rotate anticlockwise.

    Code

    No response

    Traceback

    No response

    Additional context

    No response

    Type: Bug Meta: Invalid Topic: OpenGL 
    opened by rayzchen 3
  • [BUG] OSError with egl

    [BUG] OSError with egl

    Is there an existing issue for this?

    • [X] I have searched the existing issues

    System info

    Loaded config
    Detected settings.json entry
    Using window provider GLFW
    Loaded PyUnity version 0.9.0
    ##############################
             VERSION INFO
    ##############################
    PyUnity version: v0.9.0
    Python version: v3.9.4-final
    Operating system: Windows 10
    Machine: AMD64
    Python architecture: 32bit
    Dependencies:
    Warning: PyUnity not ran as an installed package
    - pyopengl version: 3.1.5
    - pillow version: 9.0.1
    - pysdl2 version: 0.9.11
    - pysdl2-dll version: 2.0.20
    - pyglm version: 2.5.7
    - importlib-resources version: None
    

    Describe the bug

    EGL window provider throws OSError when running multiple examples in sequence

    To reproduce

    Use PYUNITY_WINDOW_PROVIDER=egl and run python -m pyunity.

    Code

    No response

    Traceback

    Loaded config
    Trying EGL as a window provider
    Using window provider EGL
    Loaded PyUnity version 0.9.0
    Warning: Currently broken examples: 3
    
    Example 1
    /Cube
    /Floor
    /Light
    /Main Camera
    Launching window manager
    [<EGLDisplay object at 0x020F8BF8>, <pyunity.window.providers.egl.egl.EGLint_Array_13 object at 0x04F661D8>, <pyunity.window.providers.egl.egl.EGLConfig_Array_1 object at 0x04F66190>, 1, <EGLint object at 0x04F66148>]
    Compiling objects
    Starting scene
    Physics is on
    Scene 'Scene' has started
    Exiting
    
    Example 2
    Launching window manager
    [<EGLDisplay object at 0x020F8BF8>, <pyunity.window.providers.egl.egl.EGLint_Array_13 object at 0x0D2FFB20>, <pyunity.window.providers.egl.egl.EGLConfig_Array_1 object at 0x0D2FFD18>, 1, <EGLint object at 0x0D2FFF58>]
    Compiling objects
    Warning: Detected settings.json entry
    Warning: windowCache entry has been set, indicating window checking happened on this import
    Warning: settings.json entry may be faulty, removing
    Traceback (most recent call last):
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\raych\AppData\Local\Programs\Python\Python39-32\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Ray-Data\python\pyunity\pyunity\__main__.py", line 60, in <module>
        examples.show()
      File "C:\Ray-Data\python\pyunity\pyunity\examples\__init__.py", line 36, in show
        load_example(i)
      File "C:\Ray-Data\python\pyunity\pyunity\examples\__init__.py", line 20, in load_example
        module.main()
      File "C:\Ray-Data\python\pyunity\pyunity\examples\example2\__init__.py", line 55, in main
        SceneManager.LoadScene(scene)
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\sceneManager.py", line 244, in LoadScene
        __loadScene(copy.deepcopy(scene))
      File "C:\Ray-Data\python\pyunity\pyunity\scenes\sceneManager.py", line 282, in __loadScene
        render.compileSkyboxes()
      File "C:\Ray-Data\python\pyunity\pyunity\render.py", line 338, in compileSkyboxes
        skybox.compile()
      File "C:\Ray-Data\python\pyunity\pyunity\files.py", line 313, in compile
        gl.glTexImage2D(gl.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, gl.GL_RGBA,
      File "src/latebind.pyx", line 39, in OpenGL_accelerate.latebind.LateBind.__call__
      File "src/wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.__call__
    OSError: exception: access violation reading 0x00000004
    

    Additional context

    Could be caused by using a terminated display but in pyunity/window/providers/window.py eglInitialize is called every time the window provider is instantiated. Similar issues also happen when using 32-bit python on 64-bit machine.

    Type: Bug Topic: OpenGL OS: Windows 
    opened by rayzchen 1
Releases(0.8.3)
SnailJumper - A game that is developed as an assignment for Computer Intelligence course

Snail jumper Neuroevolution game assignment. Fall 2021 - Computer Intelligence.

Soroush Mehraban 22 Aug 22, 2022
Cheats for shooter games

Cheats Cheats for shooter games Download Trigger Bot trigger.exe // trigger.sha256 Download Certify Bot certify.exe // certify.sha256 Note: Check sha2

Emin Muhammadi 1 Nov 26, 2021
Advanced guessing game made in only python.

Guessing Game This is a number guessing game written in python which consists of three modes; easy,medium and hard. Each mode contains there own diffi

Ayza 2 Nov 30, 2021
OpenGL experiments with Pygame & ModernGL

pygame-opengl OpenGL experiments with Pygame & ModernGL TODO Skybox & Reflections Post-process effects (motion blur, color correction, etc..) Normal m

Kadir Aksoy 4 Oct 28, 2022
The main objective of the game is to destroy multiple waves of asteroids with the help of a blaster mounted on the spaceship.

Astronomia: let the exploration begin The main objective of the game is to destroy multiple waves of asteroids with the help of a blaster mounted on t

Aryan Nath 8 Nov 18, 2022
Playing memory game is fun and the more harder it is the more challenging it is.

Playing memory game is fun and the more harder it is the more challenging it is. Playing thi sgame make us stress free and also happy. So, I have decided to make a memory Game which people can play w

Shreejan Dolai 3 Nov 11, 2022
An automation bot to play Myuu Discord game

Auto selfbot Myuu is a self Discordbot, meaning it will use your TOKEN to logged as your account and take commands from yourself to play the game.

6 Dec 15, 2022
The Sinclair ZX Spectrum BASIC compiler!

ZX BASIC Copyleft (K) 2008, Jose Rodriguez-Rosa (a.k.a. Boriel) http://www.boriel.com All files in this project are covered under the GPLv3 LICENSE ex

Jose Rodriguez 143 Dec 13, 2022
Netskrafl - an Icelandic crossword game website

Netskrafl - an Icelandic crossword game website English summary This repository contains the implementation of an Icelandic crossword game in the genr

Miðeind ehf 30 May 09, 2022
Stock game is a python program that simulates real-life stock marketing, saving, and investments

Stock game is a python program that simulates real-life stock marketing, saving, and investments. Users get to trade and manage their portfolio and manage their 100,000 dollar portfolio.

Sai Praneth Raju K. 1 Jul 14, 2022
2D Minecraft Clone made with Python & Pygame & OpenGL

2D Minecraft Clone This is a 2D clone of the well-known game Minecraft made in Python using Pygame and ModernGL I started this mostly as a self-improv

Kadir Aksoy 2 Sep 25, 2022
Console 2D GameEngine {C2DGE} [0.1.0]

Console 2D GameEngine {C2DGE} [0.1.0] By Grosse pastèque#6705 The Project's Goal : This projects was just a challenge so if you have bad reviews, it's

Big watermelon 1 Nov 06, 2021
This Country Hangman game written in Python.

country-name-guess-hangman-game This Country Hangman game written in Python. Visit https://example.com to play the game. Description How to play this

Aytaç Kaşoğlu 1 Oct 30, 2021
AutoPilot is a game where the player controls a car and tries to get the highest score he can while not dying under falling cement blocks.

AutoPilot AutoPilot is a game where the player controls a car and tries to get the highest score he can while not dying under falling cement blocks. C

Enoc Mena 1 Nov 17, 2021
A project to san the internet of all open Minecraft servers.

MC-Server-Finder A project that scans the internet to find open Minecraft servers. Install the dependencies by running pip install -r requirements.txt

drakeerv 8 Mar 12, 2022
made a life sim game because i was tired of a astray gamedev company, everything here is open-source

Srel made a life sim game because i was tired of a astray gamedev company, everything here is open-source Progress Currently making the cmd-line versi

2 Nov 14, 2021
To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

Vaibhaw 7 Oct 13, 2022
Mastermind-Game - A game to test programming and logical skills

Bem vindo ao jogo Mastermind! O jogo consiste em adivinhar uma senha que será ge

Marcelo Daros 0 Jan 27, 2022
This is a simple Tic-Tac-Toe game.

Tic-Tac-Toe Nosso famoso e tradicional Jogo da Velha, mas agora em Python. Development setup Para rodar o programa, basta instalar python em sua maqui

João Assalim 1 Oct 10, 2022
Breakout-KD - A fantastic game created in python with pygame ✌️

Breakout-KD About This Game Breakout-KD is a fantastic breakout game. It's a python based game officialy made by me on december holiday. This game wor

Keep Distance 1 Jan 01, 2022