Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › ReferenceError: entityManager is not defined

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16070

    Vishnu

    Hello all,

    Using the QML knowledge I already have, started to learn developing games using v-play. I though Flappy bird is a good start. After adding the player and Ground.qml as shown in the tutorial. I am getting the following errors:

    1)Cannot assign to non-existent property “onEntityManagerDestroyed”
    2)ReferenceError: entityManager is not defined

    May I know the problem? Is it from my side?

    Also, my scene width and height is not scaled properly. looks like this. Also, I would like to know the reason for gap on the right side?

    GameWindow {
        id: gameWindow
        activeScene: scene
        screenWidth: 960
        screenHeight: 640
    
        Scene {
            id: scene
    
            // the "logical size" - the scene content is auto-scaled to match the GameWindow size
            width: 480
            height: 320
            Image {
                id: background
                source: "../assets/bg.png"
            }
            Ground{
                anchors.bottom: scene.bottom
            }
    
            Player{
                id:player
                x:147
                y:167
            }
        }
    }

     

    FYI: OS X El Capitan (10.11), Qt 5.8 installed using the latest v-play installer.

    Starting /Users/vishnu/FelgoSDK/workspace/build-tutorial1-Desktop_Qt_5_8_0_clang_64bit-Debug/tutorial1.app/Contents/MacOS/tutorial1…

    QML debugging is enabled. Only use this in a safe environment.

    NOTE: you are running a development build in Release Mode. However, the Release mode is recommended only for publish builds that are released to the app stores and for final testing. You can enable a publish build in the config.json file in your qml folder by setting the “stage” property to “publish”. For more information see: https://felgo.com/doc/vplay-publishing/

     

    You see the debug statement says “you are running a development build in Release Mode” though I used debug build. 

     

    libpng warning: iCCP: known incorrect sRGB profile

    qrc:///qml/VPlay/core/EntityBase.qml:573:3: QML Connections: Cannot assign to non-existent property “onEntityManagerDestroyed”

    qrc:///qml/VPlay/core/EntityBase.qml:573:3: QML Connections: Cannot assign to non-existent property “onEntityManagerDestroyed”

    libpng warning: iCCP: known incorrect sRGB profile

    qrc:///qml/VPlay/core/EntityBase.qml:530: ReferenceError: entityManager is not defined

    qrc:///qml/VPlay/core/EntityBase.qml:530: ReferenceError: entityManager is not defined

    qt.network.ssl: Error receiving trust for a CA certificate

    qt.network.ssl: Error receiving trust for a CA certificate

    qt.network.ssl: Error receiving trust for a CA certificate

    qt.network.ssl: Error receiving trust for a CA certificate

    qt.network.ssl: Error receiving trust for a CA certificate

    qrc:///qml/VPlay/core/EntityBase.qml:574: ReferenceError: entityManager is not defined

    qrc:///qml/VPlay/core/EntityBase.qml:574: ReferenceError: entityManager is not defined

    qrc:///qml/VPlay/core/EntityBase.qml:567: ReferenceError: entityManager is not defined

    qrc:///qml/VPlay/core/EntityBase.qml:567: ReferenceError: entityManager is not defined

    /Users/vishnu/FelgoSDK/workspace/build-tutorial1-Desktop_Qt_5_8_0_clang_64bit-Debug/tutorial1.app/Contents/MacOS/tutorial1 exited with code 0

    #16072

    Günther
    Felgo Team

    Hi Vishnu!

    Does it work after adding the EntityManager to your game?

    GameWindow {
    
      EntityManager {
        id: entityManager
        entityContainer: scene
      }
    
      Scene {
        id: scene
        // ...
      }
    
    }

    Cheers,
    Günther

    #16073

    Alex
    Felgo Team

    Hi Vishnu,

    the tutorial features a resource file that contains the basic setup, please us this as a starting point. It already contains a main.qml file with an EntityManager.

    Regarding the scaling. Flappy bird is in portrait mode, while you are using window and scene sizes for landscape mode (width larger than height), this is also already set correctly in the main.qml from the resources.

    Cheers,
    Alex

     

    #21198

    Earl

    The resource file link in he Flappy Bird tutorial is broken.  It comes up as page not found (404).  Can you fix this?

     

    #21199

    Alex
    Felgo Team

    Thank you very much for pointing out that issue, we fixed it right away.

    Cheers,
    Alex

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.