Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. General Questions for a 2D-Game like FTL

General Questions for a 2D-Game like FTL

Scheduled Pinned Locked Moved Game Development
2 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Banshee
    wrote on last edited by
    #1

    Hello!
    I fell in love both with QML and a game called Faster Than Lght ("Screenshot":http://gamescasual.ru/wp-content/uploads/igra_faster_than_light_ftl_1.jpg) and I guess you know what that implies :)
    I'm more experienced with Qt and C++ and the declarative approach is new to me, so I have some general questions about making such a game.

    I use QML for all the graphics stuff, i.e.

    • QML Sprite for animated images
    • QML Image for non-animated images(ok for many small images?)
    • QML Timers for events
    • QML for Input handling
    • (QML for particles)
    • (QML for collision (Box2D))

    Now, i have to integrate this in C++ to get a game-logic.

    • QMLEngine loads all relevant types (maybe 50-100?)
    • Communication via Signals & Slots (I hope its not too slow)
    • Qt&C++ for everything else (network, saving, quest- and fightlogic)

    Is this approach alright? I dont want high-performance but it would be wondeful if this runs on mobile devices :)

    Thank you all!

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi!

      [quote]Is this approach alright? I dont want high-performance but it would be wondeful if this runs on mobile devices :)[/quote]The way you've split things between QML and C++ looks well-optimized to me. QML is optimized for graphics and user interaction, while C++ is best for number-crunching.

      [quote]

      • QML Timers for events
        [/quote]Use a QML Timer to drive QML functions, usea C++ QTimer to drive C++ functions.

      [quote]

      • QMLEngine loads all relevant types (maybe 50-100?)
        [/quote]Use a QQuickView, which is higher-level than a QQmlEngine. Also, you don't need to load the types individually. Just load your "main"/"top-level" .qml file, and it will automatically pull in the others that it depends on.

      All the best with your project!

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved