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. Scrolling Map / Moving camera

Scrolling Map / Moving camera

Scheduled Pinned Locked Moved Unsolved Game Development
3 Posts 3 Posters 604 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.
  • I Offline
    I Offline
    Infestor
    wrote on last edited by
    #1

    Hi,

    Im new to Qt and was wondering how and if it is possible to implement something like this i.e. the whole game map has size 100*100 and at any given time you only can see a part of that, but can reach any point via scrolling. So basically how any RTS map works.

    Best regards

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Sounds like you could be interested by the graphics view framework.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #3

        You can use OpenGL in Qt. Qt supports all what you need, for example, you do not need GLM for matrices, you need to use QMatrix4x4. This method allow to set a camera position: https://doc.qt.io/qt-5/qmatrix4x4.html#lookAt

        I will send you my short examples for beginning in OpenGL:

        • Triangle: https://rextester.com/ZTRI45421
        • Texture: https://rextester.com/BJW63108
        • Picking Triangle by Mouse: https://rextester.com/BBX4107
        • Cube in 3D: https://rextester.com/IPI73465

        You can find a lot of very good tutorials about OpenGL and use them in Qt, for example:

        • https://learnopengl.com
        • http://opengl-tutorial.org
        • http://ogldev.org
        • https://open.gl
        • https://thebookofshaders.com
        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