Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 1 Support › Problem with resolution

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #4260


    We have an issue concerning the resolution. GameWindow and Scene are set to 480×320 and multiplied by 2 as stated in the template for testing on our desktop pc. If we move our player on the Y-Axis it follows the mouse/touch input down to the borders, but any dynamically added objects that are shot by the player and thus set with startpositions calculated by the player’s actual position appear to be not correctly placed.

    E.g. if we multiply by 2 for Desktop PC -> Y-Position is appears to be only the half of  the value it should be. X-Value is not the problem because it’s fixed and not changed in those cases.

    This happens as well on for example Nexus 7 (1280×800) and Galaxy S (800×480).

    On the screenshot the left bottom box is shooting and as you can see the balls are above the box and colliding in the middle of the screen as if the edge wall would be there –> https://dl.dropbox.com/u/44356248/snowballs.png


    Thanks for your help,

    Peter & Phil


    Felgo Team

    Hi Peter & Phil,

    to make your game available for multiple screens, you should set the Scene size to 480×320 for landscape games and 320×480 for portrait ones, and only change the GameWindow size, not the scene size. Please also make sure you placed your objects and the player as children of the Scene element, not of the GameWindow element. You can quickly test how your game looks like on popular devices like iPhone4, Nexus S and Galaxy S by pressing the keys 1-6 (with Felgo version 1.0 this only works on Windows, the support for Mac & Linux was added in the Pro-Subscriber version 1.2).





    Thanks for your quick response,

    we took the template project as a starting point and everything you mentioned above seems to be that way. There’s only the Scene and the EntityManager in the GameWindow, all other objects are loaded in the Scene and the Level (only Level01 as we don’t have more by now).

    We change the position of our player by using a mouse area, when stopping and releasing the player a snowball is shot depending on the current position of the player, see the code below.

    onReleased: {
                    entityManager.createEntityFromUrlWithProperties(Qt.resolvedUrl("entities/SnowballLeft.qml"),{x: playerLeft.x + 32, y: playerLeft.y + 5, width: 32, height: 32});


    We’ve captured a perfect screenshot showing our problem. The debug output that shows the box colliders as well, is showing everything as expected, the actual game window doesn’t draw the graphics correctly.



    Thanks and cheers.


    Felgo Team


    did you set the entityContainer property of EntityManager to your Scene? It is required so the new entities get created as child of the scene. If you set it correctly, could you please post your source code so we can figure out what else the source for your problem might be?


    Cheers, Chris



    Thanks a ton, that made the trick!

    In the template project the entityContainer property is set to

    entityContainer: scene.entityContainer


    I changed it to the code below and it works now.
    GameWindow {
    id: window

    width: 480
    height: 320

    // for better readability
    fpsTextItem.color: "white"

    VPlayGameTemplateScene {
    id: scene

    EntityManager {
    id: entityManager
    entityContainer: scene

    Thanks again and good night 🙂



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

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded