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. Creating a platform game
Forum Updated to NodeBB v4.3 + New Features

Creating a platform game

Scheduled Pinned Locked Moved Game Development
8 Posts 3 Posters 5.3k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    theCrazyCrap
    wrote on last edited by
    #1

    Hi guys!
    I am doing this project of creating a platform game. And my professor told me to do it with Qt. I just wanna ask a few question if you will.. How can I integrate physics into the environment? because it's like mario with the over head platform. Second, how can i apply a second layer of image in the game because I am going to put up the controls in the screen (up,left,right). So once the character moves, the controls shouldn't move right, is it possible?

    Thanks!!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      task_struct
      wrote on last edited by
      #2

      Hi,

      for physics you can use Box2D for Qt http://developer.qt.nokia.com/wiki/box2d

      "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

      • Linu...
      1 Reply Last reply
      0
      • L Offline
        L Offline
        leon.anavi
        wrote on last edited by
        #3

        Yes, Box 2D is quite an impressive physics engine. It powers the Angry Birds :)

        http://anavi.org/

        1 Reply Last reply
        0
        • T Offline
          T Offline
          theCrazyCrap
          wrote on last edited by
          #4

          Ok, I'll look into that... How about adding another layer of image? I'm thinking of putting of controls in the screen. But the problem is the background will be moving and the controls shouldn't move.

          Thank you for your help!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            task_struct
            wrote on last edited by
            #5

            Do develop the game in C++ or in QML?

            Controls will move only if they are positioned relatively to background. Background and Controls are just items(images or some more complex structures) you decide how to position them.

            "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

            • Linu...
            1 Reply Last reply
            0
            • T Offline
              T Offline
              theCrazyCrap
              wrote on last edited by
              #6

              I'm doing it in QML... I get it now... In background itself, do we create a very long image so that the phone will just scroll as the characters move?

              1 Reply Last reply
              0
              • T Offline
                T Offline
                task_struct
                wrote on last edited by
                #7

                You can write something like that:
                @
                Item {
                id: screen

                Item {
                id: game

                // here you put background you will move

                width: screen.width
                height: screen.height
                }

                Item {
                id: controls

                // here you put your controls

                anchors.left: screen.left
                z: 1
                }

                Item {
                id: skills

                // here you put your controls

                anchors.rigth: screen.right
                z: 1
                }
                }
                @
                In game you can put your background and everything you want to move. And just change their x and y coordinates or you may use "Flickable":http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html
                You can read more about anchros "here":http://doc.qt.nokia.com/4.7-snapshot/qml-anchor-layout.html

                NOTE: I used Item because I don't know what you need, but it can be any QML element you want.

                "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

                • Linu...
                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  theCrazyCrap
                  wrote on last edited by
                  #8

                  Thank you so much! Very much Appreciated..

                  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